Show More
@@ -447,6 +447,14 b' class basefilectx(object):' | |||
|
447 | 447 | def _repopath(self): |
|
448 | 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 | 458 | class filectx(basefilectx): |
|
451 | 459 | """A filecontext object makes access to data related to a particular |
|
452 | 460 | filerevision convenient.""" |
@@ -496,14 +504,6 b' class filectx(basefilectx):' | |||
|
496 | 504 | # considered when solving linkrev issue are on the table. |
|
497 | 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 | 507 | def __str__(self): |
|
508 | 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