/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: 2018-11-16 18:59:44 UTC
  • mfrom: (7143.15.15 more-cleanups)
  • Revision ID: breezy.the.bot@gmail.com-20181116185944-biefv1sub37qfybm
Sprinkle some PEP8iness.

Merged from https://code.launchpad.net/~jelmer/brz/more-cleanups/+merge/358611

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
    """
55
55
    # Based on code from breezy/info.py ...
56
56
    repo_format = repo._format
57
 
    candidates  = []
 
57
    candidates = []
58
58
    non_aliases = set(controldir.format_registry.keys())
59
59
    non_aliases.difference_update(controldir.format_registry.aliases())
60
60
    for key in non_aliases:
97
97
        contents = os.listdir(location)
98
98
        if contents:
99
99
            errors.BzrCommandError("Destination must have a .bzr directory, "
100
 
                " not yet exist or be empty - files found in %s" % (location,))
 
100
                                   " not yet exist or be empty - files found in %s" % (location,))
101
101
    else:
102
102
        try:
103
103
            os.mkdir(location)
104
104
        except IOError as ex:
105
105
            errors.BzrCommandError("Unable to create %s: %s" %
106
 
                (location, ex))
 
106
                                   (location, ex))
107
107
 
108
108
    # Create a repository for the nominated format.
109
109
    trace.note("Creating destination repository ...")