如何在命令行上从SVN中检出已删除的项目 [英] How to check out a deleted project from an SVN on the command line

查看:165
本文介绍了如何在命令行上从SVN中检出已删除的项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图签出一个项目,从我的SVN修订版本401中删除。该项目现在已经停用,并已完全替换为重写的代码,但我想做一个检查,使我可以在重写时重新参考旧代码的小块。



据我所知,这应该像检出旧路径一样简单,最后好的修订(400)。但是当我尝试这个我得到一个错误,因为它试图使用最新的修订:

  C:\Users\ couling\workspace> svn checkout --revision = 400 https://svn.domain.com/repos/trunk/OldProject 
验证https://svn.domain.com:443的服务器证书时出错:
- 证书不是由信任的颁发机构颁发的。使用
指纹手动验证证书!
证书信息:
- 主机名:svn.domain.com
- 有效期:从星期二,11 Dec 2012 15:03:33 GMT至Wed,11 Dec 2013 15:03:33 GMT
- 发行商:个人证书,Foomy Whatsit,Blah,Blah,GB
- 指纹:01:02:03:04:05:06:07:08:09:10:11:12:13 :14:15:16:17:18:19:20
(R)弹出,接受(t) t
svn:'/ repos /!svn / bc / 1418 / trunk / OldProject'找不到路径

C:\Users\couling\workspace>

我可以通过网络浏览器轻松地浏览到修订版本400的文件夹,所以在最坏的情况下,我可以仍然查看代码,但我更喜欢有一个所有的源文件的副本为我的IDE。



我正在使用此版本的客户端:

  C:\Users\couling\workspace> svn --version 
svn,版本1.6.16(r1073529)
编译时间2011年3月8日,11:47:41

版权所有(C)2000-2009 CollabNet。
Subversion是开源软件,请参阅http://subversion.apache.org/
本产品包括由CollabNet开发的软件(http://www.Collab.Net/)。

如何检出已删除的文件夹?



编辑



为了消除疑问....上面的checkout命令使用语法 - revision = 400 ,因为这恰好是我在发布前写的命令的最后一种方式。这是有效的语法,因为svn命令使用与GNU getopt_long兼容的库。我使用的版本和以下都是同义的 -r 400 -r400 - 修订400 - revision = 400 。不同的变体都被getopt库简化为单个结果。



因为它发生的原因是我在发布之前使用的最后一个命令是,我经历了所有变体以确认它与此问题无关。它们都有相同的结果。

解决方案

svn co --depth = infinity https:// svn .domain.com / repos / trunk / OldProject @ 400



查看 SVNBook | Peg and Operative Revisions


I'm trying to checkout a project that was deleted from my SVN in revision 401. The project is now defunct and had been completely replaced with a rewrite of the code, but I'd like to do a checkout so that I can refer back to small pieces of the old code while working on the rewrite.

As far as I can tell, this should be as simple as checking out the old path and the last good revision (400). But when I try this I get an error, because it's trying to use the latest revision:

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>

I can easily browse to the folder at revision 400 through a web browser so in the worst case I can still view the code, but I'd prefer to have a copy of all the source files to hand for my IDE.

For reference I'm using this version of the client:

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/).

How do I check out a folder that has now been deleted?

Edit

For the removal of doubt.... The checkout command above uses the syntax --revision=400 as this happened to be the last way I wrote the command before posting. This is valid syntax given that the svn command uses a library compatible with the GNU getopt_long. The version I use does and the following are all synonymous -r 400 -r400 --revision 400 --revision=400. The different variants are all reduced to a single result by the getopt library.

As it happens the reason that was the last command I used before posting was that I went through all variants to confirm it was not related to this issue. They all had the same result.

解决方案

svn co --depth=infinity https://svn.domain.com/repos/trunk/OldProject@400

See "SVNBook | Peg and Operative Revisions".

这篇关于如何在命令行上从SVN中检出已删除的项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆