From: Kyle J. McKay Date: Sat, 15 Mar 2014 04:06:53 +0000 (-0700) Subject: hg-fast-export.py: restore compatibility with older python X-Git-Tag: v160415~31 X-Git-Url: https://repo.or.cz/w/fast-export.git/commitdiff_plain/728716375b3d47ab45f23dabc02c32424c9328f4 hg-fast-export.py: restore compatibility with older python Since hg runs and supports older versions of python, hg-fast-export.py should too. Replace dictionary comprehension with equivalent code that supports versions of python older than 2.7. --- diff --git a/hg-fast-export.py b/hg-fast-export.py index 59d225f..37ade95 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -278,8 +278,9 @@ def branchtip(repo, heads): return tip def verify_heads(ui,repo,cache,force): - branches={bn: branchtip(repo, heads) - for bn, heads in repo.branchmap().iteritems()} + branches={} + for bn, heads in repo.branchmap().iteritems(): + branches[bn] = branchtip(repo, heads) l=[(-repo.changelog.rev(n), n, t) for t, n in branches.items()] l.sort()