/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: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-28 02:47:10 UTC
  • mfrom: (7519.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200728024710-a2ylds219f1lsl62
Merge lp:brz/3.1.

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

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