Merge lp:~bialix/bzr-externals/bug-932473 into lp:bzr-externals

Proposed by Alexander Belchenko on 2012-02-16
Status: Merged
Merged at revision: 51
Proposed branch: lp:~bialix/bzr-externals/bug-932473
Merge into: lp:bzr-externals
Diff against target: 23 lines (+4/-2)
1 file modified
commands.py (+4/-2)
To merge this branch: bzr merge lp:~bialix/bzr-externals/bug-932473
Reviewer Review Type Date Requested Status
Eugene Tarasenko 2012-02-16 Pending
Review via email: mp+93370@code.launchpad.net

Description of the change

Fix for Bug #932473: to properly support colocated workspaces or lightweight checkouts in general externals-add should open the working tree, because it needs the tree anyway.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'commands.py'
2--- commands.py 2011-07-12 23:11:53 +0000
3+++ commands.py 2012-02-16 10:24:25 +0000
4@@ -23,6 +23,7 @@
5 from bzrlib.option import Option
6 from bzrlib.trace import is_quiet, note
7 from bzrlib.bzrdir import BzrDir
8+from bzrlib.workingtree import WorkingTree
9
10 import externals
11
12@@ -53,8 +54,9 @@
13 takes_options = ['revision']
14
15 def run(self, from_location, to_location, revision=None):
16- branch = Branch.open_containing('.')[0]
17- root = local_path_from_url(branch.base)
18+ tree = WorkingTree.open_containing()[0]
19+ branch = tree.branch
20+ root = tree.basedir
21
22 # select what do it
23 if isdir(pathjoin(root, to_location, '.bzr')) or isdir(pathjoin(root, to_location, '.svn')):

Subscribers

People subscribed via source and target branches