bzr_dir_for_branch_stacked_on_relative_url.clone('...', preserve_stacking=True) miscalculates stacked-on URL
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
I hope this transcript makes the summary sufficiently precise:
$ cd ~/tmp
$ mkdir repro
$ cd repro/
$ mkdir directory
$ bzr init directory/base --development
$ bzr push -d directory/base/ --stacked-
Created new stacked branch referring to file://
$ cat directory/
stacked_on_location = file://
$ echo 'stacked_
$ bzr info directory/branch/
Standalone branch (format: development1)
Location:
branch root: directory/branch
Related branches:
stacked on: ../base
$ python2.4
Python 2.4.5 (#2, Apr 21 2008, 11:22:42)
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import bzrlib.branch
>>> b = bzrlib.
>>> b.bzrdir.
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/usr/lib/
preserve_
File "/usr/lib/
result_repo = repository_
File "/usr/lib/
self.
File "/usr/lib/
stacked_dir = BzrDir.
File "/usr/lib/
return BzrDir.
File "/usr/lib/
redirected)
File "/usr/lib/
return action(transport)
File "/usr/lib/
return transport, BzrDirFormat.
File "/usr/lib/
raise errors.
bzrlib.
>>>
This is with 1.6b3 but it's the same with bzr.dev revno 3565.
jml provided this one line change:
=== modified file 'bzrlib/bzrdir.py'
repositor y_policy = result. determine_ repository_ policy( transport. base)
make_ working_ trees = local_repo. make_working_ trees()
result_ repo = repository_ policy. acquire_ repository(
make_ working_ trees, local_repo. is_shared( ))
--- bzrlib/bzrdir.py 2008-07-17 08:00:25 +0000
+++ bzrlib/bzrdir.py 2008-07-21 07:53:30 +0000
@@ -217,7 +217,7 @@
if local_repo:
# may need to copy content in
- force_new_repo, stack_on)
+ force_new_repo, stack_on, self.root_
I'll try to come up with some proper tests and submit a merge request today.