changeset 19817:e67786965af2

mq: drop the use of mq.queue.qparent in mq.strip In this case, rev is never `None`. We can just copy the two relevant lines in in `strip`. This help having `strip` independent from `queue` one further step toward its extraction in an independent extension. (As discussed in issue3824).
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 25 Sep 2013 14:10:34 +0200
parents d5ec50e8604b
children f72b513ad234
files hgext/mq.py
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/hgext/mq.py	Wed Sep 25 19:34:45 2013 +0200
+++ b/hgext/mq.py	Wed Sep 25 14:10:34 2013 +0200
@@ -3062,7 +3062,9 @@
     if update and opts.get('keep'):
         wlock = repo.wlock()
         try:
-            urev = repo.mq.qparents(repo, revs[0])
+            urev, p2 = repo.changelog.parents(revs[0])
+            if p2 != nullid and p2 in [x.node for x in repo.mq.applied]:
+                urev = p2
             uctx = repo[urev]
 
             # only reset the dirstate for files that would actually change