覆盖另一个 Subversion 存储库中的某些文件

发布于 2024-09-07 23:06:26 字数 976 浏览 6 评论 0原文

我正在寻找一种方法,使 Subversion 存储库基本上成为另一个 Subversion 存储库的副本,除了我想要覆盖的其他存储库中的一些文件。

基本上,我想实现这样的目标:(

/
- branches/
  - mybranch/ = if files are added in /trunk, they get added here
    - file1 = latest rev of /trunk/file1
    - file2 = latest rev of /trunk/file2
    - file3 = unique, versioned file that belongs to mybranch only
    - dir1/ = if files are added in /trunk/dir1, they get added here
      - file4 = latest rev of /trunk/dir1/file4
      - file5 = unique, versioned file that belongs to mybranch only
- trunk/
  - file1
  - file2
  - file3
  - dir1/
    - file4
    - file5

这都在同一个存储库上,但这不应该相关) 最终目标是,当有人检查 mybranch 时,他们会获得所有代码(trunk + mybranch 包含的差异),而不仅仅是特定于 mybranch 的代码。 最有吸引力的解决方案是使用 svn:externals,但它可以在目录上工作吗? (也就是说,如果一个名为 file6 的文件被添加到 trunk,它也会自动添加到 mybranch 吗?)

如果分支不是正确的方法,那么会怎样?是? (我不是要求使用分支的正确方法,而是要求获得我所描述的内容的正确方法,无论它是否涉及分支。)

I'm looking at a way to have a subversion repository to be basically a copy of another subversion repository, except a few files from the other repository that I want to override.

Basically, I would want to achieve something like this:

/
- branches/
  - mybranch/ = if files are added in /trunk, they get added here
    - file1 = latest rev of /trunk/file1
    - file2 = latest rev of /trunk/file2
    - file3 = unique, versioned file that belongs to mybranch only
    - dir1/ = if files are added in /trunk/dir1, they get added here
      - file4 = latest rev of /trunk/dir1/file4
      - file5 = unique, versioned file that belongs to mybranch only
- trunk/
  - file1
  - file2
  - file3
  - dir1/
    - file4
    - file5

(This is all on the same repo, but this shouldn't be relevant)
The final objective being that when someone checks out mybranch, they get all the code (trunk + the differences that mybranch contains), not just the code specific to mybranch.
The most attractive solution would be to use svn:externals, but would it work on directories? (That is, if a file called file6 is added to trunk, would it be added to mybranch automatically too?)

If a branch isn't the correct approach, what would be? (I'm not asking for the correct way to use a branch, I'm asking for the correct way to get what I described, whether it involves a branch or not.)

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

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

发布评论

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

评论(1

猥琐帝 2024-09-14 23:06:26

没有简单的、完全无人值守的方法可以做你想做的事。这样的“过滤器”听起来很诱人。

与您的问题最接近的重复是:
Subversion svn:externals 文件覆盖?

There is no simple completly unattended way of doing what you wish. Such a "filter" sounds tempting though.

Closest thing to a duplicate of your question is this:
Subversion svn:externals file override?

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