Mercurial Merge выполнить программу скрипт

Как я могу настроить Mercurial для запуска программы слияния, когда конфликт между двумя головами и человеческое слияние требуется?

Я использую Mercurial и HgSccPackage с Visual Studio. Для слияния и сравнения я использую Devart's CodeCompare.

Журнал показывает:

[Pull started]

pulling from http://localhost:8000/
[Error: warning: conflicts during merge.]
searching for changes
[Error: merging JackPot/JackPotViewer/Application/FrameRender.cpp incomplete! (edit conflicts,       then use 'hg resolve --mark')]
all local heads known remotely
adding changesets
adding manifests
adding file changes
added 1 changesets with 1 changes to 1 files
resolving manifests
calling hook preupdate.eol: <function preupdate at 0x023DA4F0>
couldn't find merge tool codecompare_merge
couldn't find merge tool codecompare_merge
couldn't find merge tool ecmerge
couldn't find merge tool filemerge
couldn't find merge tool gpyfm
couldn't find merge tool kdiff3
couldn't find merge tool meld
couldn't find merge tool bcompare
couldn't find merge tool UltraCompare
couldn't find merge tool araxis
couldn't find merge tool beyondcompare3
couldn't find merge tool diffuse
couldn't find merge tool diffmerge
couldn't find merge tool p4merge
couldn't find merge tool tkdiff
couldn't find merge tool tortoisemerge
couldn't find merge tool xxdiff
couldn't find merge tool gvimdiff
couldn't find merge tool vimdiff
couldn't find merge tool winmerge
couldn't find merge tool merge
couldn't find merge tool hgmerge
merging JackPot/JackPotViewer/Application/FrameRender.cpp
0 files updated, 0 files merged, 0 files removed, 1 files unresolved
use 'hg resolve' to retry unresolved file merges

[Operation completed. Exit code: 1]

Мой Mercurial.ini это:

[ui]
username=diego martinez <diego.martinez@pictel.es>
ignore=C:\Users\diego\Documents\hgignore_global.txt
merge=codecompare_merge

[extensions]
eol=
extdiff=

[merge-tools]
codecompare_merge.regkey=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CodeCompare_is1
codecompare_merge.regname=InstallLocation
codecompare_merge.regappend=CodeMerge.exe
codecompare_merge.args=/SC=Hg /TF=$other /MF=$local /RF=$output /BF=$base /TT="Other: $other"     /MT="Local: $local" /RT="Output: $output" /BT="Base: $base"
codecompare_merge.binary=False
codecompare_merge.gui=True
codecompare_merge.checkconflicts=True
codecompare_merge.premerge=Keep


[extdiff]
cmd.codecompare=C:\Program Files\Devart\Code Compare\CodeCompare.exe
opts.codecompare=/SC=Hg /W /title1="$plabel1" /title2="$clabel" $parent $child

[merge-patterns]
*.*=codecompare_merge

[http_proxy]
host=
no=
user=
passwd=

1 ответ

Решение

В ваших настройках вы определяете два инструмента, но только успешно указали путь для одного.

Вы определили codecompare в качестве внешнего инструмента сравнения. Я предполагаю, что он работает правильно, когда вы пытаетесь посмотреть на разницу между двумя версиями файла, например hg codecompare -r "tip^:tip" file.txt

Второй инструмент codecompare_merge который вы определили место установки, используя набор ключей:

codecompare_merge.regkey=SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\CodeCompare_is1
codecompare_merge.regname=InstallLocation
codecompare_merge.regappend=CodeMerge.exe

Это говорит hg, чтобы посмотреть в реестре HKEY_CURRENT_USER (а потом HKEY_LOCAL_MACHINE) для регки Install Location а затем добавляет CodeMerge.exe к нему, чтобы получить исполняемый путь. Я предполагаю, что где-то там есть ошибка.

Вы должны быть в состоянии заменить эти три параметра следующими, чтобы они соответствовали настройке в diff раздел:

codecompare_merge.executeable=C:\Program Files\Devart\Code Compare\CodeCompare.exe

Проверьте более подробную информацию на сайте Selenic.

Другие вопросы по тегам