Skip to content

Commit

Permalink
remote-hg: make sure we omit multiple heads
Browse files Browse the repository at this point in the history
We want to ignore secondary heads, unfortunately the simplest way to do
that is not available for older versions of Mercurial.

Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
  • Loading branch information
felipec committed Apr 23, 2014
1 parent de28e87 commit fbaae8c
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion git-remote-hg.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,11 @@ def export_ref(repo, name, kind, head):
except:
tip = 0

revs = xrange(tip, head.rev() + 1)
if check_version(2, 1):
revs = repo.revs('%u::%u' % (tip, head))
else:
revs = xrange(tip, head.rev() + 1)

total = len(revs)

for rev in revs:
Expand Down

0 comments on commit fbaae8c

Please sign in to comment.