Rev 114: Merge and tweak vila's fix for bug 595563. in http://bazaar.launchpad.net/~bzr-loom-devs/bzr-loom/trunk/

Robert Collins robertc at robertcollins.net
Thu Jun 17 20:11:30 BST 2010


At http://bazaar.launchpad.net/~bzr-loom-devs/bzr-loom/trunk/

------------------------------------------------------------
revno: 114 [merge]
revision-id: robertc at robertcollins.net-20100617191129-fnk2xn3jl71gc8ek
parent: robertc at robertcollins.net-20100617043709-i8c5wapa13eaxvtl
parent: v.ladeuil+lp at free.fr-20100617161715-w3hni8h0sv1ngpu1
committer: Robert Collins <robertc at robertcollins.net>
branch nick: trunk
timestamp: Fri 2010-06-18 07:11:29 +1200
message:
  Merge and tweak vila's fix for bug 595563.
modified:
  NEWS                           news-20080228111444-miryhm4hma987q57-1
  commands.py                    commands.py-20060620084702-jnrwijq76kg45klj-6
=== modified file 'NEWS'
--- a/NEWS	2010-06-16 03:37:23 +0000
+++ b/NEWS	2010-06-17 19:11:29 +0000
@@ -30,6 +30,8 @@
 BUGFIXES
 --------
 
+* ``switch`` now accepts the ``--directory`` option. (Vincent Ladeuil, #595563)
+
 API BREAKS
 ----------
 

=== modified file 'commands.py'
--- a/commands.py	2010-06-16 03:37:23 +0000
+++ b/commands.py	2010-06-17 16:17:15 +0000
@@ -202,10 +202,13 @@
             return thread[0]
         return to_location
 
-    def run(self, to_location=None, force=False, create_branch=False, revision=None):
+    def run(self, to_location=None, force=False, create_branch=False,
+            revision=None, directory=None):
         # The top of this is cribbed from bzr; because bzr isn't factored out
         # enough.
-        control_dir, path = bzrdir.BzrDir.open_containing('.')
+        if directory is None:
+            directory = u'.'
+        control_dir, path = bzrdir.BzrDir.open_containing(directory)
         if to_location is None:
             if revision is None:
                 raise errors.BzrCommandError(
@@ -223,7 +226,7 @@
                 to_location)
         if from_branch is not None:
             # Note: reopens.
-            (tree, path) = workingtree.WorkingTree.open_containing('.')
+            (tree, path) = workingtree.WorkingTree.open_containing(directory)
             tree = LoomTreeDecorator(tree)
             try:
                 if create_branch:




More information about the bazaar-commits mailing list