Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/context.py @ 19602:018ee491a6be
basefilectx: move path from filectx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 11 Aug 2013 22:56:18 -0500 |
parents | f284907631f5 |
children | a92302f48a56 |
comparison
equal
deleted
inserted
replaced
19601:f284907631f5 | 19602:018ee491a6be |
---|---|
512 def manifest(self): | 512 def manifest(self): |
513 return self._changectx.manifest() | 513 return self._changectx.manifest() |
514 def changectx(self): | 514 def changectx(self): |
515 return self._changectx | 515 return self._changectx |
516 | 516 |
517 def path(self): | |
518 return self._path | |
519 | |
517 class filectx(basefilectx): | 520 class filectx(basefilectx): |
518 """A filecontext object makes access to data related to a particular | 521 """A filecontext object makes access to data related to a particular |
519 filerevision convenient.""" | 522 filerevision convenient.""" |
520 def __init__(self, repo, path, changeid=None, fileid=None, | 523 def __init__(self, repo, path, changeid=None, fileid=None, |
521 filelog=None, changectx=None): | 524 filelog=None, changectx=None): |
569 return filectx(self._repo, self._path, fileid=fileid, | 572 return filectx(self._repo, self._path, fileid=fileid, |
570 filelog=self._filelog) | 573 filelog=self._filelog) |
571 | 574 |
572 def data(self): | 575 def data(self): |
573 return self._filelog.read(self._filenode) | 576 return self._filelog.read(self._filenode) |
574 def path(self): | |
575 return self._path | |
576 def size(self): | 577 def size(self): |
577 return self._filelog.size(self._filerev) | 578 return self._filelog.size(self._filerev) |
578 | 579 |
579 def isbinary(self): | 580 def isbinary(self): |
580 try: | 581 try: |