← Back to team overview

ubuntu-accomplishments-contributors team mailing list archive

Managing branches in Launchpad

 

I should probably create a wiki page for this instead of just an email, but
I'll start here.

One of the pain points of a new developer, even if it's just new to
Launchpad, is how exactly to deal with branches.  Launchpad, while
confusing at first, actually makes it incredibly easy to work in a manner
that I like to and that is by developing with feature branches and merge
requests.  The basic concept is that when you are working on a bug, new
feature, etc. you create a branch for it.  When you have that bug/feature
done and tested you can create a merge request for it to be pulled into the
mainline.

I personally like to use a main source directory and then a sub-directory
named branches for all of my actual work.  The main source directory gives
me a location to branch from without pulling anything from over the
network... I can create new branches even if I'm offline.

Example>
mkdir -p ~/source/branches

cd ~/source
bzr branch lp:ubuntu-accomplishments-web-editor  # creates
$HOME/source/ubuntu-accomplishments-web-editor

# Now lets say that I want to work on the task of moving the editor urls
into a urls.py file inside the editor app instead of in the main urls.py
file

cd branches
bzr branch ../ubuntu-accomplishments-web-editor
./accomplishments_editor_urls # creates
$HOME/source/branches/accomplishments_editor_urls

# Do some work

# Now I'm ready to push out my work to launchpad in my personal branches
bzr push
lp:~vestal-d/ubuntu-accomplishments-web-editor/accomplishments_editor_urls

Since I created my local development branch from the mainline [
lp:ubuntu-accomplishments-web-editor ] the "code" page for the
ubuntu-accomplishments-web-editor project will show my branch.  From the
link to your branch, or from your own "code" page, you can click on the
"Propose for merging" link and fill out the form to create the merge
request.

====================================================================
See page(s) at https://code.launchpad.net/ubuntu-accomplishments-web-editorfor
a reference
====================================================================

This way fixes, features, etc. can easily be tracked.  Merges can be
submitted and handled without requiring email.  Good times can be had by
all.

Please feel free to add any questions and/or comments.

David Vestal

Follow ups