From c614ae776bd023095c91b849f4da268429b79455 Mon Sep 17 00:00:00 2001 From: Frej Drejhammar Date: Fri, 15 Apr 2016 15:46:47 +0200 Subject: [PATCH] Fix "Branch ... modified outside hg-fast-export..." for sanitized branch names The heads cache contains sanitized names, but we try to look up unsanitized names, this is wrong. Switch to looking up the sanitized name. --- hg-fast-export.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index 325c26d..6a184c1 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -337,8 +337,9 @@ def verify_heads(ui,repo,cache,force,branchesmap): # get list of hg's branches to verify, don't take all git has for _,_,b in l: b=get_branch(b) - sha1=get_git_sha1(sanitize_name(b,"branch",branchesmap)) - c=cache.get(b) + sanitized_name=sanitize_name(b,"branch",branchesmap) + sha1=get_git_sha1(sanitized_name) + c=cache.get(sanitized_name) if sha1!=c: sys.stderr.write('Error: Branch [%s] modified outside hg-fast-export:' '\n%s (repo) != %s (cache)\n' % (b,sha1,c)) -- 2.11.4.GIT