简体   繁体   English

对SVN diff命令的输出感到困惑

[英]confused about the output of SVN diff command

I'm not a svn guru so sorry for the simple question. 我不是svn专家,所以对这个简单的问题感到抱歉。

Now, when I write a svn diff -r 1:2 file:///home/svn/myproject/cs112 I've expected It gives me the differences between revision1 of cs112 and revision 2. However the output of this commad is : 现在,当我编写svn diff -r 1:2 file:///home/svn/myproject/cs112我期望它会给我CS112的修订版1和修订版2之间的区别。但是,此命令的输出为:

Index: lab1/firstFile.c
===================================================================
--- lab1/firstFile.c    (revision 0)
+++ lab1/firstFile.c    (revision 2) 
@@ -0,0 +1,6 @@
+#include "stdio.h"
+int main
+{
+printf("first sentence");
+}

Why it writes (revision 0) and (revision 2) ?? 为什么写(修订版0)和(修订版2)? and also what is the meaning of @@ -0,0 +1,6 @@ ?? @@ -0,0 +1,6 @@的含义是什么? thanks in advance 提前致谢

The file in question did not exist in revision 1 (it was probably added at revision 2). 该文件在修订版1中不存在(可能已在修订版2中添加)。

You do not have to worry about the exact meaning of the @@ strings, it just helps svn to locate the changes. 您不必担心@@字符串的确切含义,它仅有助于svn查找更改。 In fact, it denotes the position (line number and number of following lines) in the file where the changes happened. 实际上,它表示更改发生在文件中的位置(行号和后几行)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM