Mercurial > hg-stable
comparison hgext/mq.py @ 10680:45eb9b5dacf6
mq: simplify qparents calculation
author | Benoit Boissinot <benoit.boissinot@ens-lyon.org> |
---|---|
date | Sun, 14 Mar 2010 01:01:17 +0100 |
parents | 35abaea778dc |
children | 3f6a6407a3c7 |
comparison
equal
deleted
inserted
replaced
10679:35abaea778dc | 10680:45eb9b5dacf6 |
---|---|
550 return p1 | 550 return p1 |
551 if len(self.applied) == 0: | 551 if len(self.applied) == 0: |
552 return None | 552 return None |
553 return self.applied[-1].node | 553 return self.applied[-1].node |
554 p1, p2 = repo.changelog.parents(rev) | 554 p1, p2 = repo.changelog.parents(rev) |
555 if p2 != nullid: | 555 if p2 != nullid and p2 in [x.node for x in self.applied]: |
556 arevs = [x.node for x in self.applied] | 556 return p2 |
557 if p1 in arevs: | |
558 return p1 | |
559 if p2 in arevs: | |
560 return p2 | |
561 return p1 | 557 return p1 |
562 | 558 |
563 def mergepatch(self, repo, mergeq, series, diffopts): | 559 def mergepatch(self, repo, mergeq, series, diffopts): |
564 if len(self.applied) == 0: | 560 if len(self.applied) == 0: |
565 # each of the patches merged in will have two parents. This | 561 # each of the patches merged in will have two parents. This |