/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/git/commands.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-06-23 01:17:33 UTC
  • mfrom: (7516.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200623011733-ohfy5ukvyehd2kpf
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/386223

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
            )
88
88
        from ..errors import (
89
89
            BzrError,
90
 
            BzrCommandError,
 
90
            CommandError,
91
91
            NoRepositoryPresent,
92
92
            NotBranchError,
93
93
            )
115
115
 
116
116
        source_repo = Repository.open(src_location)
117
117
        if not isinstance(source_repo, GitRepository):
118
 
            raise BzrCommandError(
 
118
            raise CommandError(
119
119
                gettext("%r is not a git repository") % src_location)
120
120
        try:
121
121
            target_controldir = ControlDir.open_from_transport(dest_transport)
128
128
            target_repo = target_controldir.create_repository(shared=True)
129
129
 
130
130
        if not target_repo.supports_rich_root():
131
 
            raise BzrCommandError(
 
131
            raise CommandError(
132
132
                gettext("Target repository doesn't support rich roots"))
133
133
 
134
134
        interrepo = InterRepository.get(source_repo, target_repo)
187
187
    @display_command
188
188
    def run(self, sha1=None, directory=".", pretty=False):
189
189
        from ..errors import (
190
 
            BzrCommandError,
 
190
            CommandError,
191
191
            )
192
192
        from ..controldir import (
193
193
            ControlDir,
204
204
                try:
205
205
                    obj = object_store[sha1.encode('ascii')]
206
206
                except KeyError:
207
 
                    raise BzrCommandError(
 
207
                    raise CommandError(
208
208
                        gettext("Object not found: %s") % sha1)
209
209
                if pretty:
210
210
                    text = obj.as_pretty_string()
304
304
    def run(self, target, package, directory='.'):
305
305
        from ..branch import Branch
306
306
        from ..errors import (
307
 
            BzrCommandError,
 
307
            CommandError,
308
308
            NoSuchRevision,
309
309
            )
310
310
        from ..trace import warning
318
318
        target_bzr = Repository.open(target)
319
319
        target = getattr(target_bzr, '_git', None)
320
320
        if target is None:
321
 
            raise BzrCommandError("Target not a git repository")
 
321
            raise CommandError("Target not a git repository")
322
322
        git_store = get_object_store(source.repository)
323
323
        with git_store.lock_read():
324
324
            tag_dict = source.tags.get_tag_dict()