summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrey Rahmatullin <wrar@wrar.name>2014-03-08 18:51:15 +0600
committerAndrey Rahmatullin <wrar@wrar.name>2014-03-08 18:51:15 +0600
commit6e0aab513decc0f61bdeba9f02e17d9772391194 (patch)
tree1257722b4c40df004cb0a1166aeebf954fbfe1be
parent2d1b3ca8f6d2c3c1a4b0cd878fa1c63bce111f8f (diff)
parentf2491e83b038a27bc4a64a34b4bccb557734ab3a (diff)
downloadhg-fast-export-6e0aab513decc0f61bdeba9f02e17d9772391194.tar.gz
Merge tag 'upstream/20140308'
Tag 20140308 snapshot
-rwxr-xr-xhg-fast-export.py12
1 files changed, 11 insertions, 1 deletions
diff --git a/hg-fast-export.py b/hg-fast-export.py
index 1fe2999..59d225f 100755
--- a/hg-fast-export.py
+++ b/hg-fast-export.py
@@ -268,8 +268,18 @@ def load_authors(filename):
sys.stderr.write('Loaded %d authors\n' % l)
return cache
+def branchtip(repo, heads):
+ '''return the tipmost branch head in heads'''
+ tip = heads[-1]
+ for h in reversed(heads):
+ if not repo[h].closesbranch():
+ tip = h
+ break
+ return tip
+
def verify_heads(ui,repo,cache,force):
- branches=repo.branchtags()
+ branches={bn: branchtip(repo, heads)
+ for bn, heads in repo.branchmap().iteritems()}
l=[(-repo.changelog.rev(n), n, t) for t, n in branches.items()]
l.sort()