SVN状态:这些状态代表什么意思?

3

当我将主干分支与我的分支合并以获取最新更改后,我将我的分支合并到主干分支中。然后进行了svn st操作,以下是其中一部分输出结果,让我感到困惑:

R  +    path/to/dirA
M      path/to/dirB

我还为我添加的目录获得了“A”状态,这一点我理解。但是,我不理解上面的状态,尤其是这些目录没有进行任何更改。当我对其中一个目录执行svn diff时,我收到了“路径/到/dirA上的属性更改”的代码提示。
1个回答

13
"

svn help status实际上非常好。

我将粘贴相关片段:

"
First column: Says if item was added, deleted, or otherwise changed
  ' ' no modifications
  'A' Added
  'C' Conflicted
  'D' Deleted
  'I' Ignored
  'M' Modified
  'R' Replaced
  'X' an unversioned directory created by an externals definition
  '?' item is not under version control
  '!' item is missing (removed by non-svn command) or incomplete
  '~' versioned item obstructed by some item of a different kind

Second column: Modifications of a file's or directory's properties
  ' ' no modifications
  'C' Conflicted
  'M' Modified

Fourth column: Scheduled commit will contain addition-with-history
  ' ' no history scheduled with commit
  '+' history scheduled with commit

Seventh column: Whether the item is the victim of a tree conflict
  ' ' normal
  'C' tree-Conflicted
第一个方法是将目录替换为副本(或移动)。例如:
svn rm path/to/dirA
svn cp path/to/someOtherDir path/to/dirA

第二个可能是属性修改,因为它是一个目录,而目录的第一列不能有M,因为那意味着对文本进行修改。看起来开头缺少了一列,可能是一个空格。
svn diff在显示树形更改方面不太好,因为默认情况下它输出unidiff,而unidiff没有提供指定树形更改的方法。然而,svn diff --git做得更好,因为git格式提供了指定树形更改的方法。
考虑到您在合并后的问题,我猜您想知道这些是否是成功的合并。合并需要查找冲突,这将显示在第一、第二或第七列中。第一列是文本冲突,第二列是属性冲突,第七列是树冲突。
SVN 1.8发布时,在状态下的树形修改下还会显示注释,以说明节点来自何处或移动到何处。

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接