/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/upstream_import.py

  • Committer: Jelmer Vernooij
  • Date: 2020-06-21 02:15:25 UTC
  • mto: (7490.40.23 work)
  • mto: This revision was merged to the branch mainline in revision 7517.
  • Revision ID: jelmer@jelmer.uk-20200621021525-en904vhtu6t0qcv3
Rename BzrCommandError to CommandError.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
from . import urlutils
32
32
from .bzr import generate_ids
33
33
from .controldir import ControlDir, is_control_filename
34
 
from .errors import (BzrError, NoSuchFile, BzrCommandError, NotBranchError)
 
34
from .errors import (BzrError, NoSuchFile, CommandError, NotBranchError)
35
35
from .osutils import (pathjoin, isdir, file_iterator, basename,
36
36
                      file_kind, splitpath)
37
37
from .sixish import (
323
323
        tree = WorkingTree.open_containing('.')[0]
324
324
    with tree.lock_write():
325
325
        if tree.changes_from(tree.basis_tree()).has_changed():
326
 
            raise BzrCommandError("Working tree has uncommitted changes.")
 
326
            raise CommandError("Working tree has uncommitted changes.")
327
327
 
328
328
        try:
329
329
            archive, external_compressor = get_archive_type(source)
333
333
                s.seek(0)
334
334
                import_dir(tree, s)
335
335
            else:
336
 
                raise BzrCommandError('Unhandled import source')
 
336
                raise CommandError('Unhandled import source')
337
337
        else:
338
338
            if archive == 'zip':
339
339
                import_zip(tree, open_from_url(source))