comparison mercurial/context.py @ 19584:fe300e63c28c

basefilectx: move filerev from filectx
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 11 Aug 2013 22:50:15 -0500
parents e5074d82afc9
children 8e553cd6071e
comparison
equal deleted inserted replaced
19583:e5074d82afc9 19584:fe300e63c28c
475 return False 475 return False
476 476
477 def __ne__(self, other): 477 def __ne__(self, other):
478 return not (self == other) 478 return not (self == other)
479 479
480 def filerev(self):
481 return self._filerev
482
480 class filectx(basefilectx): 483 class filectx(basefilectx):
481 """A filecontext object makes access to data related to a particular 484 """A filecontext object makes access to data related to a particular
482 filerevision convenient.""" 485 filerevision convenient."""
483 def __init__(self, repo, path, changeid=None, fileid=None, 486 def __init__(self, repo, path, changeid=None, fileid=None,
484 filelog=None, changectx=None): 487 filelog=None, changectx=None):
530 '''opens an arbitrary revision of the file without 533 '''opens an arbitrary revision of the file without
531 opening a new filelog''' 534 opening a new filelog'''
532 return filectx(self._repo, self._path, fileid=fileid, 535 return filectx(self._repo, self._path, fileid=fileid,
533 filelog=self._filelog) 536 filelog=self._filelog)
534 537
535 def filerev(self):
536 return self._filerev
537 def filenode(self): 538 def filenode(self):
538 return self._filenode 539 return self._filenode
539 def flags(self): 540 def flags(self):
540 return self._changectx.flags(self._path) 541 return self._changectx.flags(self._path)
541 def filelog(self): 542 def filelog(self):