3

在我将一个主干合并到我的分支以获取最新更改后,我将我的分支合并到了主干。然后做了一个 snv st,这是让我困惑的输出的一部分:

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

我还获得了我理解的添加目录的“A”状态。但我不明白的只是上面的状态,特别是这些目录没有进行任何更改。当我在其中一个目录上执行 svn diff 时,我得到了Property changes on: path/to/dirA

4

1 回答 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 输出,没有提供指定树变化的方法。但是svn diff --git做得更好,因为 git 格式确实提供了指定树的更改。

鉴于您在合并后提出的问题,我猜您想知道这些合并是否成功。使用合并寻找的东西是冲突,它将在第一列、第二列或第七列中显示为 C。第一列是文本冲突,第二列是属性冲突,第七列是树冲突。

SVN 1.8 发布时还会在树修改状态下显示注释,如果它是移动的一部分,它将说明节点来自哪里或去哪里。

于 2013-02-23T06:14:24.107 回答