# must consist only of lower case letters (a-z), digits (0-9), plus (+)
# and minus (-) signs, and periods (.). They must be at least two
# characters long and must start with an alphanumeric character."
- packagename_re = re.compile("^[a-zA-Z0-9][a-zA-Z0-9\.\+\-~]+$")
+ packagename_re = re.compile(r"^[a-zA-Z0-9][a-zA-Z0-9\.\+\-~]+$")
packagename_msg = """Package names must be at least two characters long, start with an
alphanumeric and can only containg letters (a-z,A-Z), digits
(0-9), plus signs (+), minus signs (-), periods (.) and hyphens (~)"""
# are not allowed; if there is no epoch then colons are not allowed."
# Since we don't know about any epochs and debian revisions yet, the
# last two conditions are not checked.
- upstreamversion_re = re.compile("^[0-9][a-zA-Z0-9\.\+\-\:\~]*$")
+ upstreamversion_re = re.compile(r"^[0-9][a-zA-Z0-9\.\+\-\:\~]*$")
upstreamversion_msg = """Upstream version numbers must start with a digit and can only containg lower case
letters (a-z), digits (0-9), full stops (.), plus signs (+), minus signs
(-), colons (:) and tildes (~)"""
@type comp_type: C{str}
"""
if not comp_type:
- ext = '\w\+'
+ ext = r'\w\+'
else:
ext = Compressor.Exts[comp_type]
- name_regexp = '%s_%s\.orig\.tar\.%s' % (package, version, ext)
+ name_regexp = r'%s_%s\.orig\.tar\.%s' % (package, version, ext)
return super(DebianPristineTar, self).has_commit(name_regexp)
from gbp.scripts.common.hook import Hook
user_customizations = {}
-snapshot_re = re.compile("\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*")
+snapshot_re = re.compile(r"\s*\*\* SNAPSHOT build @(?P<commit>[a-z0-9]+)\s+\*\*")
def guess_version_from_upstream(repo, upstream_tag_format, upstream_branch, cp=None):
if comp_type == 'auto':
if repo and repo.has_pristine_tar_branch():
- regex = 'pristine-tar .* %s_%s\.orig.tar\.' % (source.name, source.upstream_version)
+ regex = r'pristine-tar .* %s_%s\.orig.tar\.' % (source.name, source.upstream_version)
commits = repo.grep_log(regex, repo.pristine_tar_branch, merges=False)
if commits:
commit = commits[-1]
"""Parse 'gbp-pq-topic:' line(s) from commit info"""
commit = commit_info['id']
- topic_regex = 'gbp-pq-topic:\s*(?P<topic>\S.*)'
+ topic_regex = r'gbp-pq-topic:\s*(?P<topic>\S.*)'
mangled_body = ''
topic = ''
# Parse and filter commit message body