[PATCH] mq: do not update an empty working directory after strip

Brendan Cully brendan at kublai.com
Wed Sep 13 17:36:30 UTC 2006


# HG changeset patch
# User Brendan Cully <brendan at kublai.com>
# Date 1158168939 25200
# Node ID 5eca3e15c898cb107cb92d0ae938fc601140b31c
# Parent  499791fb1911aa292e78383f24c8aefab0b3a1ce
mq: do not update an empty working directory after strip.

Closes #296.

diff --git a/hgext/mq.py b/hgext/mq.py
--- a/hgext/mq.py
+++ b/hgext/mq.py
@@ -1754,7 +1754,8 @@ def strip(ui, repo, rev, **opts):
         backup = 'strip'
     elif opts['nobackup']:
         backup = 'none'
-    repo.mq.strip(repo, rev, backup=backup)
+    update = repo.dirstate.parents()[0] != revlog.nullid
+    repo.mq.strip(repo, rev, backup=backup, update=update)
     return 0
 
 def select(ui, repo, *args, **opts):



More information about the Mercurial mailing list