changeset 5131:2f9edf6bae95

convert: only get history for requested revs when converting hg repo
author Bryan O'Sullivan <bos@serpentine.com>
date Mon, 06 Aug 2007 14:16:50 -0700
parents 462cc56d898f
children 78eb03cbe535
files hgext/convert/hg.py
diffstat 1 files changed, 4 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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: