From b1d1265330673ec32808173498153339e3977a27 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sat, 15 Mar 2014 00:03:28 -0700 Subject: [PATCH] hg-fast-export.py: do not lose file mode changes If the file mode changes (for example from 10644 to 10755), but the actual text of the file itself does not, then the change could be missed since the hashes would remain the same. If the hashes match, also compare the gitmode values before deciding the file is unchanged. --- hg-fast-export.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hg-fast-export.py b/hg-fast-export.py index afcdc46..9155bf9 100755 --- a/hg-fast-export.py +++ b/hg-fast-export.py @@ -59,7 +59,7 @@ def split_dict(dleft,dright,l=[],c=[],r=[],match=file_mismatch): if right==None: # we have the file but our parent hasn't: add to left set l.append(left) - elif match(dleft[left],right): + elif match(dleft[left],right) or gitmode(dleft.flags(left))!=gitmode(dright.flags(left)): # we have it but checksums mismatch: add to center set c.append(left) for right in dright.keys(): -- 2.11.4.GIT