views:

91

answers:

2

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).

added:

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
+3  A: 

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

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

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").

msw
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 ../../test/acceptance/spidermonkey/js1_5/String/regress-179068.as $ hg diff ../../test/acceptance/spidermonkey/js1_5/String/regress-179068.as $
Virgil
sorry, I don't know how to fix the formatting. The idea is that it shows the file as "modified" even though "diff" shows no difference. How to I "fix" (i.e., either "revert" or "commit") only those files where there's no difference?
Virgil
added: added. I'm not sure what it takes to get SO to let Virgil know there's an update; I know this will.
msw
THanks for the help. I ran "hg verify" and it did show a warning/"integrity error" but seems to be completely unrelated (rev 20 of a file points to unexpected changeset). Eventually I re-cloned the central repository, did a directory diff and copied back my changes, thus "fixing" the issue (at the expense of some history loss for my changesets). FWIW, the cloned repository has the same warning/integrity error, so I'm pretty sure that it's unrelated with the problem that I was having.
Virgil
+1  A: 

This happened to me too! I fixed it like this...

  1. Clone the repository hg path/to/clone original path/to/clone
  2. Run hg update -C /path/to/clone on the clone to make sure it is clean.
  3. Run kdiff3 path/to/original path/to/clone
  4. Uncheck 'show identical files'
  5. Select a file or folder to synchronize (do not synchronize the .hg folder)
  6. Press CTRL-1 to choose version A
  7. Press F6 to synchronize
  8. Repeat steps 5-7 as necessary

Clean the original. Work on the clone and commit and push.

or

Clean the original, and run kdiff3 path/to/clone path/to/original

Seminumerical