Show More
@@ -447,6 +447,14 b' class basefilectx(object):' | |||||
447 | def _repopath(self): |
|
447 | def _repopath(self): | |
448 | return self._path |
|
448 | return self._path | |
449 |
|
449 | |||
|
450 | def __nonzero__(self): | |||
|
451 | try: | |||
|
452 | self._filenode | |||
|
453 | return True | |||
|
454 | except error.LookupError: | |||
|
455 | # file is missing | |||
|
456 | return False | |||
|
457 | ||||
450 | class filectx(basefilectx): |
|
458 | class filectx(basefilectx): | |
451 | """A filecontext object makes access to data related to a particular |
|
459 | """A filecontext object makes access to data related to a particular | |
452 | filerevision convenient.""" |
|
460 | filerevision convenient.""" | |
@@ -496,14 +504,6 b' class filectx(basefilectx):' | |||||
496 | # considered when solving linkrev issue are on the table. |
|
504 | # considered when solving linkrev issue are on the table. | |
497 | return changectx(self._repo.unfiltered(), self._changeid) |
|
505 | return changectx(self._repo.unfiltered(), self._changeid) | |
498 |
|
506 | |||
499 | def __nonzero__(self): |
|
|||
500 | try: |
|
|||
501 | self._filenode |
|
|||
502 | return True |
|
|||
503 | except error.LookupError: |
|
|||
504 | # file is missing |
|
|||
505 | return False |
|
|||
506 |
|
||||
507 | def __str__(self): |
|
507 | def __str__(self): | |
508 | return "%s@%s" % (self.path(), short(self.node())) |
|
508 | return "%s@%s" % (self.path(), short(self.node())) | |
509 |
|
509 |
General Comments 0
You need to be logged in to leave comments.
Login now