Bzr:从现有的独立存储库创建共享存储库
在过去的几个月里,我一直在使用 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
好的,现在您的独立分支已经有了一些
work
目录。您想要在新的共享存储库中创建
主干
和功能分支。首先,您需要创建一个共享存储库本身:
现在您可以将代码放入
repo/trunk
。您可以使用push
、branch
,也可以复制work
并使用reconfigure
。CD 工作; bzr push /path/to/repo/trunk
cd path/to/repo; bzr 分支 /path/to/work trunk
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:
Now you can put your code to
repo/trunk
. You can usepush
,branch
or you can copywork
and usereconfigure
.cd work; bzr push /path/to/repo/trunk
cd path/to/repo; bzr branch /path/to/work trunk
work
to/path/to/repo/trunk
thencd /path/to/repo/trunk; bzr reconfigure --use-shared
In all cases you'll have branch
trunk
as a copy of your oldwork
, and thistrunk
will use shared repository to save the revisions.You can also look at bzr-colo plugin.
您现在可以直接在共享存储库上工作
bzr init-repo
to create a shared repositoryYou can now work directly on the shared repo