Problems with committing a single file - grabs everything

Hazlett, Susan G. hazlett1 at llnl.gov
Thu Jan 6 13:34:59 CST 2011


Hi -

I couldn't find an answer to this in the archives, so I'm hoping someone can help me.  A co-worker was trying to commit a single file with mercurial, and it was failing to commit the single file, rather it committed all files that were modified.  This isn't the behavior described in hg help commit.

Here is what he did:

# from root working directory of his clone
% hg st
M config.suggest
M src/hier/LocalID.h
M src/hier/LocalID.cpp

% hg diff
# diffs show

% hg commit config.suggest
# edit commit message, save and close

% hg st
%
# Should have still seen the mods for the other two files


When he looked at the commit, it took *all* the files rather than just config.suggest.  We rolledback, tried it again and this time, the commit took only the config.suggest as he had originally wanted.  Thinking it an anomaly, we moved on, but 5 minutes later he came back and was able to reproduce the problem.

So I tried the same thing from my clone, and after 30 minutes, I have yet to reproduce the problem.  Aside from environment differences, we are both using the same hg.  Our only difference in clones is that he cloned from the remote repository using /nfs path and I used the mounted alias name when cloning.  (We've recently converted from subversion to mercurial, and have a shared repository located on an NFS share.)

I'm at a loss to explain what is happening:  hg help commit shows that specifying a single file should commit a single file and not all changes in the working directory tree.  Am I missing something here?   I also tried google and stackoverflow to see if this issue had been seen before by others, and couldn't find anything that looked like this same issue.

Thanks in advance,
Susan Hazlett

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://selenic.com/pipermail/mercurial/attachments/20110106/eaa6d351/attachment.htm>


More information about the Mercurial mailing list