Mercurial > public > mercurial-scm > hg
comparison mercurial/context.py @ 17076:75f4180509a4
obsolete: function and method to access some obsolete data
An `obsolete` boolean property is added to changeset context. Function to get
obsolete marker object from a changeset context are added to the obsolete
module.
author | Pierre-Yves.David@ens-lyon.org |
---|---|
date | Wed, 06 Jun 2012 01:56:58 +0200 |
parents | 8b7cd9a998f0 |
children | b3c20b0f5f5a |
comparison
equal
deleted
inserted
replaced
17075:28ed1c4511ce | 17076:75f4180509a4 |
---|---|
228 | 228 |
229 def descendants(self): | 229 def descendants(self): |
230 for d in self._repo.changelog.descendants([self._rev]): | 230 for d in self._repo.changelog.descendants([self._rev]): |
231 yield changectx(self._repo, d) | 231 yield changectx(self._repo, d) |
232 | 232 |
233 def obsolete(self): | |
234 """True if the changeset is obsolete""" | |
235 return self.node() in self._repo.obsstore.obsoleted | |
236 | |
233 def _fileinfo(self, path): | 237 def _fileinfo(self, path): |
234 if '_manifest' in self.__dict__: | 238 if '_manifest' in self.__dict__: |
235 try: | 239 try: |
236 return self._manifest[path], self._manifest.flags(path) | 240 return self._manifest[path], self._manifest.flags(path) |
237 except KeyError: | 241 except KeyError: |