我正在嘗試檢出從修訂版401中的SVN中刪除的項目。該項目現已停用,並已完全替換爲重寫了代碼,但我想做一個結賬,以便在重寫時可以回頭看看舊代碼的小部分。如何在命令行中檢出SVN中已刪除的項目
據我所知,這應該像檢查舊的路徑和最後的良好修訂(400)一樣簡單。但是,當我嘗試這個,我得到一個錯誤,因爲它試圖使用最新版本:
C:\Users\couling\workspace>svn checkout --revision=400 https://svn.domain.com/repos/trunk/OldProject
Error validating server certificate for 'https://svn.domain.com:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: svn.domain.com
- Valid: from Tue, 11 Dec 2012 15:03:33 GMT until Wed, 11 Dec 2013 15:03:33 GMT
- Issuer: Personal Certificate, Foomy Whatsit, Blah, Blah, GB
- Fingerprint: 01:02:03:04:05:06:07:08:09:10:11:12:13:14:15:16:17:18:19:20
(R)eject, accept (t)emporarily or accept (p)ermanently? t
svn: '/repos/!svn/bc/1418/trunk/OldProject' path not found
C:\Users\couling\workspace>
我可以很容易地通過網絡瀏覽器瀏覽到該文件夾的修改400,從而在最壞的情況下,我仍然可以查看代碼,但我更願意爲我的IDE提供所有源文件的副本。
僅供參考我使用這個版本的客戶端:
C:\Users\couling\workspace>svn --version
svn, version 1.6.16 (r1073529)
compiled Mar 8 2011, 11:47:41
Copyright (C) 2000-2009 CollabNet.
Subversion is open source software, see http://subversion.apache.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).
如何檢查出已經被刪除的文件夾?
編輯
爲免除疑問.... checkout命令以上使用的語法--revision=400
,因爲這恰好是最後的辦法,我發佈前寫的命令。鑑於svn命令使用與GNU getopt_long兼容的庫,這是有效的語法。我使用的版本確實如下並且以下都是同義詞-r 400
-r400
--revision 400
--revision=400
。 getopt庫將不同的變體都縮減爲單個結果。
發生這種情況的原因是我發佈之前使用的最後一條命令是我檢查了所有變體以確認它與此問題無關。他們都有同樣的結果。
可能重複@在SVN嗎?](http://stackoverflow.com/questions/15504743/whats-the-difference-between-r-and-urlrev-in-svn) – n611x007 2015-04-21 13:54:32