如何用工作副本填充新存储库
我签出了一个工作副本和一个新的空存储库。如何使用工作副本填充新存储库?
我无法访问原始 SVN。
我可以删除所有 .svn 目录并执行 svn commit ,但我想知道一些更聪明的方法。
感谢您的提示。
I have a working copy checked out and a new empty repository. How can I fill that new repository using the working copy?
I don't have access to the original SVN.
I could delete all .svn
dirs and do svn commit
, but I'm wondering about some smarter way.
Thanks for tips.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
如果您想要不带“.svn”文件的存储库副本,您可以执行
svn export
。这将为您提供一份干净的代码副本。然后,您只需执行svn import
或svn add
即可将这些文件添加到新存储库中。当然,所有版本历史记录都会丢失,但这就是您创建新存储库时发生的情况!If you want a copy of the repository WITHOUT the ".svn" files, you can do
svn export
. This will give you a clean copy of the code. Then you simply need to do ansvn import
or ansvn add
to get those files into your new repository. Of course, all version history will be lost, but that's what happens when you create a new repository!我不会删除这些 .svn 目录,直到我收集了其中的所有 svn 属性;如果您不维护
svn:keywords
属性,当您的$Id: $
或$Revision: $
或类似属性时,您可能会感到惊讶标签丢失,或者您依赖 crlf 自动修改在 Windows 和 Unix 机器之间工作。I wouldn't delete those .svn directories until I had gathered all the svn properties out of them; if you don't maintain the
svn:keywords
properties, you might be surprised when your$Id: $
or$Revision: $
or similar tags go missing, or you rely on the crlf-automatic munging to work between Windows and Unix machines.如果您的服务器位置发生变化,
svn switch
就是您的好帮手。此外,svn import
可以帮助您将未版本控制的文件导入到新存储库。但是,如果您想导入到包含所有 Subversion 元数据和历史记录的干净存储库,您将需要创建第一个存储库的转储(作为管理员,不幸的是您提到过,您没有访问权限)和 svnadmin加载它。
If there's a change to your server location,
svn switch
is your friend. Also,svn import
can help you to import unversioned files to a new repository.However, if you want to IMPORT to a clean repository with all Subversion metadata and history, you will need to create a dump of your first repository (as an administrator, which unfortunately you mentioned, you do not have access) and
svnadmin load
it.