remote-hg: fix compatibility with older versions of hg
Turns out repo.revs was introduced quite late, and it doesn't do anything fancy for our refspec; only list all the numbers in that range. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Jeff King <peff@peff.net>
Felipe Contreras committed
Nov 12, 2012 at 18:41 UTC
cc8433fad1f64ffaa9c1b8274c79f14419c42f78
1 file changed
+1
-1
contrib/remote-helpers/git-remote-hg
+1
-1
@@ -294,7 +294,7 @@ def export_ref(repo, name, kind, head):
294
if tip and tip == head.rev():
295
# nothing to do
296
return
297
- revs = repo.revs('%u:%u' % (tip, head))
297
+ revs = xrange(tip, head.rev() + 1)
298
count = 0
299
300
revs = [rev for rev in revs if not marks.is_marked(rev)]