hg 0.9.3: pull, revert to pre-merged version, pull expected behavior?

Allan Wind allan_wind at lifeintegrity.com
Wed Apr 25 23:58:07 CDT 2007


I was trying this variation of the merge tutorial
(http://www.selenic.com/mercurial/wiki/index.cgi/TutorialConflict):

...
$ hg pull ../my-hello-new-output
$ hg update
$ hg merge

The merge, strangely, cause revision 3, and the commit revision 4.

$ hg commit -m 'merged stuff' 

Anyways, now I want to revert to the pre-merge version (2):

$ hg cat -r2 hello.c|grep CVS
        printf("sure am glad I'm not using CVS!\n");
$ hg revert -r2 hello.c
$ hg commit -m revert
$ diff -0 ../my-hello-new-output/hello.c hello.c 
--- ../my-hello-new-output/hello.c      2007-04-25 22:25:32.000000000
-0400
+++ hello.c     2007-04-26 00:33:28.000000000 -0400
@@ -15 +15 @@
-       printf("sure am glad I'm using Mercurial!\n");
+        printf("sure am glad I'm not using CVS!\n");

If I try to pull it in again I get a different behavior than the first
time around:

$ hg pull ../my-hello-new-output
pulling from ../my-hello-new-output
searching for changes
no changes found

Is that expected behavior?  If so how do I know  about the missing
stuff, and in this case how do I merge it in now?  FAQ suggest that I
should have used update instead of revert here, but my use case is not
working on an old version but trying to merge in stuff from an old
version.


/Allan


More information about the Mercurial mailing list