Merge lp:~vila/bzr-loom/595563-switch-directory into lp:bzr-loom

Proposed by Vincent Ladeuil
Status: Merged
Approved by: John A Meinel
Approved revision: 115
Merged at revision: 114
Proposed branch: lp:~vila/bzr-loom/595563-switch-directory
Merge into: lp:bzr-loom
Diff against target: 43 lines (+10/-3)
2 files modified
NEWS (+4/-0)
commands.py (+6/-3)
To merge this branch: bzr merge lp:~vila/bzr-loom/595563-switch-directory
Reviewer Review Type Date Requested Status
John A Meinel Needs Fixing
Review via email: mp+27851@code.launchpad.net

Description of the change

Since bzr-loom now requires 2.2.x, I think this is uncontroversial.
And it fixes the test failure :)

To post a comment you must log in.
115. By Vincent Ladeuil

Bah, missed the obvious, no test for that though :-/

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Vincent Ladeuil wrote:
> Vincent Ladeuil has proposed merging lp:~vila/bzr-loom/595563-switch-directory into lp:bzr-loom.
>
> Requested reviews:
> Loom Developers (bzr-loom-devs)
> Related bugs:
> #595563 faling test: TypeError: run() got an unexpected keyword argument 'directory'
> https://bugs.launchpad.net/bugs/595563
>
>
> Since bzr-loom now requires 2.2.x, I think this is uncontroversial.
> And it fixes the test failure :)
>
>

You didn't add 'directory' as one of the options to the command. Don't
you need to do so, as well as adding the argument?

 review: needsfixing
 merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkwaV64ACgkQJdeBCYSNAAPOEwCeOpvzQBaUW6AhP6G6JwfDGdVB
X4AAn1gwSzh5QVTSd+gf/fv6DiMpHtgy
=HK2j
-----END PGP SIGNATURE-----

review: Needs Fixing
Revision history for this message
Robert Collins (lifeless) wrote :

No, because loom decorates switch it inherits all the built in options.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NEWS'
2--- NEWS 2010-06-16 03:37:23 +0000
3+++ NEWS 2010-06-17 16:19:23 +0000
4@@ -30,6 +30,10 @@
5 BUGFIXES
6 --------
7
8+* ``switch`` now accept the optional --directory argument.
9+ (Vincent Ladeuil, #595563)
10+
11+
12 API BREAKS
13 ----------
14
15
16=== modified file 'commands.py'
17--- commands.py 2010-06-16 03:37:23 +0000
18+++ commands.py 2010-06-17 16:19:23 +0000
19@@ -202,10 +202,13 @@
20 return thread[0]
21 return to_location
22
23- def run(self, to_location=None, force=False, create_branch=False, revision=None):
24+ def run(self, to_location=None, force=False, create_branch=False,
25+ revision=None, directory=None):
26 # The top of this is cribbed from bzr; because bzr isn't factored out
27 # enough.
28- control_dir, path = bzrdir.BzrDir.open_containing('.')
29+ if directory is None:
30+ directory = u'.'
31+ control_dir, path = bzrdir.BzrDir.open_containing(directory)
32 if to_location is None:
33 if revision is None:
34 raise errors.BzrCommandError(
35@@ -223,7 +226,7 @@
36 to_location)
37 if from_branch is not None:
38 # Note: reopens.
39- (tree, path) = workingtree.WorkingTree.open_containing('.')
40+ (tree, path) = workingtree.WorkingTree.open_containing(directory)
41 tree = LoomTreeDecorator(tree)
42 try:
43 if create_branch:

Subscribers

People subscribed via source and target branches