Refactoring a project to get stable and trunk branches using bazaar
I'm relatively new to VCS and especially Bazaar so I started my project without usin开发者_如何学Gog 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?
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.
精彩评论