[英]How to check out a deleted project from an SVN on the command line
我正在嘗試檢查在修訂版401中從我的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>
我可以通過Web瀏覽器輕松瀏覽到修訂版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 co --depth=infinity https://svn.domain.com/repos/trunk/OldProject@400
-r 400
https://svn.domain.com/repos/trunk/OldProject@400
: https://svn.domain.com/repos/trunk/OldProject@400
... --non-interactive --trust-server-cert
樣品
因為OP堅持堅持正確而不是RTFM並嘗試
前提條件: http ://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Greetings在當前的HEAD中不存在,但是在r16中
svn co -r 16 http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Greetings
svn: E160013: '/svn/Hello/!svn/rvr/37/branches/Greetings' path not found
svn co http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/Greetings@16
A Greetings\Hello.txt
U Greetings
Checked out revision 16.
svn co -r=16 http://mayorat.ursinecorner.ru:8088/svn/Hello/branches/
svn: E205000: Syntax error in revision argument '=16'
>dir /b
Greetings
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.