如何“还原"保留不变的文件? [英] How to "revert" unchanged files with mercurial?

查看:80
本文介绍了如何“还原"保留不变的文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经在计算机上安装了Windows7,并且不得不更改所有权限/获得所有权-显然触摸"了我的所有文件,现在所有内容似乎都被修改"(当我执行"hg状态"时),但只有某些文件有实际更改.

I have installed Windows7 on my computer, and I had to change all permissions/take ownership - which apparently "touched" all my files, and now everything appears to be "modified" (when I do "hg status"), but only some files have actual changes.

有没有可以运行的命令,以便我可以提交"或还原"所有没有实际更改的文件(即,即使文件属性更改了,文本也没有改变).

Is there a command I can run so that I will either "commit" or "revert" all the files that have no actual change in them (i.e. text is unchanged, even if file attributes are changed).

已添加:

我已经从WinXP升级到Win7.我实际上没有复制"任何东西,存储库在磁盘上是相同的..只是Windows发生了变化.升级后,我无权访问某些文件,我需要拥有所有权"才能重新获得访问权限(某种程度上未正确保留用户权限).这是我得到的:

I've upgraded from WinXP to Win7. I didn't actually "copy" anything, the repository is the same on disk.... it's just Windows that changed. After the upgrade, I didn't have access to some of the files, I a needed to "take ownership" in order to re-gain access (somehow the user rights were not properly preserved). Here is what I get:

$ hg stat 
../../test/acceptance/spidermonkey/js1_5/String/regress-179068.as M      
$ hg diff ../../test/acceptance/spidermonkey/js1_5/String/regress-179068.as

推荐答案

我认为您未能正确复制存储库.hg.

I think you've failed to get the repository .hg properly copied.

$ hg stat primes.py         # nothing, file is checked in
$ touch primes.py
$ hg stat                   # still nothing
$ sudo chown bin primes.py
$ hg stat                   # nothing, the chown didn't make hg care

您可能应该 hg克隆存储库,然后从那里开始工作.

You should probably hg clone the repository and work from there.

已添加:gh,hg verifyhg summary的输出可能对您有用(如果仍然感到困惑,请在此处发布).我担心您的存储库,希望您有一个备份(或者很幸运,实际上只需要提示").

added: Ugh, the output of hg verify and hg summary would probably be useful to you (and posted here if you are still confounded). I fear for your repository and hope you have a backup (or be lucky and really only need "tip").

这篇关于如何“还原"保留不变的文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆