mercurial/context.py
changeset 3133 02b22fefc01f
parent 3132 4d021b91cb26
child 3134 4bf2e895cf86
equal deleted inserted replaced
3132:4d021b91cb26 3133:02b22fefc01f
    64         mf = self.manifest()
    64         mf = self.manifest()
    65         m = mf.keys()
    65         m = mf.keys()
    66         m.sort()
    66         m.sort()
    67         for f in m:
    67         for f in m:
    68             yield self.filectx(f, fileid=mf[f])
    68             yield self.filectx(f, fileid=mf[f])
       
    69 
       
    70     def ancestor(self, c2):
       
    71         """
       
    72         return the ancestor context of self and c2
       
    73         """
       
    74         n = self._repo.changelog.ancestor(self._node, c2._node)
       
    75         return changectx(self._repo, n)
    69 
    76 
    70 class filectx(object):
    77 class filectx(object):
    71     """A filecontext object makes access to data related to a particular
    78     """A filecontext object makes access to data related to a particular
    72        filerevision convenient."""
    79        filerevision convenient."""
    73     def __init__(self, repo, path, changeid=None, fileid=None, filelog=None):
    80     def __init__(self, repo, path, changeid=None, fileid=None, filelog=None):