comparison mercurial/context.py @ 19587:b1c344ebd8e4

basefilectx: move filelog from filectx
author Sean Farley <sean.michael.farley@gmail.com>
date Sun, 11 Aug 2013 22:51:18 -0500
parents 43f9ed2f64b1
children a192fff6c97d
comparison
equal deleted inserted replaced
19586:43f9ed2f64b1 19587:b1c344ebd8e4
481 return self._filerev 481 return self._filerev
482 def filenode(self): 482 def filenode(self):
483 return self._filenode 483 return self._filenode
484 def flags(self): 484 def flags(self):
485 return self._changectx.flags(self._path) 485 return self._changectx.flags(self._path)
486 def filelog(self):
487 return self._filelog
486 488
487 class filectx(basefilectx): 489 class filectx(basefilectx):
488 """A filecontext object makes access to data related to a particular 490 """A filecontext object makes access to data related to a particular
489 filerevision convenient.""" 491 filerevision convenient."""
490 def __init__(self, repo, path, changeid=None, fileid=None, 492 def __init__(self, repo, path, changeid=None, fileid=None,
537 '''opens an arbitrary revision of the file without 539 '''opens an arbitrary revision of the file without
538 opening a new filelog''' 540 opening a new filelog'''
539 return filectx(self._repo, self._path, fileid=fileid, 541 return filectx(self._repo, self._path, fileid=fileid,
540 filelog=self._filelog) 542 filelog=self._filelog)
541 543
542 def filelog(self):
543 return self._filelog
544 def rev(self): 544 def rev(self):
545 return self._changeid 545 return self._changeid
546 def linkrev(self): 546 def linkrev(self):
547 return self._filelog.linkrev(self._filerev) 547 return self._filelog.linkrev(self._filerev)
548 def node(self): 548 def node(self):