changeset 9915:806e6b6cb8d8

ancestor: improve docstring The term "least common ancestor" is highly ambiguous.
author Sune Foldager <cryo@cyanite.org>
date Tue, 24 Nov 2009 09:49:23 +0100
parents f139814d20b3
children 3d718761157b
files mercurial/ancestor.py
diffstat 1 files changed, 4 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/ancestor.py	Mon Nov 23 23:04:44 2009 +0100
+++ b/mercurial/ancestor.py	Tue Nov 24 09:49:23 2009 +0100
@@ -9,10 +9,11 @@
 
 def ancestor(a, b, pfunc):
     """
-    return the least common ancestor of nodes a and b or None if there
-    is no such ancestor.
+    return a minimal-distance ancestor of nodes a and b, or None if there is no
+    such ancestor. Note that there can be several ancestors with the same
+    (minimal) distance, and the one returned is arbitrary.
 
-    pfunc must return a list of parent vertices
+    pfunc must return a list of parent vertices for a given vertex
     """
 
     if a == b: