Difference between revisions of "Launchpad"

From SpaceElevatorWiki.com
Jump to: navigation, search
(New page: == Here is a basic workflow I used to get started == bzr branch lp:openracing trunk (put the default openracing branch which is our trunk into a directory called trunk) cd trunk bzr push ...)
 
(bzr Setup)
 
(18 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
== bzr Setup ==
 +
'''The instructions use my info, so just swap it with your login information.'''
 +
 +
Create an account on Launchpad.
 +
 +
If running Ubuntu/Debian:
 +
sudo apt-get install bzr
 +
 +
For Windows
 +
http://bazaar-vcs.org/WindowsDownloads
 +
 +
bzr whoami "Keith Curtis <keithcu@gmail.com>"
 +
bzr launchpad-login keithcu
 +
 +
== General idea ==
 +
With distributed version control systems, you create can create a branch for every feature, so that they can move forward at their own pace, like this:
 +
https://code.launchpad.net/openracing
 +
 
== Here is a basic workflow I used to get started ==
 
== Here is a basic workflow I used to get started ==
 +
'''Get trunk and create work branch'''
 +
 +
bzr branch lp:openracing trunk (put the default openracing branch called trunk into a directory trunk)
 +
bzr branch trunk work (make work branch)
 +
cd work
 +
bzr push lp:~keithcu/openracing/work (This creates a remote branch on the server called work for you to work with)
 +
 +
'''Party like crazy'''
 +
 +
(bzr add will add your .hg directory if you aren't careful! bzr revert throws them away)
 +
 +
bzr commit -m "Party like it's 1929"
 +
bzr push lp:~keithcu/openracing/work (to push your changes to the remote server -- not strictly necessary,
 +
  but it lets others pull from them, and backs your changes up in case your computer dies.)
 +
 +
'''When you are sure they are ready, apply changes to trunk.'''
 +
 +
cd ../trunk
 +
bzr merge ../work
 +
bzr commit -m "Adding stabilized feature XXX"
 +
bzr push lp:openracing
 +
 +
'''Get your work branch up to date'''
 +
 +
cd work
 +
bzr merge lp:openracing
  
bzr branch lp:openracing trunk (put the default openracing branch which is our trunk into a directory called trunk)
+
== Advanced features ==
cd trunk
+
At times, it can be useful to selectively merge some of the changes in a branch, but not all of them. This is commonly referred to as cherrypicking. Here are some examples of where cherrypicking is useful:
bzr push bzr+ssh://keithcu@bazaar.launchpad.net/~keithcu/openracing/work
 
(This creates a remote branch on the server called work for you to work with)
 
cd ..
 
  
Now you have to get it:
+
* selectively taking fixes from the main development branch into a release branch
bzr branch lp:~keithcu/openracing/work
+
* selectively taking improvements out of an experimental branch into a feature branch.
  
cd work
+
To merge only the changes made by revision X in branch foo, the command is:
Party like crazy
+
bzr merge -c X foo
bzr add (It will add your .hg directory if you aren't careful! bzr revert throws them away)
 
bzr commit -m "Party like it's 1929"
 
bzr push lp:~keithcu/openracing/work (to push your changes to the remote server -- not strictly necessary, but it lets others pull from them, and backs your changes up in case your computer dies.)
 
  
cd ../trunk
+
To merge only the changes up to revision X in branch foo, the command is:
bzr merge ../work
+
bzr merge -r X foo
bzr commit -m "Applying work to trunk"
 
  
Push changes to trunk so they are now in mainline
+
To merge only the changes since revision X in branch foo, the command is:
bzr push lp:openracing
+
bzr merge -r X.. foo
  
To get your work branch up to date
+
To merge only the changes from revision X to revision Y in branch foo, the command is:
you can:
+
bzr merge -r X..Y foo
cd work
 
bzr merge lp:openracing
 
  
 +
== Docs ==
 
Here are some notes but they aren't that helpful because they don't assume launchpad
 
Here are some notes but they aren't that helpful because they don't assume launchpad
 
http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html
 
http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html

Latest revision as of 16:00, 5 March 2011

bzr Setup

The instructions use my info, so just swap it with your login information.

Create an account on Launchpad.

If running Ubuntu/Debian:

sudo apt-get install bzr

For Windows

http://bazaar-vcs.org/WindowsDownloads
bzr whoami "Keith Curtis <keithcu@gmail.com>"
bzr launchpad-login keithcu

General idea

With distributed version control systems, you create can create a branch for every feature, so that they can move forward at their own pace, like this:

https://code.launchpad.net/openracing

Here is a basic workflow I used to get started

Get trunk and create work branch

bzr branch lp:openracing trunk (put the default openracing branch called trunk into a directory trunk)
bzr branch trunk work (make work branch)
cd work
bzr push lp:~keithcu/openracing/work (This creates a remote branch on the server called work for you to work with)

Party like crazy

(bzr add will add your .hg directory if you aren't careful! bzr revert throws them away)

bzr commit -m "Party like it's 1929"
bzr push lp:~keithcu/openracing/work (to push your changes to the remote server -- not strictly necessary,
 but it lets others pull from them, and backs your changes up in case your computer dies.)

When you are sure they are ready, apply changes to trunk.

cd ../trunk
bzr merge ../work
bzr commit -m "Adding stabilized feature XXX"
bzr push lp:openracing

Get your work branch up to date

cd work
bzr merge lp:openracing

Advanced features

At times, it can be useful to selectively merge some of the changes in a branch, but not all of them. This is commonly referred to as cherrypicking. Here are some examples of where cherrypicking is useful:

  • selectively taking fixes from the main development branch into a release branch
  • selectively taking improvements out of an experimental branch into a feature branch.

To merge only the changes made by revision X in branch foo, the command is:

bzr merge -c X foo

To merge only the changes up to revision X in branch foo, the command is:

bzr merge -r X foo

To merge only the changes since revision X in branch foo, the command is:

bzr merge -r X.. foo

To merge only the changes from revision X to revision Y in branch foo, the command is:

bzr merge -r X..Y foo

Docs

Here are some notes but they aren't that helpful because they don't assume launchpad http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html

Longer doc: http://doc.bazaar-vcs.org/bzr.dev/en/user-guide/index.html