remote-hg: improve node traversing

We won't be able to count the unmarked commits, but we are not going to be able to do that anyway when we switch to SHA-1 ids. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed May 24, 2013 at 21:29 UTC e936a5d4842e9bbfeaf5792efc0db5965bf9e7ee
1 file changed +7 -3
contrib/remote-helpers/git-remote-hg
+7 -3
@@ -389,12 +389,16 @@ def export_ref(repo, name, kind, head):
389 revs = xrange(tip, head.rev() + 1)
390 count = 0
391
392 - revs = [rev for rev in revs if not marks.is_marked(rev)]
393 -
392 for rev in revs:
393
394 c = repo[rev]
397 - (manifest, user, (time, tz), files, desc, extra) = repo.changelog.read(c.node())
395 + node = c.node()
396 +
397 + if marks.is_marked(c.hex()):
398 + count += 1
399 + continue
400 +
401 + (manifest, user, (time, tz), files, desc, extra) = repo.changelog.read(node)
402 rev_branch = extra['branch']
403
404 author = "%s %d %s" % (fixup_user(user), time, gittz(tz))