diff --git a/mercurial/context.py b/mercurial/context.py --- a/mercurial/context.py +++ b/mercurial/context.py @@ -28,6 +28,9 @@ class changectx(object): self._node = self._repo.lookup(changeid) self._rev = self._repo.changelog.rev(self._node) + def __repr__(self): + return "" % short(self.node()) + def changeset(self): try: return self._changeset @@ -120,6 +123,9 @@ class filectx(object): else: raise AttributeError, name + def __repr__(self): + return "" % (self.path(), short(self.node())) + def filerev(self): return self._filerev def filenode(self): return self._filenode def filelog(self): return self._filelog