basefilectx: move __str__ from filectx

This commit is contained in:
Sean Farley 2013-08-11 22:45:30 -05:00
parent 7d4c1da38f
commit 6d40b2e84f

View File

@ -455,6 +455,9 @@ class basefilectx(object):
# file is missing
return False
def __str__(self):
return "%s@%s" % (self.path(), short(self.node()))
class filectx(basefilectx):
"""A filecontext object makes access to data related to a particular
filerevision convenient."""
@ -504,9 +507,6 @@ class filectx(basefilectx):
# considered when solving linkrev issue are on the table.
return changectx(self._repo.unfiltered(), self._changeid)
def __str__(self):
return "%s@%s" % (self.path(), short(self.node()))
def __repr__(self):
return "<filectx %s>" % str(self)