/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/plugins/fastimport/helpers.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 20:02:36 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322200236-fsbl91ktcn6fcbdd
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
 
16
16
"""Miscellaneous useful stuff."""
17
17
 
 
18
from __future__ import absolute_import
 
19
 
18
20
import stat
19
21
 
20
22
from ... import (
94
96
    if os.path.exists(location):
95
97
        contents = os.listdir(location)
96
98
        if contents:
97
 
            errors.CommandError("Destination must have a .bzr directory, "
 
99
            errors.BzrCommandError("Destination must have a .bzr directory, "
98
100
                                   " not yet exist or be empty - files found in %s" % (location,))
99
101
    else:
100
102
        try:
101
103
            os.mkdir(location)
102
104
        except IOError as ex:
103
 
            raise errors.CommandError(
 
105
            raise errors.BzrCommandError(
104
106
                "Unable to create %s: %s" % (location, ex))
105
107
 
106
108
    # Create a repository for the nominated format.