mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-11-05 02:55:40 +01:00
They made a mistake and broke bidirectionality when debugextrainmessage is used. The upstream report: https://bitbucket.org/durin42/hg-git/issues/281/ Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com>
23 lines
856 B
Diff
23 lines
856 B
Diff
diff --git a/hggit/git_handler.py b/hggit/git_handler.py
|
|
--- a/hggit/git_handler.py
|
|
+++ b/hggit/git_handler.py
|
|
@@ -693,6 +693,8 @@
|
|
def import_git_commit(self, commit):
|
|
self.ui.debug(_("importing: %s\n") % commit.id)
|
|
|
|
+ extra_in_message = self.ui.configbool('git', 'debugextrainmessage', False)
|
|
+
|
|
detect_renames = False
|
|
(strip_message, hg_renames,
|
|
hg_branch, extra) = git2hg.extract_hg_metadata(
|
|
@@ -703,7 +705,8 @@
|
|
# renames detected from Git. This is because we export an extra
|
|
# 'HG:rename-source' Git parameter when this isn't set, which will
|
|
# break bidirectionality.
|
|
- extra['hg-git-rename-source'] = 'git'
|
|
+ if not extra_in_message:
|
|
+ extra['hg-git-rename-source'] = 'git'
|
|
else:
|
|
renames = hg_renames
|
|
|