Show More
@@ -467,6 +467,13 b' class basefilectx(object):' | |||||
467 | except AttributeError: |
|
467 | except AttributeError: | |
468 | return id(self) |
|
468 | return id(self) | |
469 |
|
469 | |||
|
470 | def __eq__(self, other): | |||
|
471 | try: | |||
|
472 | return (type(self) == type(other) and self._path == other._path | |||
|
473 | and self._filenode == other._filenode) | |||
|
474 | except AttributeError: | |||
|
475 | return False | |||
|
476 | ||||
470 | class filectx(basefilectx): |
|
477 | class filectx(basefilectx): | |
471 | """A filecontext object makes access to data related to a particular |
|
478 | """A filecontext object makes access to data related to a particular | |
472 | filerevision convenient.""" |
|
479 | filerevision convenient.""" | |
@@ -516,13 +523,6 b' class filectx(basefilectx):' | |||||
516 | # considered when solving linkrev issue are on the table. |
|
523 | # considered when solving linkrev issue are on the table. | |
517 | return changectx(self._repo.unfiltered(), self._changeid) |
|
524 | return changectx(self._repo.unfiltered(), self._changeid) | |
518 |
|
525 | |||
519 | def __eq__(self, other): |
|
|||
520 | try: |
|
|||
521 | return (self._path == other._path |
|
|||
522 | and self._filenode == other._filenode) |
|
|||
523 | except AttributeError: |
|
|||
524 | return False |
|
|||
525 |
|
||||
526 | def __ne__(self, other): |
|
526 | def __ne__(self, other): | |
527 | return not (self == other) |
|
527 | return not (self == other) | |
528 |
|
528 |
General Comments 0
You need to be logged in to leave comments.
Login now