【问题标题】:How do I import multiple branch-type directories into git-svn which aren't exclusive children of the same parent?如何将多个分支类型目录导入 git-svn,它们不是同一父级的独占子级?
【发布时间】:2010-10-12 10:58:15
【问题描述】:

对不起,标题太长了,但我想明确一下这个问题和The one asked by CaptainPicard之间的区别

我有一个像这样的svn结构:

  • 主干/
  • 分支机构/*
  • 标签/*
  • 候选发布/*

出于所有意图和目的,候选版本的使用与分支完全一样。所以,我可以告诉 git-svn 使用 Release Candidates 作为分支,但是我没有得到分支,或者我可以告诉它使用分支,但没有得到 Release Candidates。 我可以两者兼得吗? 我想要类似的东西

   [svn-remote "svn"]
      url = svn://server/repo
      fetch = trunk:refs/remotes/trunk
      branches = branches/*:refs/remotes/*
      branches = Release Candidate/*:refs/remotes/*
      tags = tags/*:refs/remotes/tags/*

工作,但没有(据我所知)

在尝试但它不起作用的阵营中也有类似

[svn-remote "svn"]
  url = svn://svnserve/repo
  fetch = trunk:refs/remotes/trunk
  branches = Release Candidate/*:refs/remotes/RCs/*
  tags = tags/*:refs/remotes/tags/*
[svn-remote "svnbranches"]
  url = svn://svnserve/repo
  fetch = <What the heck do I put here???>
  branches = branches/*:refs/remotes/*

但我不知道为 svnbranches 的 fetch 放什么(复制 svn 的 fetch 会导致 git-svn 错误,将其忽略或放入不存在的分支会导致 git 错误)

如何将两种类型的分支都拉入 git-svn?

谢谢,

【问题讨论】:

  • 我认为答案与链接问题的答案相同。
  • 嗯,可能。这只是令人沮丧,因为我知道他的问题的答案,但它不适用于我的情况......(见我对 CaptainPicard 的回答)

标签: svn git git-svn


【解决方案1】:

现在,我没有时间调查为什么 git-svn 不处理这个问题。但您似乎可以通过将 Release_Candidates 作为 Branches 的子目录来解决您的问题:

trunk/*
branches/
    Release Candidates/*
    other branches
    .
    .
    .
tags/*

然后your answer to CaptainPicard 将起作用,如果您的构建需要,您可以使用链接重新创建旧的 svn 结构。

【讨论】:

  • 我最终可能不得不这样做。我仍在尝试摆脱候选版本中的空间,因为它很烦人,所以可能会同时移动它。但是现在我正在尝试 git 看看它是什么样的,并且没有充分的理由不能真正修改上游。我想我会放弃分支/*。
  • 嗨,保罗,你能看看stackoverflow.com/questions/642264/… 吗?您将如何从以前的提交中恢复一个文件的更改(只有一个文件,而不是所有提交)
猜你喜欢
  • 2010-09-20
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2022-11-11
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多