使用集市重构项目以获得稳定分支和主干分支

发布于 2024-11-14 17:12:30 字数 936 浏览 3 评论 0原文

我对 VCS 尤其是 Bazaar 比较陌生,所以我开始我的项目时没有使用它,而是使用这样的结构

+project_root
     +scripts
         +bin                   # Binaries for easy testing
         +dev                   # Sources root
             +package_folder
             +package_folder
             ...

但我被告知 VCS 是自集合论以来最好的东西,所以我尝试将它放在 Bazaar 下,使用我已经做了一个

cd scripts/dev
bzr init
bzr add
bzr commit -m "Initial import"

Now (这太酷了)只要我愿意,我就会bzr commit -m "spam",当我不信任我的硬盘时,bzr Push

但现在我有了一些稳定且可分发的代码,我已经在启动板上设置了一个项目,并且我希望有一些 trunk 分支,我可以在其中仅对备份和 进行不稳定的提交stable 分支供用户使用。

也就是说,我只需要生成一些命令,当我有一个想要分发、捆绑的稳定版本时,它就会在 trunk 的当前状态下更新 stable所有中间修订合二为一。

如果可能的话,我该如何做到这一点而不重构我的文件夹结构,以及根据通常的约定,我在启动板上的项目结构应该是什么?

I'm relatively new to VCS and especially Bazaar so I started my project without using it, using a structure like this

+project_root
     +scripts
         +bin                   # Binaries for easy testing
         +dev                   # Sources root
             +package_folder
             +package_folder
             ...

But I've been told that VCS are the best thing since set theory, so I've tried to put it under Bazaar, using that I've done a

cd scripts/dev
bzr init
bzr add
bzr commit -m "Initial import"

Now (how cool is that) I just bzr commit -m "spam" whenever I feel like it and bzr push when I don't trust my HDD.

But now that I have some stable and distributable code, I have set up a project at launchpad and I'd like to have some trunk branch where I could make unstable commits just to backup and a stable branch for the users to use.

That is to say I'd just have to spawn some command and it will update stable at the current state of trunk when I have a stable version I want to distribute, bundling all intermediate revisions into one.

How can I do this, if possible without refactoring my folder structure, and what should be my project structure on launchpad according to the usuals conventions?

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

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

发布评论

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

评论(1

带上头具痛哭 2024-11-21 17:12:30

问题更多的是关于 Launchpad,而不是 bzr。

您可以将主干设置为启动板上的默认分支,也可以将稳定分支设置为启动板上的默认分支。打开您项目的系列页面:

https://launchpad.net/PROJECT/+series

单击行李箱系列。您应该能够选择要与干线系列关联的分支。 https://launchpad.net/PROJECT/trunk/+edit 让我们在此处选择您的中继。

现在您应该返回系列页面并创建一个新系列,我们将其称为“稳定”。
https://launchpad.net/PROJECT/+addseries

对于稳定系列,您应该选择另一个分支,让我们选择您的稳定分支。

所以现在,当您或您的用户使用像 lp:PROJECT 这样的短 URL 时,它将访问您的主干分支。如果使用另一个短 URL:lp:PROJECT/stable 那么它将访问您的稳定分支。

lp:PROJECT/XXX 将访问与 XXX 系列关联的分支。

The question is more about Launchpad than bzr.

You can set up your trunk as default branch on launchpad, or you can set up your stable branch as default branch on Launchpad. Open the series page for your project:

https://launchpad.net/PROJECT/+series

Click on trunk series. You should be able to select the branch you want to be associated with trunk series. https://launchpad.net/PROJECT/trunk/+edit Let's select your trunk here.

Now you should return to series page and create a new series let's call it "stable".
https://launchpad.net/PROJECT/+addseries

For stable series you should select another branch, let's select your stable branch.

So now, when you or your users will use short URL like lp:PROJECT then it will access your trunk branch. If another short URL will be used: lp:PROJECT/stable then it will access your stable branch.

lp:PROJECT/XXX will access the branch associated with XXX series.

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