Rev 2231: Switch back to --use-existing-dir in http://bzr.arbash-meinel.com/branches/bzr/0.14-working/fix_push_alt
John Arbash Meinel
john at arbash-meinel.com
Wed Feb 7 19:32:04 GMT 2007
At http://bzr.arbash-meinel.com/branches/bzr/0.14-working/fix_push_alt
------------------------------------------------------------
revno: 2231
revision-id: john at arbash-meinel.com-20070207193155-cmko0hwp4jctbwsl
parent: john at arbash-meinel.com-20070207192410-glvftt1r0zvsficw
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: fix_push_alt
timestamp: Wed 2007-02-07 13:31:55 -0600
message:
Switch back to --use-existing-dir
modified:
bzrlib/builtins.py builtins.py-20050830033751-fc01482b9ca23183
bzrlib/tests/blackbox/test_push.py test_push.py-20060329002750-929af230d5d22663
-------------- next part --------------
=== modified file 'bzrlib/builtins.py'
--- a/bzrlib/builtins.py 2007-02-07 19:24:10 +0000
+++ b/bzrlib/builtins.py 2007-02-07 19:31:55 +0000
@@ -628,7 +628,7 @@
Option('create-prefix',
help='Create the path leading up to the branch '
'if it does not already exist'),
- Option('use-existing',
+ Option('use-existing-dir',
help='By default push will fail if the target'
' directory exists, but does not already'
' have a control directory. This flag will'
@@ -638,7 +638,7 @@
encoding_type = 'replace'
def run(self, location=None, remember=False, overwrite=False,
- create_prefix=False, verbose=False, use_existing=False):
+ create_prefix=False, verbose=False, use_existing_dir=False):
# FIXME: Way too big! Put this into a function called from the
# command.
@@ -686,13 +686,11 @@
try:
to_transport.mkdir('.')
except errors.FileExists:
- if not use_existing:
+ if not use_existing_dir:
raise errors.BzrCommandError("Target directory %s"
- " already exists, but does not"
- " have a valid .bzr directory."
- " Supply --use-existing to"
- " push there anyway."
- % location)
+ " already exists, but does not have a valid .bzr"
+ " directory. Supply --use-existing-dir to push"
+ " there anyway." % location)
except errors.NoSuchFile:
if not create_prefix:
raise errors.BzrCommandError("Parent directory of %s"
=== modified file 'bzrlib/tests/blackbox/test_push.py'
--- a/bzrlib/tests/blackbox/test_push.py 2007-01-09 19:54:08 +0000
+++ b/bzrlib/tests/blackbox/test_push.py 2007-02-07 19:31:55 +0000
@@ -185,7 +185,7 @@
self.failUnlessExists('new/tree/a')
def test_push_use_existing(self):
- """'bzr push --use-existing' can push into a dir that already exists.
+ """'bzr push --use-existing-dir' can push into an existing dir.
By default, 'bzr push' will not use an existing, non-versioned dir.
"""
@@ -193,11 +193,11 @@
self.build_tree(['target/'])
self.run_bzr_error(['Target directory ../target already exists',
- 'Supply --use-existing',
+ 'Supply --use-existing-dir',
], 'push', '../target',
working_dir='tree')
-
- self.run_bzr('push', '--use-existing', '../target',
+
+ self.run_bzr('push', '--use-existing-dir', '../target',
working_dir='tree')
new_tree = WorkingTree.open('target')
More information about the bazaar-commits
mailing list