Mercury file display as modified incorrectly

When I clone a Mercurial repository, it usually shows that files change when they are not. This can happen if I do the following steps:

$ hg clone <url> $ cd project $ hg st .... large number of files with M at the start for modified $ hg diff .... no result. 

I think this is because their permissions were changed in the files, so it seems that the files are different from each other, since hg does not actually diff for each file when using hg st. I know this can happen in git too.

if I execute hg commit then the problem goes away, but that means I have to do an empty commit, and that is not particularly nice.

I tried doing something like hg st -all to get more information, and this only shows that some files are changed - not all. I do not see the template.

When I make my hg-clone, this happens on my network drive, which I used because backing it up - I'm not sure if this could be the reason for changing the file permissions? I am currently running Ubunut 9.04.

is there a way i can get hg st to somehow fix myself?

The project in question (although it happened to others) is http://bitbucket.org/d0ugal/django-bursar/overview/ as I am looking for work on it.

+7
dvcs mercurial
source share
2 answers

As it turned out:

 $ hg diff --git 

... shows that the file permissions really changed from 644 to 755.

I do not like this solution, but I was able to solve it by running it (on the server on which the code is located, and not on my local machine).

 find . -type f -print | xargs chmod 644 

Then two files showed that they changed from 755 to 644 (so I updated them separately). Fortunately, in this case it was pretty easy, but a project with more varied file permissions might be a problem.

I think the problem may be how my server shares the disk - I will need to study this at another point, but this is suitable for a temporary one. Should this be due to how the files are saved on the remote computer? I think that next time I will try to make a git clone on the server itself and work on the project locally.

As a side note in this question, there is a question about this behavior in the git FAQ. http://git.wiki.kernel.org/index.php/GitFaq#Why_does_git_diff_sometimes_list_a_file_that_has_no_changes.3F - I could not find anything for mercury though.

0
source share

If these are changes that have been changed, you can see these differences using hg diff --git . I'm not sure why permissions will change when placing an order.

+5
source share

All Articles