1

我正在尝试将差异上传到审查委员会并收到以下错误

The file '<file_path>' (r<revision>) could not be found in the repository

我使用 svn 作为版本控制工具。提到的文件被移动(重命名),这导致在 svn 中删除,然后从 svn 添加文件。我希望此文件包含在审核中,但不能。

除了从差异中删除文件之外,还有其他解决方法吗?

4

1 回答 1

1

我刚刚遇到了同样的问题,看起来reviewboard 使用了patch 命令并且不支持svn diff 生成的格式。

此外,如果您更改 svn 属性,则在单击评论板中的“查看差异”时会看到以下异常:

Exception: The patch to '<file_path>' didn't apply cleanly. The temporary files have been left in '/tmp/reviewboard.CIjCx6' for debugging purposes.
`patch` returned: patch: **** Only garbage was found in the patch input.


我通过将--patch-compatible参数传递给svn diff. 当创建像这个评论板这样的差异时,它会正确地接受它:

svn diff --patch-compatible

摘自svn help diff

--ignore-properties      : ignore properties during the operation
--show-copies-as-adds    : don't diff copied or moved files with their source
--patch-compatible       : generate diff suitable for generic third-party
                           patch tools; currently the same as
                           --show-copies-as-adds --ignore-properties
于 2014-06-11T16:06:00.077 回答