我可以跟踪具有多个分支目录的 svn 存储库吗
目前,我正在使用一个布局有点不传统的 svn 存储库。有两个目录可能会出现分支。例如:
Project/
Foo/
A/
B/
C/
Support/
Branches/
taskbranch1/
taskbranch2/
taskbranch3/
taskbranch4/
Tags/
在此布局中,实际上并没有指定的“主干”。每个目录“A”、“B”和“C”都是分支,从某种意义上说,它们代表同一产品的多个版本的持续开发,对于开发人员来说,它们是最接近“主干”的东西其中。
Branches/
包含更传统的、面向任务的分支(即它们通常是短暂的,并被合并回 A、B 或 C,并在它们代表的任务完成时被删除)
在 git 中工作时,我希望 git 能够对待子级“Foo”的和“Support/Branches”的子代作为分支。但是, svn-remote.branches 设置中允许的通配符似乎没有足够的表现力来允许这样做。
过去,我设置了几个不同的 git 存储库(A、B 和 C 各一个),标签和分支使用相同的 svn URL,但是,这似乎很浪费,因为这三个存储库的绝大多数内容存储库将是相同的。
Currently, I am working with an svn repository with a slightly unconventional layout. There are two directories where branches may appear. For example:
Project/
Foo/
A/
B/
C/
Support/
Branches/
taskbranch1/
taskbranch2/
taskbranch3/
taskbranch4/
Tags/
In this layout, there isn't really a designated "trunk". Each of the directories "A", "B", and "C" are branches, in the sense that they represent ongoing development of multiple versions of the same product, and they are the closest thing to a "trunk" for the developers working therein.
Branches/
contains more traditional, task-oriented branches (i.e. they are typically short-lived and are merged back into A, B or C and deleted when the task they represent is completed)
When working in git, I'd like git to treat the children of "Foo" and the children of "Support/Branches" as branches. However, the wildcards allowed in the svn-remote.branches setting don't seem to be expressive enough to allow this.
In the past, I've set up several different git repositories (one each for A, B and C), with the same svn URLs for tags and branches, however, that seems wasteful, as the vast majority of the contents of those three repositories will be identical.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
当您运行
git svn clone
或git svn init
时,您可以使用--branches
(和--tags
)多次选择分支(和标签)的特定多个位置。其作用是在配置中创建多个 svn-remote..branches 设置。这应该可以正常工作,而不是尝试使用与两个位置匹配的单个 svn-remote..branches 设置。
When you run
git svn clone
orgit svn init
you can use the--branches
(and--tags
) options more than once to specific multiple locations for branches (and tags).What this does is create multiple svn-remote.<name>.branches settings in the config. This should work correctly instead of trying to use a single svn-remote.<name>.branches setting that matches both locations.