comparison hglib/context.py @ 124:cc7569bffb26

context: add 'hidden' method to check if the changeset is hidden This method should not be a static property obtained at creation as the hidden status may change.
author Paul Tonelli <paul.tonelli@logilab.fr>
date Thu, 15 May 2014 15:12:13 +0200
parents c635e6e7054f
children a7fe976b1931
comparison
equal deleted inserted replaced
123:cdde1656346f 124:cc7569bffb26
192 return bms 192 return bms
193 193
194 def bookmarks(self): 194 def bookmarks(self):
195 return self._bookmarks 195 return self._bookmarks
196 196
197 def hidden(self):
198 """return True if the changeset is hidden, else False"""
199 return bool(self._repo.log(revrange='%s and hidden()' % self._node,
200 hidden=True))
201
197 def children(self): 202 def children(self):
198 """return contexts for each child changeset""" 203 """return contexts for each child changeset"""
199 for c in self._repo.log('children(%s)' % self._node): 204 for c in self._repo.log('children(%s)' % self._node):
200 yield changectx(self._repo, c) 205 yield changectx(self._repo, c)
201 206