~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Robert Collins
  • Date: 2009-04-23 23:35:44 UTC
  • mto: This revision was merged to the branch mainline in revision 4304.
  • Revision ID: robertc@robertcollins.net-20090423233544-3dfus3gca15ita16
Report errors back in the UI layer for push, to use the url the user gave us.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1155
1155
                create_prefix=create_prefix, use_existing_dir=use_existing_dir)
1156
1156
        except errors.FileExists:
1157
1157
            if not use_existing_dir:
1158
 
                raise errors.BzrCommandError("Target directory %s"
1159
 
                     " already exists, but does not have a valid .bzr"
1160
 
                     " directory. Supply --use-existing-dir to push"
1161
 
                     " there anyway." % to_transport.base)
 
1158
                raise
1162
1159
        except errors.NoSuchFile:
1163
1160
            if not create_prefix:
1164
 
                raise errors.BzrCommandError("Parent directory of %s"
1165
 
                    " does not exist."
1166
 
                    "\nYou may supply --create-prefix to create all"
1167
 
                    " leading parent directories."
1168
 
                    % to_transport.base)
1169
 
        except errors.TooManyRedirections:
1170
 
            raise errors.BzrCommandError("Too many redirections trying "
1171
 
                                         "to make %s." % to_transport.base)
 
1161
                raise
1172
1162
        return dir_to.open_branch()
1173
1163
 
1174
1164
    def create_checkout(self, to_location, revision_id=None,