1

2 つのヘッドが競合し、人間によるマージが必要な場合に、マージ プログラムをポップアップするように Mercurial を設定するにはどうすればよいですか?

私は、Visual Studio で Mercurial と HgSccPackage を使用しています。Devart の CodeCompare を使用して im をマージおよび比較します。

ログには次のように表示されます。

[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=
4

1 に答える 1

1

設定では、2 つのツールを定義していますが、1 つのパスのみが正常に指定されています。

codecompare外部差分ツールとして定義しました。たとえば、ファイルの 2 つのバージョンの違いを調べようとすると、正しく機能していると想定しています。hg codecompare -r "tip^:tip" file.txt

2 番目のツールは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)のレジストリで regkey を検索し、Install Locationそれに追加CodeMerge.exeして実行可能パスを取得するように指示します。私の推測では、どこかにエラーがあると思います。

diffこれらの 3 つの設定を、セクションの設定と一致するように次のように置き換えることができます。

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

Selenic のサイトで詳細を確認してください。

于 2014-11-11T16:32:20.157 に答える