mq: document repo.mq.qparents
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Wed, 25 Sep 2013 19:34:45 +0200
changeset 19816 d5ec50e8604b
parent 19815 378567bf9f74
child 19817 e67786965af2
mq: document repo.mq.qparents The function is not very complex but writing this doc helped me to check if I got everything right.
hgext/mq.py
--- a/hgext/mq.py	Wed Sep 25 19:32:53 2013 +0200
+++ b/hgext/mq.py	Wed Sep 25 19:34:45 2013 +0200
@@ -628,6 +628,14 @@
         return (0, n)
 
     def qparents(self, repo, rev=None):
+        """return the mq handled parent or p1
+
+        In some case where mq get himself in being the parent of a merge the
+        paappropriate parent may be p2.
+        (eg: an in progress merge started with mq disabled)
+
+        If no parent are managed by mq, p1 is returned.
+        """
         if rev is None:
             (p1, p2) = repo.dirstate.parents()
             if p2 == nullid: