In Mercurial, when Peter "hg clone" me, and I commit and he pull and update, he gets my version, but

Posted by Jian Lin on Stack Overflow See other posts from Stack Overflow or by Jian Lin
Published on 2010-06-14T03:07:30Z Indexed on 2010/06/14 3:12 UTC
Read the original article Hit count: 509

Filed under:
|
|
|

That is, in Mercurial, if Peter cloned from me by

hg clone c:\mycode

into his e:\code

let's say there is a file code.txt and it contains the text the code is 7

Now, when I change it to the code is 11 and hg commit, then he can get my code using hg pull and hg update. Now his version says the code is 11

But if I decide the change was wrong and hg rollback, then my repository should have the 7 version, while the working directory should have the 11 version.

So when Peter does an hg pull and hg update, he should be sync'ed up to my current repository, which is the 7, but I found that it is not the case -- he still gets the 11 version. Why is that? Can he get the rolled back code (the 7)? Does Git behave the same way too?

© Stack Overflow or respective owner

Related posts about git

Related posts about mercurial