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
If you are still in the draft phase (not pushed elsewhere yet), use the built-in extension hg strip <rev> command. Otherwise, you should do a hg backout , which will reverse the changeset. In case you still need the commit you made, I suggest you export it to import it again in the correct branch, before stripping.
hg revert changes the file content only and leaves the working copy parent revision alone. You typically use hg revert when you decide that you don't want to keep the uncommited changes you've made to a file in your working copy.
hg strip [-k] [-f] [-B bookmark] [-r] REV... The strip command removes the specified changesets and all their descendants. If the working directory has uncommitted changes, the operation is aborted unless the --force flag is supplied, in which case changes will be discarded.
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").
This happened to me too! I fixed it like this...
hg path/to/clone original path/to/clone
hg update -C /path/to/clone
on the clone to make sure it is clean.kdiff3 path/to/original path/to/clone
Clean the original. Work on the clone and commit and push.
or
Clean the original, and run kdiff3 path/to/clone path/to/original
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With