comparison hgext/mq.py @ 19816:d5ec50e8604b

mq: document repo.mq.qparents The function is not very complex but writing this doc helped me to check if I got everything right.
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Wed, 25 Sep 2013 19:34:45 +0200
parents 378567bf9f74
children e67786965af2
comparison
equal deleted inserted replaced
19815:378567bf9f74 19816:d5ec50e8604b
626 patchf.close() 626 patchf.close()
627 self.removeundo(repo) 627 self.removeundo(repo)
628 return (0, n) 628 return (0, n)
629 629
630 def qparents(self, repo, rev=None): 630 def qparents(self, repo, rev=None):
631 """return the mq handled parent or p1
632
633 In some case where mq get himself in being the parent of a merge the
634 paappropriate parent may be p2.
635 (eg: an in progress merge started with mq disabled)
636
637 If no parent are managed by mq, p1 is returned.
638 """
631 if rev is None: 639 if rev is None:
632 (p1, p2) = repo.dirstate.parents() 640 (p1, p2) = repo.dirstate.parents()
633 if p2 == nullid: 641 if p2 == nullid:
634 return p1 642 return p1
635 if not self.applied: 643 if not self.applied: