Svn:如何签出某些目录并且仍然能够在根目录下更新

发布于 2024-09-29 15:24:26 字数 704 浏览 2 评论 0原文

我在工作中有一个 SVN 项目,如下所示:

存储库

 project
   |-- docs
   |-- scripts
   `-- app
        |-- trunk
        |-- branches
        |     `-- development
        `-- tags
            |-- Release_1.0
            |-- ...
            `-- Release_5.3

我希望我的工作文件夹如下所示:

工作副本

 dir_root
   |-- docs
   |-- scripts
   |-- trunk
   `-- branches
         `-- development

我想从“dir_root/trunk”提交一些代码和“dir_root/docs”同时在一次提交中只有 1 个修订号。

我怎样才能签出以忽略“tags”文件夹并且仍然能够提交到多个目录。

注意

  • 我无法签出所有存储库,因为“标签”包含太多版本。
  • 我尝试使用稀疏目录,但当我尝试提交时,它一直给我这个错误“svn:'/dir_root'不是工作副本”。

I have a SVN project at work that looks like this:

Repository

 project
   |-- docs
   |-- scripts
   `-- app
        |-- trunk
        |-- branches
        |     `-- development
        `-- tags
            |-- Release_1.0
            |-- ...
            `-- Release_5.3

I want my working folder like this:

Working copy

 dir_root
   |-- docs
   |-- scripts
   |-- trunk
   `-- branches
         `-- development

I would like to commit some code from "dir_root/trunk" and "dir_root/docs" simultaneously in one commit to have only 1 revision number.

How can I checkout to ignore the "tags" folder and still be able to commit to multiple directories.

Note:

  • I can't checkout all the repository because "tags" contains too many release.
  • I tried to use sparse directories, but it keep giving me this error "svn: '/dir_root' is not a working copy" when I try to commit.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

無處可尋 2024-10-06 15:24:26

从错误来看,dir_root 下的每个文件夹似乎都是单独签出的。因此dir_root本身并不对应于SVN中的project文件夹。

您可以首先使用 --深度立即数project 检出到 dir_root 中。这将在您的 dir_root 中创建一个类似于 SVN 中的文件夹结构。之后,您可以更新您感兴趣的子文件夹(即 docstrunk 等)。完成此操作后,您可以更改内容并从 dir_root 进行一次提交,其中包含对 dir_root/trunkdir_root/docs 的更改。

From the error it looks like each of the folders under dir_root was checkout separately. Thus dir_root itself does not correspond to project folder in SVN.

You could start by checking out project with --depth immediates into dir_root. This will create a folder structure similar to the one in SVN in your dir_root. After this you can update the sub-folders you are interested in (i.e. docs, trunk, etc.). Once this is done, you can make changes to contents and do a single commit from dir_root which contain changes to dir_root/trunk and dir_root/docs.

不必了 2024-10-06 15:24:26

使用 svn:externals 创建一个具有您提到的结构的目录将解决您的问题。

Creating a dir with svn:externals with the structure you have mentioned will solve your problem.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文