diff options
author | Felipe Contreras <felipe.contreras@gmail.com> | 2013-05-24 21:29:27 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-05-28 07:59:29 -0700 |
commit | e936a5d4842e9bbfeaf5792efc0db5965bf9e7ee (patch) | |
tree | 64b1391ce886f9db879d23aa2692017bfdf44a48 /contrib/remote-helpers | |
parent | 52036431ff630ba9de9430fb6982a6869473d002 (diff) | |
download | git-e936a5d4842e9bbfeaf5792efc0db5965bf9e7ee.tar.gz git-e936a5d4842e9bbfeaf5792efc0db5965bf9e7ee.tar.xz |
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>
Diffstat (limited to 'contrib/remote-helpers')
-rwxr-xr-x | contrib/remote-helpers/git-remote-hg | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/contrib/remote-helpers/git-remote-hg b/contrib/remote-helpers/git-remote-hg index 62520eeb5..07ea104e4 100755 --- a/contrib/remote-helpers/git-remote-hg +++ b/contrib/remote-helpers/git-remote-hg @@ -389,12 +389,16 @@ def export_ref(repo, name, kind, head): revs = xrange(tip, head.rev() + 1) count = 0 - revs = [rev for rev in revs if not marks.is_marked(rev)] - for rev in revs: c = repo[rev] - (manifest, user, (time, tz), files, desc, extra) = repo.changelog.read(c.node()) + node = c.node() + + if marks.is_marked(c.hex()): + count += 1 + continue + + (manifest, user, (time, tz), files, desc, extra) = repo.changelog.read(node) rev_branch = extra['branch'] author = "%s %d %s" % (fixup_user(user), time, gittz(tz)) |