Mercurial > hg
diff mercurial/context.py @ 11493:cc4e2a7ca23f
Merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Fri, 02 Jul 2010 11:30:57 +0200 |
parents | 2ee26044d846 |
children | 16fe98804fd8 |
line wrap: on
line diff
--- a/mercurial/context.py Mon Jun 21 17:02:48 2010 -0300 +++ b/mercurial/context.py Fri Jul 02 11:30:57 2010 +0200 @@ -490,12 +490,16 @@ return zip(hist[f][0], hist[f][1].splitlines(True)) - def ancestor(self, fc2): + def ancestor(self, fc2, actx=None): """ find the common ancestor file context, if any, of self, and fc2 + + If actx is given, it must be the changectx of the common ancestor + of self's and fc2's respective changesets. """ - actx = self.changectx().ancestor(fc2.changectx()) + if actx is None: + actx = self.changectx().ancestor(fc2.changectx()) # the trivial case: changesets are unrelated, files must be too if not actx: