2
我有統一比較格式的「cvs diff」輸出(對於項目中的所有文件)。 格式可能是這樣的:用vim查看「cvs diff」輸出在兩列中
Index: somefile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/somefile.cpp,v
retrieving revision 1.19
diff -r1.19 somefile.cpp
31c31
< return "Read line four times";
---
> return "Read line five times";
36c36
< return "Make a bad thing";
---
> return "Make a good thing";
Index: otherfile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/otherfile.cpp,v
retrieving revision 1.19
< ........
---
> ........
,甚至是這樣的:
Index: somefile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/somefile.cpp,v
retrieving revision 1.19
diff -u -r1.19 somefile.cpp
--- somefile.cpp 13 Mar 2013 08:45:18 -0000 1.19
+++ somefile.cpp 26 Mar 2013 08:10:33 -0000
@@ -28,12 +28,12 @@
//---------------------------------------------------------------------------
extern "C" char *FuncGetSomeText()
{
- return "Read line four times";
+ return "Read line five times";
}
//---------------------------------------------------------------------------
extern "C" char *FuncGetAwesomeText()
{
- return "Make a bad thing";
+ return "Make a good thing";
}
//---------------------------------------------------------------------------
Index: otherfile.cpp
===================================================================
RCS file: /CVS_repo/SomeProject/otherfile.cpp,v
retrieving revision 1.19
diff -u -r1.19 otherfile.cpp
--- otherfile.cpp 13 Mar 2013 08:45:18 -0000 1.19
+++ otherfile.cpp 26 Mar 2013 08:10:33 -0000
@@ -28,12 +28,12 @@
//---------------------------------------------------------------------------
extern "C" char *Func()
{
- .......
+ .......
}
//---------------------------------------------------------------------------
有什麼辦法來查看這個文本並排側用vim? 或者也許有可能將cvs中的默認差異工具更改爲vimdiff?
http://stackoverflow.com/questions/26195/vimdiff-and-cvs - 集成 – 2013-03-26 12:41:48
謝謝,但是這個解決方案對我不起作用。我的vim在6.3.71版本中已經過時了。他未知的winsave()函數失敗。我評論winsave/winrestore函數,但是我的vim窗口中沒有任何內容:D vim命令。 – Avega 2013-03-27 06:47:46
你應該回答你自己的問題作爲答案。 – 2013-04-11 16:52:27