[development] Fwd: bzr usage example

Karoly Negyesi karoly at negyesi.net
Wed Nov 16 22:16:56 UTC 2005


I'll send a lot more text to the list concerning bzr, we had an irc chat  
on #drupal with James Blackwell after he sent this letter, I will sum that  
up.

Note that for these examples to work you do not need a special apache  
setup.

------- Forwarded message -------
From: "James Blackwell" <jblack@>
To: karoly at negyesi.net
Cc:
Subject: bzr usage example
Date: Wed, 16 Nov 2005 21:42:47 +0100


A lead developer:

$ tar xvf mysources.tgz
$ cd mysources
$ bzr init
$ bzr add *
$ bzr commit -m"I imported my branch with no history"
$ [edit a few files]
$ bzr commit -m"I fixed up a variety of typos"
$ bzr push sftp://jblack@merconline.com/~/public_html/sources_head

A contributor:

$ bzr branch http://merconline.com/~jblack/sources_head my_sources
$ cd my_sources
[wait a few days]
$ bzr pull
$ [edit a few files]
$ bzr commit -m"fixed that buffer overflow holding up release"
$ bzr push sftp://someone@somewhere.com/~/public_html/sources_bug-8312
$ echo "Hey! Merge http://somewhere.com/~me/sources_bug-8132" | mutt
    jblack at merconline.com -s "merge me"

A lead:

$ cd mysources
$ bzr merge http://somewhere.com/~someone/sources_bug-8312
$ bzr diff
[ things look good ]
$ bzr commit -m "someone fixed sources_bug-8312
$ bzr push sftp://jblack@merconline.com/~/public_html_sources_1.1

The contributor:
[decides to work more permanantly]
$ bzr branch http://merconline.com/~jblack/sources_head code/source_head
echo "12 * * * * * cd ~/code/source_head; bzr pull > /dev/null" \
       >  /var/spool/cron/someuser
$ cd code/source_head
$ bzr branch ../source_fix1
$ bzr branch ../source_feature2
$ bzr branch ../allmyfixes
$ cd ../source_fix1
[hack hack hack commit]
$ cd ../source_fix2
[hack hack hack commit]
$ cd ../allmyfixes
$ bzr merge   # bzr merge defaults to where a branch was branched from
$ bzr merge ../source_fix1
$ bzr merge ../source_fix2

The developer can now keep up with mainstream, keep his patches
independant, and enjoy the fruits of his own labor. :)




More information about the development mailing list