convert: only get history for requested revs when converting hg repo
authorBryan O'Sullivan <bos@serpentine.com>
Mon, 06 Aug 2007 14:16:50 -0700
changeset 5131 2f9edf6bae95
parent 5130 462cc56d898f
child 5132 78eb03cbe535
convert: only get history for requested revs when converting hg repo
hgext/convert/hg.py
--- a/hgext/convert/hg.py	Mon Aug 06 14:16:02 2007 -0700
+++ b/hgext/convert/hg.py	Mon Aug 06 14:16:50 2007 -0700
@@ -134,7 +134,10 @@
         return self.lastctx
 
     def getheads(self):
-        return [hex(node) for node in self.repo.heads()]
+        if self.rev:
+            return [hex(self.repo.changectx(self.rev).node())]
+        else:
+            return [hex(node) for node in self.repo.heads()]
 
     def getfile(self, name, rev):
         try: