/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-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:
29
29
from . import urlutils
30
30
from .bzr import generate_ids
31
31
from .controldir import ControlDir, is_control_filename
32
 
from .errors import (BzrError, NoSuchFile, BzrCommandError, NotBranchError)
 
32
from .errors import (BzrError, NoSuchFile, CommandError, NotBranchError)
33
33
from .osutils import (pathjoin, isdir, file_iterator, basename,
34
34
                      file_kind, splitpath)
35
35
from .trace import warning
318
318
        tree = WorkingTree.open_containing('.')[0]
319
319
    with tree.lock_write():
320
320
        if tree.changes_from(tree.basis_tree()).has_changed():
321
 
            raise BzrCommandError("Working tree has uncommitted changes.")
 
321
            raise CommandError("Working tree has uncommitted changes.")
322
322
 
323
323
        try:
324
324
            archive, external_compressor = get_archive_type(source)
328
328
                s.seek(0)
329
329
                import_dir(tree, s)
330
330
            else:
331
 
                raise BzrCommandError('Unhandled import source')
 
331
                raise CommandError('Unhandled import source')
332
332
        else:
333
333
            if archive == 'zip':
334
334
                import_zip(tree, open_from_url(source))