Mercurial > hg
comparison mercurial/context.py @ 19583:e5074d82afc9
basefilectx: move __ne__ from filectx
author | Sean Farley <sean.michael.farley@gmail.com> |
---|---|
date | Sun, 11 Aug 2013 22:49:40 -0500 |
parents | bda1d48bb07f |
children | fe300e63c28c |
comparison
equal
deleted
inserted
replaced
19582:bda1d48bb07f | 19583:e5074d82afc9 |
---|---|
472 return (type(self) == type(other) and self._path == other._path | 472 return (type(self) == type(other) and self._path == other._path |
473 and self._filenode == other._filenode) | 473 and self._filenode == other._filenode) |
474 except AttributeError: | 474 except AttributeError: |
475 return False | 475 return False |
476 | 476 |
477 def __ne__(self, other): | |
478 return not (self == other) | |
479 | |
477 class filectx(basefilectx): | 480 class filectx(basefilectx): |
478 """A filecontext object makes access to data related to a particular | 481 """A filecontext object makes access to data related to a particular |
479 filerevision convenient.""" | 482 filerevision convenient.""" |
480 def __init__(self, repo, path, changeid=None, fileid=None, | 483 def __init__(self, repo, path, changeid=None, fileid=None, |
481 filelog=None, changectx=None): | 484 filelog=None, changectx=None): |
520 # | 523 # |
521 # Linkrevs have several serious troubles with filtering that are | 524 # Linkrevs have several serious troubles with filtering that are |
522 # complicated to solve. Proper handling of the issue here should be | 525 # complicated to solve. Proper handling of the issue here should be |
523 # considered when solving linkrev issue are on the table. | 526 # considered when solving linkrev issue are on the table. |
524 return changectx(self._repo.unfiltered(), self._changeid) | 527 return changectx(self._repo.unfiltered(), self._changeid) |
525 | |
526 def __ne__(self, other): | |
527 return not (self == other) | |
528 | 528 |
529 def filectx(self, fileid): | 529 def filectx(self, fileid): |
530 '''opens an arbitrary revision of the file without | 530 '''opens an arbitrary revision of the file without |
531 opening a new filelog''' | 531 opening a new filelog''' |
532 return filectx(self._repo, self._path, fileid=fileid, | 532 return filectx(self._repo, self._path, fileid=fileid, |