comparison hgext/mq.py @ 19818:f72b513ad234

mq: drop the use of mq.queue.qparent in mq.queue.strip Same as in the previous changeset, rev is never `None`. We can just copy the two relevant lines in in `queue.strip`. This help having `queue.strip` independent from `queue`. One further step toward the extraction of `strip` in an independent extension. (As discussed in issue3824).
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 25 Sep 2013 13:41:43 +0200
parents e67786965af2
children f0fc4d5797e1
comparison
equal deleted inserted replaced
19817:e67786965af2 19818:f72b513ad234
1109 wlock = repo.wlock() 1109 wlock = repo.wlock()
1110 lock = repo.lock() 1110 lock = repo.lock()
1111 1111
1112 if update: 1112 if update:
1113 checklocalchanges(repo, force=force) 1113 checklocalchanges(repo, force=force)
1114 urev = self.qparents(repo, revs[0]) 1114 urev, p2 = repo.changelog.parents(revs[0])
1115 if p2 != nullid and p2 in [x.node for x in self.applied]:
1116 urev = p2
1115 hg.clean(repo, urev) 1117 hg.clean(repo, urev)
1116 repo.dirstate.write() 1118 repo.dirstate.write()
1117 1119
1118 repair.strip(self.ui, repo, revs, backup) 1120 repair.strip(self.ui, repo, revs, backup)
1119 finally: 1121 finally: