4
An alternative to using `cobzr` is to use the normal `bzr` with light-weight
5
checkouts (see `bzr help checkouts`).
7
The first step is to create a repository that contains the juju-core trunk and
8
other working branches.
14
See `bzr help repositories` for more info on repositories.
16
For this example, we'll use ~/src as a location for the repository.
19
$ bzr init-repo juju-core
21
This will create a repository that has working trees (the actual files and
22
directories - see `bzr help working-trees`.
24
Now put trunk in there:
27
$ bzr branch lp:juju-core trunk
33
Now that we have trunk of juju-core elsewhere, we now need to use it inside
36
These steps assume that you have juju-core already available in $GOPATH/src.
38
$ cd $GOPATH/src/launchpad.net/juju-core
39
$ bzr reconfigure --lightweight-checkout --bind-to ~/src/juju-core/trunk
41
Now when you look at that branch, you should see the following
44
Lightweight checkout (format: 2a)
46
light checkout root: .
47
checkout of branch: /home/<you>/src/juju-core/trunk
48
shared repository: /home/<you>/src/juju-core
54
You can specify information in the bazaar locations file which it uses to
55
determine the locations of the public and push locations for a branch.
57
Inside your ~/.bazaar/locations.conf file, add the following (not including
62
public_branch = bzr+ssh://bazaar.launchpad.net/~eric-the-viking
63
public_branch:policy = appendpath
64
push_location = lp:~eric-the-viking
65
push_location:policy = appendpath
68
And replace 'eric' with your login id, and 'eric-the-viking' with your
71
The `appendpath` policy means that the directories under ~/src are added to
72
the path, so ~/src/juju-core/trunk would be pushed to (by default)
73
lp:~eric-the-viking/juju-core/trunk. What this means is that when you create
74
a new branch `new-work`, and go `bzr push` it goes to
75
`lp:~eric-the-viking/juju-core/new-work`.
78
Making a branch to work in
79
==========================
81
Inside the $GOPATH/src/launchpad.net/juju-core directory, you can create a new
82
branch to work on using:
84
$ bzr switch -b new-work
86
This creates a new branch in `~/src/juju-core` called `new-work` and switches
87
the working tree to use that. Commits are now on that new branch, and push
88
sends it to launchpad to the `new-work` branch.
90
Everything else works the same.
96
$ bzr alias commit="commit --strict"
98
This will mean that whenever you use commit, it adds the `--strict` flag.
99
What this means is that it will not allow you to commit if there are unknown
100
files. This is very useful when you create new files but forget to add them
103
If you do have unknown files and want to override the strict behaviour for one
104
commit, then you can go...
106
$ bzr commit --no-strict -m "Blah blah"
109
Another useful alias is:
111
$ bzr alias ll="log --line -r-10..-1"
113
Will give you something like the following:
117
956: Tim Penhey 2013-03-06 Add some documentation around lightweight checkout usage.
118
955: Dave Cheney 2013-03-05 [merge] environs/ec2: try to get tests working on raring
119
954: Roger Peppe 2013-03-04 [merge] juju: add NewConnFromState
120
953: Dimiter Naydenov 2013-03-01 [merge] state, uniter: Units now use charm URLs
121
952: Francesco Banconi 2013-03-01 [merge] Implement the API unexpose command.
122
951: William Reade 2013-03-01 [merge] environs: drop InstanceIdAccessor hack
123
950: Brad Crittenden 2013-02-28 [merge] Add the 'expose' command to the API.
124
949: John A Meinel 2013-02-28 [merge] revert only r943
125
948: William Reade 2013-02-28 [merge] history: rewind
126
947: Ian Booth 2013-02-28 [merge] Better unauthorised errors