--- a/mercurial/context.py Fri Sep 29 16:01:46 2006 -0500
+++ b/mercurial/context.py Fri Sep 29 16:29:44 2006 -0500
@@ -28,6 +28,9 @@
self._node = self._repo.lookup(changeid)
self._rev = self._repo.changelog.rev(self._node)
+ def __str__(self):
+ return short(self.node())
+
def __repr__(self):
return "<changectx %s>" % short(self.node())
@@ -126,6 +129,9 @@
else:
raise AttributeError, name
+ def __str__(self):
+ return "%s@%s" % (self.path(), short(self.node()))
+
def __repr__(self):
return "<filectx %s@%s>" % (self.path(), short(self.node()))