# HG changeset patch # User Pierre-Yves David # Date 2013-09-25 12:10:34 # Node ID e67786965af23b920548ed4e880fcd897a30c36d # Parent d5ec50e8604b200497c8c24ee741425663221da5 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). diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -3062,7 +3062,9 @@ def strip(ui, repo, *revs, **opts): 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