我正在尝试将差异上传到审核委员会并收到以下错误
The file '<file_path>' (r<revision>) could not be found in the repository
我正在使用svn作为版本控制工具。移动(重命名)了上述文件,导致svn删除,然后从svn添加文件。我希望此文件包含在评论中,但不能。
是否有其他解决方法,然后从diff中删除文件?
答案 0 :(得分: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