Bzr:从现有的独立存储库创建共享存储库

发布于 2024-12-20 23:50:18 字数 347 浏览 7 评论 0原文

在过去的几个月里,我一直在使用 Bzr 对我的项目进行版本控制。我是唯一的开发人员,目前我只将所有内容都放在一个本地项目目录中,我将其提交并同步到 DriveHQ。

我现在正在考虑一些大规模的实验,这可能会打破这条主线,所以我一直在研究分支和共享存储库的概念。所以我的问题基本上是:我应该如何从这个已经版本控制的基础上创建一个新的共享存储库?

我熟悉了主干、分支和标签的SVN项目结构,我打算采用这种结构。我的计划是继续执行一个新的 init-repo,并将所有代码(加上 .bzr)复制到 trunk 文件夹中。那么这样可以吗?或者有什么方法可以将我已经拥有的内容转换为共享存储库?

非常感谢您的帮助。

克里斯托弗

I have been using Bzr for version control of my project over the last few months. I am the sole developer, and currently I just have everything in a single local project directory, to which I commit and which I sync to DriveHQ.

I now have some large-scale experiments in mind which would likely break this main line, so I've been looking into the concepts of branches and shared repositories. So my question is, basically: how should I go about creating a new, shared repository from this already-version-controlled base?

I am familiar with the SVN project structure of trunk, branches and tags, and I'm going to adopt this structure. My plan is to just go ahead and do a fresh init-repo, and copy all my code (plus .bzr) over into the trunk folder. So is this OK? Or is there some way to convert what I have already into a shared repository?

Many thanks in advance for any help.

Christopher

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

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

发布评论

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

评论(2

可是我不能没有你 2024-12-27 23:50:18

好的,现在您的独立分支已经有了一些 work 目录。
您想要在新的共享存储库中创建主干和功能分支。

首先,您需要创建一个共享存储库本身:

bzr init-repo /path/to/repo

现在您可以将代码放入repo/trunk。您可以使用pushbranch,也可以复制work并使用reconfigure

  1. CD 工作; bzr push /path/to/repo/trunk
  2. cd path/to/repo; bzr 分支 /path/to/work trunk
  3. 或复制/移动 work/path/to/repo/trunk 然后 cd /path/to /repo/主干; bzr reconfigure --use-shared

在所有情况下,您都会将分支trunk作为旧工作的副本,并且此trunk code> 将使用共享存储库来保存修订。

您还可以查看 bzr-colo 插件。

OK, so you have some work directory where your standalone branch is.
You want to create trunk and feature branches in new shared repo.

At first you need to create a shared repository itself:

bzr init-repo /path/to/repo

Now you can put your code to repo/trunk. You can use push, branch or you can copy work and use reconfigure.

  1. cd work; bzr push /path/to/repo/trunk
  2. cd path/to/repo; bzr branch /path/to/work trunk
  3. or copy/move work to /path/to/repo/trunk then cd /path/to/repo/trunk; bzr reconfigure --use-shared

In all cases you'll have branch trunk as a copy of your old work, and this trunk will use shared repository to save the revisions.

You can also look at bzr-colo plugin.

桃酥萝莉 2024-12-27 23:50:18
  1. 在当前存储库之外创建一个文件夹。
  2. 调用 bzr init-repo 创建共享存储库
  3. 从工作树推送到新创建的共享存储库。

您现在可以直接在共享存储库上工作

  1. Create a folder outside your current repository.
  2. Call bzr init-repo to create a shared repository
  3. From your working tree push to the newly created shared repo.

You can now work directly on the shared repo

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