我想配置Visual Studio默认情况下打开Beyond Compare作为diff工具.我怎样才能做到这一点?
我成功地让git启动Beyond Compare 3作为diff工具,但是当我做差异时,我正在比较的文件没有被加载.只加载了最新版本的文件而没有其他内容,因此Beyond Compare右侧窗格中没有任何内容.
我正在使用带有Beyond Compare 3的Cygwin运行git 1.6.3.1.我已经设置了超出比较,因为他们在他们的网站的支持部分建议用这样的脚本:
#!/bin/sh
# diff is called by git with 7 parameters:
# path old-file old-hex old-mode new-file new-hex new-mode
"path_to_bc3_executable" "$2" "$5" | cat
Run Code Online (Sandbox Code Playgroud)
有没有其他人遇到过这个问题并知道解决方案?
编辑:
我已经按照VonC的建议,但我仍然遇到与以前完全相同的问题.我是Git的新手,所以也许我没有正确使用差异.
例如,我试图用这样的命令在文件上看到diff:
git diff main.css
然后将打开Beyond Compare,只显示左窗格中的当前main.css,右窗格中没有任何内容.我希望在左窗格中看到我当前的main.css与HEAD相比,基本上我最后提交的内容.
我的git-diff-wrapper.sh看起来像这样:
#!/bin/sh
# diff is called by git with 7 parameters:
# path old-file old-hex old-mode new-file new-hex new-mode
"c:/Program Files/Beyond Compare 3/BCompare.exe" "$2" "$5" | cat
Run Code Online (Sandbox Code Playgroud)
我的git配置对于Diff看起来像这样:
[diff]
external = c:/cygwin/bin/git-diff-wrapper.sh
Run Code Online (Sandbox Code Playgroud) 我使用Beyond Compare(版本3.1.10)来比较不同版本的Delphi表单文件,但我不希望看到有关ExplicitTop,ExplicitLeft,ExplicitHeight和ExplicitWidth的差异.
细节:这些行总是以许多空白字符开头,然后是"ExplicitXXX ="和一个数字.旧版本的Delphi没有这些行,所以我想忽略这些行添加到最新版本的差异,我也想忽略数字发生变化的差异.
有谁知道如何做到这一点?
编辑:复制(或多或少):
在Windows中,我可以使用winmerge作为hg的外部差异工具,使用mercurial.ini等.
使用你可以在网上找到的一些选项开关(我认为这是一个日本网站)无论如何,这里举例如下:
hg winmerge -r1 -r2
将在winmerge中列出rev1和rev2之间的文件更改.我可以点击哪个文件来区分
但对于bc3:
hg bcomp -r1 -r2
将使bc3打开一个对话框,表明无法找到临时目录.
我能用bc3和hg做的最多的是
hg bcomp -r1 -r2 myfile.cpp
这将打开myfile.cpp的rev1和rev2之间的差异
因此,似乎hg + bc3无法成功确认所有文件在修订之间发生变化.一次只能传播1个文件.
谁能更好地使用bc3 + hg?
编辑:问题解决了!
从http://www.scootersoftware.com/support.php?zz=kb_vcs.php>scooter支持页面获得解决方案.我必须使用bcompare而不是bcomp 这里是我的mercurial.ini的片段
[extensions] hgext.win32text = ;mhd adds hgext.extdiff = ;mhd adds for bc [extdiff] cmd.bc3 = bcompare opts.bc3 = /ro ;mhd adds for winmerge ;[extdiff] ;cmd.winmerge = WinMergeU ;opts.winmerge = /r /e /x /ub
最初的问题是"如何将WinMerge配置为TFS的比较和合并工具".但是,我正在改变它,因为TehOne回答了这个问题的更一般形式.
虽然我会在Stackoverflow上已经提出过这个问题.我在其他地方找到了答案,但我在这里问/回答.它现在是一个社区维基.
当我们与Beyond Compare合并时,每个冲突都会有一个"Take Left"或"Take Right"选项..有没有办法做一个"为所有冲突留下来"?我在其他合并工具中已经看过这个(Kidff3有它),但我在Beyond Compare中看不到它.
我想使用超越比较的svn命令行并获得以下输出
文本比较制作:2008年11月16日上午11:45:34
SourceFile,CompareFile,IOriginal,IAdded,IDeleted,IChanged,UOriginal,UAdded,UDeleted,UChanged"E:\ Downloads\eeli\eel\1.c","E:\ Downloads\eeli\eel\2.c",967,192,501,270,368,113,205 ,89
什么是确切的命令行?
我想将Beyond Compare与ClearCase集成,以便我可以使用它来进行差异和合并文件,而不是使用ClearCase提供的糟糕工具.
有没有人有执行此集成的说明?
设置一个新的git repo并添加一些文件:
[Feb-09 18:35][Desktop]$ mkdir exampleForStackOverflow
[Feb-09 18:35][Desktop]$ cd exampleForStackOverflow/
[Feb-09 18:35][exampleForStackOverflow]$ git init
Initialized empty Git repository in ~/Desktop/exampleForStackOverflow/.git/
[Feb-09 18:35][exampleForStackOverflow]$ touch foo.txt
[Feb-09 18:35][exampleForStackOverflow]$ touch bar.txt
[Feb-09 18:35][exampleForStackOverflow]$ touch baz.txt
[Feb-09 18:36][exampleForStackOverflow]$ git add *
[Feb-09 18:36][exampleForStackOverflow]$ git commit -m "Create files"
[master (root-commit) 42bfa60] Create files
3 files changed, 0 insertions(+), 0 deletions(-)
create mode 100644 bar.txt
create mode 100644 baz.txt
create mode 100644 foo.txt
Run Code Online (Sandbox Code Playgroud)
修改文件:
[Feb-09 18:37][exampleForStackOverflow]$ echo "Foo" > foo.txt
[Feb-09 18:37][exampleForStackOverflow]$ echo "Bar" > …
Run Code Online (Sandbox Code Playgroud)