comparison mercurial/context.py @ 19577:b52d572a2177

basefilectx: move _repopath from filectx
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 11 Aug 2013 22:44:51 -0500
parents 18bbd8a3abf3
children 2c149635c2c5
comparison
equal deleted inserted replaced
19576:18bbd8a3abf3 19577:b52d572a2177
441 441
442 @propertycache 442 @propertycache
443 def _filerev(self): 443 def _filerev(self):
444 return self._filelog.rev(self._filenode) 444 return self._filelog.rev(self._filenode)
445 445
446 @propertycache
447 def _repopath(self):
448 return self._path
449
446 class filectx(basefilectx): 450 class filectx(basefilectx):
447 """A filecontext object makes access to data related to a particular 451 """A filecontext object makes access to data related to a particular
448 filerevision convenient.""" 452 filerevision convenient."""
449 def __init__(self, repo, path, changeid=None, fileid=None, 453 def __init__(self, repo, path, changeid=None, fileid=None,
450 filelog=None, changectx=None): 454 filelog=None, changectx=None):
489 # 493 #
490 # Linkrevs have several serious troubles with filtering that are 494 # Linkrevs have several serious troubles with filtering that are
491 # complicated to solve. Proper handling of the issue here should be 495 # complicated to solve. Proper handling of the issue here should be
492 # considered when solving linkrev issue are on the table. 496 # considered when solving linkrev issue are on the table.
493 return changectx(self._repo.unfiltered(), self._changeid) 497 return changectx(self._repo.unfiltered(), self._changeid)
494
495 @propertycache
496 def _repopath(self):
497 return self._path
498 498
499 def __nonzero__(self): 499 def __nonzero__(self):
500 try: 500 try:
501 self._filenode 501 self._filenode
502 return True 502 return True