mercurial/bundlerepo.py
changeset 16375 d7d64b89a65c
parent 16195 40cc20042fb4
child 16435 df347129305d
--- a/mercurial/bundlerepo.py	Sat Apr 07 15:43:18 2012 -0500
+++ b/mercurial/bundlerepo.py	Sun Apr 08 12:38:02 2012 -0500
@@ -95,15 +95,21 @@
         return mdiff.textdiff(self.revision(self.node(rev1)),
                          self.revision(self.node(rev2)))
 
-    def revision(self, node):
+    def revision(self, nodeorrev):
         """return an uncompressed revision of a given"""
+        if isinstance(nodeorrev, int):
+            rev = nodeorrev
+            node = self.node(rev)
+        else:
+            node = nodeorrev
+            rev = self.rev(node)
+
         if node == nullid:
             return ""
 
         text = None
         chain = []
         iter_node = node
-        rev = self.rev(iter_node)
         # reconstruct the revision if it is from a changegroup
         while self.inbundle(rev):
             if self._cache and self._cache[0] == iter_node: