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

  • Committer: Jelmer Vernooij
  • Date: 2017-10-26 11:10:38 UTC
  • mfrom: (6791.2.7 python3)
  • Revision ID: jelmer@jelmer.uk-20171026111038-cvils4aykn7ffcju
Merge lp:~jelmer/brz/fix-imports.

Show diffs side-by-side

added added

removed removed

Lines of Context:
47
47
# is not updated (because the parent of commit is already merged, so we don't
48
48
# set new_git_branch to the previously used name)
49
49
 
50
 
from email.Utils import parseaddr
 
50
try:
 
51
    from email.utils import parseaddr
 
52
except ImportError:  # python < 3
 
53
    from email.Utils import parseaddr
51
54
import sys, time, re
52
55
 
53
56
import breezy.branch
101
104
    if '..' in refname:
102
105
        return False
103
106
    for c in refname:
104
 
        if ord(c) < 040 or c in '\177 ~^:?*[':
 
107
        if ord(c) < 0o40 or c in '\177 ~^:?*[':
105
108
            return False
106
109
    if refname[-1] in '/.':
107
110
        return False
131
134
        # '..' in refname
132
135
        r"|\.\."
133
136
        # ord(c) < 040
134
 
        r"|[" + "".join([chr(x) for x in range(040)]) + r"]"
 
137
        r"|[" + "".join([chr(x) for x in range(0o40)]) + r"]"
135
138
        # c in '\177 ~^:?*['
136
139
        r"|[\177 ~^:?*[]"
137
140
        # last char in "/."