Merge lp:~bialix/bzr-colo/repo-root into lp:bzr-colo

Proposed by Alexander Belchenko
Status: Merged
Approved by: Neil Martinsen-Burrell
Approved revision: not available
Merged at revision: not available
Proposed branch: lp:~bialix/bzr-colo/repo-root
Merge into: lp:bzr-colo
Diff against target: 13 lines (+2/-1)
1 file modified
colocated.py (+2/-1)
To merge this branch: bzr merge lp:~bialix/bzr-colo/repo-root
Reviewer Review Type Date Requested Status
Neil Martinsen-Burrell Pending
Review via email: mp+17136@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Alexander Belchenko (bialix) wrote :

From log message: use colo: as pointer to real shared repo (.bzr/branches) root instead of assuming that repo root is '..'

This allows usage of branch names as 'foo/bar'.
The idea and code taken from repoalias plugin.

Revision history for this message
Neil Martinsen-Burrell (nmb) wrote :

Very Cool! Nice to be able to use multi-level branch names. This takes some more infrastructure in colo-branch to make it create parent directories under .bzr/branches.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'colocated.py'
2--- colocated.py 2010-01-10 02:50:59 +0000
3+++ colocated.py 2010-01-11 11:24:14 +0000
4@@ -112,7 +112,8 @@
5 raise errors.InvalidURL(path=url,
6 extra="Can't look up a colocated branch name"
7 " while not in a branch")
8- branch_location = urlutils.join(branch.base, '..', name)
9+ branch_location = urlutils.join(
10+ branch.repository.bzrdir.root_transport.base, name)
11 if COLOCATED_LOCATION not in branch_location:
12 raise errors.InvalidURL(path=url,
13 extra="Not in a colocated workspace")

Subscribers

People subscribed via source and target branches