2013-09-22 103 views
1

我想上傳一個diff審查委員會,並得到以下錯誤上傳diff來reviewboard

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

我使用SVN時「文件 無法在倉庫中找到」錯誤作爲版本控制工具。提到的文件被移動(重命名),導致在svn刪除,然後從svn添加文件。我希望這個文件包含在評論中,但不能。

是否有任何解決方法,然後從diff中刪除文件?

回答

1

我剛剛面臨同樣的問題,它看起來像reviewboard使用補丁命令,並且不支持svn diff生成的格式。

此外,如果你改變的svn屬性,那麼你會在reviewboard「查看差異」,當點擊看到以下異常:

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解決這兩個問題。當創建這樣reviewboard的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