hg-fast-export.py: support older hg versions
authorKyle J. McKay <mackyle@gmail.com>
Sat, 15 Mar 2014 05:18:08 +0000 (14 22:18 -0700)
committerFrej Drejhammar <frej.drejhammar@gmail.com>
Sun, 16 Mar 2014 15:00:42 +0000 (16 16:00 +0100)
Do not use the closesbranch function as it was added in later
versions of hg.  Use its definition instead.

hg-fast-export.py

index 37ade95..afcdc46 100755 (executable)
@@ -272,7 +272,7 @@ def branchtip(repo, heads):
   '''return the tipmost branch head in heads'''
   tip = heads[-1]
   for h in reversed(heads):
-    if not repo[h].closesbranch():
+    if 'close' not in repo.changelog.read(h)[5]:
       tip = h
       break
   return tip