Bzr

From Devpit
Jump to: navigation, search

NOTE: This tutorial uses the concept of a pristine tree where no work is done. This tree simply has bundles applied to it. A work tree is branched from the pristine tree and used for doing development work.

  • Get a branch from bzr.website.org for a pristine tree:
 bzr branch http://bzr.website.org/project/ project-pristine
  • Pull the first.bundle.patch bundle into this new pristine tree
cd project-pristine; bzr pull /path-to/first.bundle.patch
  • Commit the bundle to the pristine tree:
bzr commit -m "Merge first.bundle.patch bundle into my pristine branch"
  1. Branch the pristine tree into a new working tree:
cd ../; bzr branch project-pristine/ project-working
  • Make changes in the new working tree:
cd project-working; <edit your sources>; bzr commit;
  • Create a bundle to apply against the pristine tree from within the working tree. Notice we're in the project-working directory but we're creating the bundle against the project-pristine tree. This makes the bundle apply against the current revision level of the pristine tree:
cd project-working; bzr bundle ../project-pristine --output ../new.bundle.patch
  • Apply the bundle to the pristine tree:
cd project-pristine; bzr pull ../new.bundle.patch
  • Commit the new bundle to the pristine tree:
bzr commit -m "Apply new.bundle.patch bundle to my pristine tree"
  • For those who're applying more than one bundle simply do:
bzr branch http://bzr.website.org/project/ project-pristine
cd project-pristine; bzr pull /path-to/first.bundle.patch
bzr commit -m "Merge first.bundle.patch bundle into my pristine tree"
bzr pull ../new.bundle.patch
bzr commit -m "Apply new.bundle.patch bundle to my pristine tree"