diff --git a/hggit/git_handler.py b/hggit/git_handler.py index c24d2ea1361ba9ddb44418c70fe98f785b75bd65_aGdnaXQvZ2l0X2hhbmRsZXIucHk=..6866ae460ee75f5da13c639d66f117a748bdcea9_aGdnaXQvZ2l0X2hhbmRsZXIucHk= 100644 --- a/hggit/git_handler.py +++ b/hggit/git_handler.py @@ -683,7 +683,8 @@ def import_git_commit(self, commit): self.ui.debug(_("importing: %s\n") % commit.id) + detect_renames = False (strip_message, hg_renames, hg_branch, extra) = git2hg.extract_hg_metadata( commit.message, commit.extra) if hg_renames is None: @@ -686,8 +687,9 @@ (strip_message, hg_renames, hg_branch, extra) = git2hg.extract_hg_metadata( commit.message, commit.extra) if hg_renames is None: - # don't do any rename detection for now + detect_renames = True + # empty dictionary so that code below continues to work renames = {} else: renames = hg_renames @@ -700,7 +702,7 @@ 'please run hg git-cleanup')) # get a list of the changed, added, removed files and gitlinks - files, gitlinks = self.get_files_changed(commit) + files, gitlinks = self.get_files_changed(commit, detect_renames) git_commit_tree = self.git[commit.tree] @@ -1287,7 +1289,7 @@ elif isinstance(obj, Tree): otree = obj - def get_files_changed(self, commit): + def get_files_changed(self, commit, detect_renames): tree = commit.tree btree = None