89
br_to = br_from.create_clone_on_transport(to_transport,
90
revision_id=revision_id, stacked_on=stacked_on,
91
create_prefix=create_prefix, use_existing_dir=use_existing_dir)
90
br_to = br_from.create_clone_on_transport(to_transport,
91
revision_id=revision_id, stacked_on=stacked_on,
92
create_prefix=create_prefix, use_existing_dir=use_existing_dir)
93
except errors.FileExists:
94
if not use_existing_dir:
95
raise errors.BzrCommandError("Target directory %s"
96
" already exists, but does not have a valid .bzr"
97
" directory. Supply --use-existing-dir to push"
98
" there anyway." % location)
99
except errors.NoSuchFile:
100
if not create_prefix:
101
raise errors.BzrCommandError("Parent directory of %s"
103
"\nYou may supply --create-prefix to create all"
104
" leading parent directories."
106
except errors.TooManyRedirections:
107
raise errors.BzrCommandError("Too many redirections trying "
108
"to make %s." % location)
92
109
push_result = PushResult()
93
110
# TODO: Some more useful message about what was copied