From: Felipe Contreras Date: Mon, 12 Nov 2012 17:41:06 +0000 (+0100) Subject: remote-hg: fix compatibility with older versions of hg X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc8433fad1f64ffaa9c1b8274c79f14419c42f78;p=git.git 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 Signed-off-by: Jeff King --- diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 7929eec30..bf5e5b473 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -294,7 +294,7 @@ def export_ref(repo, name, kind, head): if tip and tip == head.rev(): # nothing to do return - revs = repo.revs('%u:%u' % (tip, head)) + revs = xrange(tip, head.rev() + 1) count = 0 revs = [rev for rev in revs if not marks.is_marked(rev)]