Skip to content

Instantly share code, notes, and snippets.

@phinze
Created March 3, 2009 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phinze/73608 to your computer and use it in GitHub Desktop.
Save phinze/73608 to your computer and use it in GitHub Desktop.
########################
# Development Directory
########################
$ cd dev/uiris
$ tree -d -L 3 # truncated manually as well
.
|-- aris.bound
|-- features
| |-- difference_viewer.bound
| |-- generalized_picker.bound
| |-- interface.bound
| `-- interface_integration.bound
|-- latest-release.bound
|-- my-aris
| |-- 1.5.6
| | |-- block_amendments_properly_3368
| | `-- dont_lose_site_reviews_3324
| `-- 1.6.1
| |-- formbuilderize_animal_3550
| `-- pulling_local_workflow_stub_3230
|-- my-trunk
| |-- 3.1.10
| | `-- fix_bad_timesheet_links_3419
| |-- 3.1.11
| | |-- acts_as_versioned_readability_3428
| | |-- fork_workflow_stub_3526
| | |-- formbuilder_framework_3441
| | |-- organize_lib_with_initializers_3529
| | |-- params_in_amfk_3524
| | `-- patch_up_workflow_stub_3527
| `-- 3.1.12
| |-- internet_explorer_hiders_3543
| `-- show_with_formbuilder_3593
|-- routing_form.bound
|-- trunk.bound
`-- work
########################
# locations.conf
########################
$ cat ~/.bazaar/locations.conf
[/home/phinze/dev/uiris3]
push_location = bzr+ssh://dev/uiris3
push_location:policy = appendpath
[/home/phinze/dev/uiris3/aris.bound]
push_location = bzr+ssh://dev/uiris3/projects/aris
push_location:policy = appendpath
[/home/phinze/dev/uiris3/my-aris]
push_location = bzr+ssh://dev/uiris3/users/phinze/aris
push_location:policy = appendpath
[/home/phinze/dev/uiris3/my-trunk]
push_location = bzr+ssh://dev/uiris3/users/phinze/trunk
push_location:policy = appendpath
[/home/phinze/dev/uiris3/my-features]
push_location = bzr+ssh://dev/uiris3/users/phinze/features
push_location:policy = appendpath
########################
# Init command
########################
# First time you build repository
$ mkdir ~/dev
$ cd ~/dev
$ bzr init-repo --no-trees --rich-root-pack uiris3
# First time you use work
$ cd ~/dev/uiris/
$ bzr checkout --lightweight my-trunk/3.1.12/some_feature_1234 work
########################
# Example usage
########################
# Working on redmine issue #1234, "look what phinze broke now"
$ cd ~/dev/uiris3
$ cd uiris3
$ bzr branch trunk.bound my-trunk/3.1.13/what_did_i_break_now_1234
$ cd work
$ bzr switch ../my-trunk/3.1.13/what_did_i_break_now_1234
# ... hack hack hack
$ bzr ci -m "First local checkpoint"
# ... hack hack hack
$ bzr ci -m "Second local checkpoint"
# ... hack hack hack
$ bzr ci -m "Almost there"
# ... need to update
$ bzr up ../trunk.bound
Updated to revision 234
$ bzr merge ../trunk.bound
M file
-D other/file
...
$ bzr ci -m "Merged with trunk"
# ... hack hack hack
$ bzr ci -m "Ready to go"
$ cd ../trunk.bound
$ bzr up
Updated to revision 235
$ bzr merge ../work
M file
+A other/new/file
...
$ bzr ci -m "Fixing what I broke, fixes #1234"
Committed revision 236
# On to the other thing I was working on before
$ cd ../work
$ bzr switch ../my-aris/1.6.1/other_thing_i_was_working_on_before_2402
# ... hack hack hack
# Also of note, no files cluttering up branches!!
$ tree -a my-trunk/ # show all files, not truncated
my-trunk/
|-- 3.1.10
| `-- fix_bad_timesheet_links_3419
|-- 3.1.11
| |-- acts_as_versioned_readability_3428
| |-- fork_workflow_stub_3526
| |-- formbuilder_framework_3441
| |-- organize_lib_with_initializers_3529
| |-- params_in_amfk_3524
| `-- patch_up_workflow_stub_3527
`-- 3.1.12
|-- internet_explorer_hiders_3543
`-- show_with_formbuilder_3593
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment