/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/push.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-23 01:02:30 UTC
  • mfrom: (7490.40.27 work)
  • mto: This revision was merged to the branch mainline in revision 7517.
  • Revision ID: jelmer@jelmer.uk-20200623010230-62nnywznmb76h6ut
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
93
93
                                                      create_prefix=create_prefix, use_existing_dir=use_existing_dir,
94
94
                                                      no_tree=no_tree)
95
95
        except errors.AlreadyControlDirError:
96
 
            raise errors.BzrCommandError(gettext(
 
96
            raise errors.CommandError(gettext(
97
97
                "Target directory %s already contains a .bzr directory, "
98
98
                "but it is not valid.") % (location,))
99
99
        except errors.FileExists:
100
100
            if not use_existing_dir:
101
 
                raise errors.BzrCommandError(gettext("Target directory %s"
 
101
                raise errors.CommandError(gettext("Target directory %s"
102
102
                                                     " already exists, but does not have a .bzr"
103
103
                                                     " directory. Supply --use-existing-dir to push"
104
104
                                                     " there anyway.") % location)
107
107
            raise
108
108
        except errors.NoSuchFile:
109
109
            if not create_prefix:
110
 
                raise errors.BzrCommandError(gettext("Parent directory of %s"
 
110
                raise errors.CommandError(gettext("Parent directory of %s"
111
111
                                                     " does not exist."
112
112
                                                     "\nYou may supply --create-prefix to create all"
113
113
                                                     " leading parent directories.")
119
119
            # UnboundLocalError for br_to.
120
120
            raise
121
121
        except errors.TooManyRedirections:
122
 
            raise errors.BzrCommandError(gettext("Too many redirections trying "
 
122
            raise errors.CommandError(gettext("Too many redirections trying "
123
123
                                                 "to make %s.") % location)
124
124
        push_result = PushResult()
125
125
        # TODO: Some more useful message about what was copied
145
145
            push_result = dir_to.push_branch(br_from, revision_id, overwrite,
146
146
                                             remember, create_prefix, lossy=lossy)
147
147
        except errors.DivergedBranches:
148
 
            raise errors.BzrCommandError(gettext('These branches have diverged.'
 
148
            raise errors.CommandError(gettext('These branches have diverged.'
149
149
                                                 '  See "brz help diverged-branches"'
150
150
                                                 ' for more information.'))
151
151
        except errors.NoRoundtrippingSupport as e:
152
 
            raise errors.BzrCommandError(
 
152
            raise errors.CommandError(
153
153
                gettext("It is not possible to losslessly "
154
154
                        "push to %s. You may want to use --lossy.") %
155
155
                e.target_branch.mapping.vcs.abbreviation)
156
156
        except errors.NoRepositoryPresent:
157
157
            # we have a controldir but no branch or repository
158
158
            # XXX: Figure out what to do other than complain.
159
 
            raise errors.BzrCommandError(gettext("At %s you have a valid .bzr"
 
159
            raise errors.CommandError(gettext("At %s you have a valid .bzr"
160
160
                                                 " control directory, but not a branch or repository. This"
161
161
                                                 " is an unsupported configuration. Please move the target"
162
162
                                                 " directory out of the way and try again.") % location)