summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfrej <frej.drejhammar@gmail.com>2014-02-14 17:14:12 +0100
committerfrej <frej.drejhammar@gmail.com>2014-02-14 17:14:12 +0100
commitf2491e83b038a27bc4a64a34b4bccb557734ab3a (patch)
tree0c20defe43c5b4a73f028992f232ecb784161d92
parentddae888d31795297bc736e83dc7fba55006637f0 (diff)
parenta4b23c67137e3048f4318325bfe474896ecbd845 (diff)
downloadhg-fast-export-f2491e83b038a27bc4a64a34b4bccb557734ab3a.tar.gz
Merge pull request #22 from TracyWebTech/masterupstream/20140308upstream
Not using branchtags
-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()