[PATCH]mq:fix strip mulitiple revision problem

Xiaofeng Ling xiaofeng.ling at intel.com
Thu Sep 15 01:27:30 CDT 2005


Chris,
     I meet this problem when trying to strip multiple
revision one time.

when strip multiple revision, the check out version
will become the parents of head revision, but that
is already stripped. so hg parents report errors.


diff -r 71d25641be82 contrib/mq
--- a/contrib/mq	Thu Sep 15 05:54:34 2005
+++ b/contrib/mq	Thu Sep 15 13:54:54 2005
@@ -264,6 +264,9 @@
          pp = chlog.parents(rev)
          revnum = chlog.rev(rev)

+        if update:
+            repo.update(pp[0], allow=False, force=True)
+            repo.dirstate.write()
          # save is a list of all the branches we are truncating away
          # that we actually want to keep.  changegroup will be used
          # to preserve them and add them back after the truncate
@@ -302,9 +305,6 @@
          if save:
              chgrp = repo.changegroup(save, newer=0)
              chgrp.fillbuf()
-        if update:
-            repo.update(pp[0], allow=False, force=True)
-            repo.dirstate.write()

          stripall(rev, revnum)



More information about the Mercurial mailing list