mercurial/context.py
changeset 35107 b22a0d9e0a83
parent 35093 bd2743936b56
child 35271 d90c534099b1
equal deleted inserted replaced
35106:4b288d118d8b 35107:b22a0d9e0a83
   613     def branch(self):
   613     def branch(self):
   614         return encoding.tolocal(self._changeset.extra.get("branch"))
   614         return encoding.tolocal(self._changeset.extra.get("branch"))
   615     def closesbranch(self):
   615     def closesbranch(self):
   616         return 'close' in self._changeset.extra
   616         return 'close' in self._changeset.extra
   617     def extra(self):
   617     def extra(self):
       
   618         """Return a dict of extra information."""
   618         return self._changeset.extra
   619         return self._changeset.extra
   619     def tags(self):
   620     def tags(self):
       
   621         """Return a list of byte tag names"""
   620         return self._repo.nodetags(self._node)
   622         return self._repo.nodetags(self._node)
   621     def bookmarks(self):
   623     def bookmarks(self):
       
   624         """Return a list of byte bookmark names."""
   622         return self._repo.nodebookmarks(self._node)
   625         return self._repo.nodebookmarks(self._node)
   623     def phase(self):
   626     def phase(self):
   624         return self._repo._phasecache.phase(self._repo, self._rev)
   627         return self._repo._phasecache.phase(self._repo, self._rev)
   625     def hidden(self):
   628     def hidden(self):
   626         return self._rev in repoview.filterrevs(self._repo, 'visible')
   629         return self._rev in repoview.filterrevs(self._repo, 'visible')
   627 
   630 
   628     def isinmemory(self):
   631     def isinmemory(self):
   629         return False
   632         return False
   630 
   633 
   631     def children(self):
   634     def children(self):
   632         """return contexts for each child changeset"""
   635         """return list of changectx contexts for each child changeset.
       
   636 
       
   637         This returns only the immediate child changesets. Use descendants() to
       
   638         recursively walk children.
       
   639         """
   633         c = self._repo.changelog.children(self._node)
   640         c = self._repo.changelog.children(self._node)
   634         return [changectx(self._repo, x) for x in c]
   641         return [changectx(self._repo, x) for x in c]
   635 
   642 
   636     def ancestors(self):
   643     def ancestors(self):
   637         for a in self._repo.changelog.ancestors([self._rev]):
   644         for a in self._repo.changelog.ancestors([self._rev]):
   638             yield changectx(self._repo, a)
   645             yield changectx(self._repo, a)
   639 
   646 
   640     def descendants(self):
   647     def descendants(self):
       
   648         """Recursively yield all children of the changeset.
       
   649 
       
   650         For just the immediate children, use children()
       
   651         """
   641         for d in self._repo.changelog.descendants([self._rev]):
   652         for d in self._repo.changelog.descendants([self._rev]):
   642             yield changectx(self._repo, d)
   653             yield changectx(self._repo, d)
   643 
   654 
   644     def filectx(self, path, fileid=None, filelog=None):
   655     def filectx(self, path, fileid=None, filelog=None):
   645         """get a file context from this changeset"""
   656         """get a file context from this changeset"""