如何访问新 Subversion 存储库的主干目录? [英] How can I access the trunk directory of a new Subversion repository?

查看:28
本文介绍了如何访问新 Subversion 存储库的主干目录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个 Subversion 存储库以及 branchestagstrunk 目录:

I created a Subversion repository along with branches, tags and trunk directories with:

svnadmin create file:///home/user/public_html/repo/myrepo
svn mkdir file:///home/user/public_html/repo/myrepo/tags -m "tags created"
svn mkdir file:///home/user/public_html/repo/myrepo/branches -m "branches created"
svn mkdir file:///home/user/public_html/repo/myrepo/trunk -m "trunk created"

这样做后,为什么在/home/user/public_html/repo/myrepo中看不到我的trunk目录?当我运行命令 svn ls -R file:///home/user/public_html/repo/myrepo/ 时,我可以看到它.

After doing this, why can't see my trunk directory in /home/user/public_html/repo/myrepo? When I run the command svn ls -R file:///home/user/public_html/repo/myrepo/, I can see it.

我需要查看主干目录,因为我想创建一个符号链接来在线处理应用程序:

I need to see the trunk directory because I want to create a symlink to work on the app online:

ln -s /home/user/public_html/repo/myrepo/trunk /home/user/public_html/dev/

如何使主干文件夹可见?

How can I make the trunk folder visible?

推荐答案

使用 svnadmin create 创建的存储库目录本质上是一个数据库,Subversion 在其中存储有关文件及其版本的信息.

The repository directory created with svnadmin create is essentially a database where Subversion stores information about files and their versions.

要访问存储库中包含的文件,您需要使用 svn checkout 命令检出工作副本.例如,以下命令会将您创建的存储库检出到名为 /home/user/public_html/working 的目录:

To access the files contained within the repository, you need to check out a working copy using the svn checkout command. For example, the following command will check out the repository you created to a directory named /home/user/public_html/working:

svn checkout file:///home/user/public_html/repo/myrepo /home/user/public_html/working

签出存储库后,/home/user/public_html/working 目录将包含 trunkbranches标签 子目录,然后您可以创建一个符号链接:

After checking out the repository, the /home/user/public_html/working directory would contain trunk, branches and tags subdirectories and you could then create a symlink:

ln -s /home/user/public_html/working/trunk /home/user/public_html/dev/

有关更多信息,我建议您阅读 Version Control with Subversion 一书(特别是基本概念基本用法章节).

For further information, I'd recommend reading the Version Control with Subversion book (in particular the Fundamental Concepts and Basic Usage chapters).

这篇关于如何访问新 Subversion 存储库的主干目录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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