mirror of
https://github.com/mnauw/git-remote-hg.git
synced 2025-10-26 06:06:06 +01:00
check-versions: add hack for hg-git 0.8.x
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>
This commit is contained in:
@@ -216,7 +216,13 @@ end
|
||||
|
||||
add_component(:hg, 'https://www.mercurial-scm.org/repo/hg', checkout_fix: hg_checkout_fix)
|
||||
|
||||
add_component(:hggit, 'https://bitbucket.org/durin42/hg-git')
|
||||
hggit_checkout_fix = lambda do |version|
|
||||
return unless check_version(version, '0.8.0')
|
||||
|
||||
run_cmd %W[hg import -q --no-commit #{__dir__}/hggit_rename_fix_0.8.0.patch], fatal: false
|
||||
end
|
||||
|
||||
add_component(:hggit, 'https://bitbucket.org/durin42/hg-git', checkout_fix: hggit_checkout_fix)
|
||||
|
||||
add_component(:dulwich, 'https://github.com/dulwich/dulwich.git', version_format: 'dulwich-%s', kind: :git)
|
||||
|
||||
|
||||
22
tools/hggit_rename_fix_0.8.0.patch
Normal file
22
tools/hggit_rename_fix_0.8.0.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
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
|
||||
|
||||
@@ -10,3 +10,24 @@ hg:2.9 hggit:0.4.0 dulwich:0.9.0 # 2013_02
|
||||
hg:3.0 hggit:0.7.0 dulwich:0.10.0 # 2014_11
|
||||
hg:3.1 hggit:0.7.0 dulwich:0.10.0 # 2014_11
|
||||
hg:3.2 hggit:0.7.0 dulwich:0.10.0 # 2014_11
|
||||
|
||||
hg:3.3 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.4 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.5 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.6 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.7 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.8 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
hg:3.9 hggit:0.8.4 dulwich:0.13.0 # 2016_01
|
||||
|
||||
hg:4.0 hggit:0.8.10 dulwich:0.18.0 # 2017_11
|
||||
hg:4.1 hggit:0.8.10 dulwich:0.18.0 # 2017_11
|
||||
hg:4.2 hggit:0.8.10 dulwich:0.18.0 # 2017_11
|
||||
hg:4.3 hggit:0.8.10 dulwich:0.18.0 # 2017_11
|
||||
hg:4.4 hggit:0.8.10 dulwich:0.18.0 # 2017_11
|
||||
|
||||
hg:4.5 hggit:0.8.11 dulwich:0.18.0 # 2018_02
|
||||
hg:4.6 hggit:0.8.12 dulwich:0.19.7 # 2018_10
|
||||
hg:4.7 hggit:0.8.12 dulwich:0.19.7 # 2018_10
|
||||
hg:4.8 hggit:@ dulwich:0.19.11
|
||||
hg:4.9 hggit:@ dulwich:0.19.11
|
||||
hg:5.0 hggit:@ dulwich:0.19.11
|
||||
|
||||
Reference in New Issue
Block a user