# HG changeset patch # User Sean Farley # Date 2013-08-12 03:45:30 # Node ID 964844d64ef8fdb02cc5330f70a1acab158fdfb7 # Parent 2c149635c2c56835c152f02043608d803fcb9a63 basefilectx: move __str__ from filectx diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -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 "" % str(self)