# HG changeset patch # User Sune Foldager # Date 2009-11-24 08:49:23 # Node ID 806e6b6cb8d84a68ff90a40d2894d7669f31374b # Parent f139814d20b335b34f82d0155e807d789b440ea9 ancestor: improve docstring The term "least common ancestor" is highly ambiguous. diff --git a/mercurial/ancestor.py b/mercurial/ancestor.py --- a/mercurial/ancestor.py +++ b/mercurial/ancestor.py @@ -9,10 +9,11 @@ import heapq 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: