Rev 2541: gives _create_prefix a 'location' parameter in file:///v/home/vila/src/bugs/create.prefix/

Vincent Ladeuil v.ladeuil+lp at free.fr
Wed Jun 20 15:35:21 BST 2007


At file:///v/home/vila/src/bugs/create.prefix/

------------------------------------------------------------
revno: 2541
revision-id: v.ladeuil+lp at free.fr-20070620143519-qnfnzpqhbur6336r
parent: pqm at pqm.ubuntu.com-20070620092141-cniojlk01bdec2a1
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: create.prefix
timestamp: Wed 2007-06-20 16:35:19 +0200
message:
  gives _create_prefix a 'location' parameter
modified:
  bzrlib/builtins.py             builtins.py-20050830033751-fc01482b9ca23183
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py	2007-06-19 14:49:06 +0000
+++ b/bzrlib/builtins.py	2007-06-20 14:35:19 +0000
@@ -736,8 +736,6 @@
         old_rh = []
         if dir_to is None:
             # The destination doesn't exist; create it.
-            # XXX: Refactor the create_prefix/no_create_prefix code into a
-            #      common helper function
             try:
                 to_transport.mkdir('.')
             except errors.FileExists:
@@ -754,7 +752,7 @@
                         " leading parent directories."
                         % location)
 
-                _create_prefix(to_transport)
+                _create_prefix(to_transport, location)
 
             # Now the target directory exists, but doesn't have a .bzr
             # directory. So we need to create it, along with any work to create
@@ -1287,7 +1285,7 @@
                     "\nYou may supply --create-prefix to create all"
                     " leading parent directories."
                     % location)
-            _create_prefix(to_transport)
+            _create_prefix(to_transport, location)
 
         try:
             existing_bzrdir = bzrdir.BzrDir.open(location)
@@ -3773,7 +3771,7 @@
     return conflicts
 
 
-def _create_prefix(cur_transport):
+def _create_prefix(cur_transport, location):
     needed = [cur_transport]
     # Recurse upwards until we can create a directory successfully
     while True:



More information about the bazaar-commits mailing list