##// END OF EJS Templates
context: add __repr__ methods
Matt Mackall -
r3151:6719b3dd default
parent child Browse files
Show More
@@ -28,6 +28,9 b' class changectx(object):'
28 self._node = self._repo.lookup(changeid)
28 self._node = self._repo.lookup(changeid)
29 self._rev = self._repo.changelog.rev(self._node)
29 self._rev = self._repo.changelog.rev(self._node)
30
30
31 def __repr__(self):
32 return "<changectx %s>" % short(self.node())
33
31 def changeset(self):
34 def changeset(self):
32 try:
35 try:
33 return self._changeset
36 return self._changeset
@@ -120,6 +123,9 b' class filectx(object):'
120 else:
123 else:
121 raise AttributeError, name
124 raise AttributeError, name
122
125
126 def __repr__(self):
127 return "<filectx %s:%s>" % (self.path(), short(self.node()))
128
123 def filerev(self): return self._filerev
129 def filerev(self): return self._filerev
124 def filenode(self): return self._filenode
130 def filenode(self): return self._filenode
125 def filelog(self): return self._filelog
131 def filelog(self): return self._filelog
General Comments 0
You need to be logged in to leave comments. Login now