Skip to content

Commit

Permalink
fix unnecessary escapes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Sobolev committed Nov 10, 2015
1 parent c252fde commit 4285c64
Show file tree
Hide file tree
Showing 10 changed files with 12 additions and 12 deletions.
2 changes: 1 addition & 1 deletion master/buildbot/clients/tryclient.py
Expand Up @@ -263,7 +263,7 @@ def readPatch(self, res, patchlevel):
found = False
for line in res.split("\n"):
m = re.search('==== //depot/' + self.branch
+ r'/([\w\/\.\d\-\_]+)#(\d+) -', line)
+ r'/([\w/\.\d\-_]+)#(\d+) -', line)
if m:
mpatch += "--- %s#%s\n" % (m.group(1), m.group(2))
mpatch += "+++ %s\n" % (m.group(1))
Expand Down
6 changes: 3 additions & 3 deletions master/buildbot/config.py
Expand Up @@ -97,9 +97,9 @@ def __init__(self):

self.validation = dict(
branch=re.compile(r'^[\w.+/~-]*$'),
revision=re.compile(r'^[ \w\.\-\/]*$'),
property_name=re.compile(r'^[\w\.\-\/\~:]*$'),
property_value=re.compile(r'^[\w\.\-\/\~:]*$'),
revision=re.compile(r'^[ \w\.\-/]*$'),
property_name=re.compile(r'^[\w\.\-/~:]*$'),
property_value=re.compile(r'^[\w\.\-/~:]*$'),
)
self.db = dict(
db_url=DEFAULT_DB_URL,
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/steps/shell.py
Expand Up @@ -376,7 +376,7 @@ class WarningCountingShellCommand(ShellCommand, CompositeStepMixin):
directoryLeavePattern = "make.*: Leaving directory"
suppressionFile = None

commentEmptyLineRe = re.compile(r"^\s*(\#.*)?$")
commentEmptyLineRe = re.compile(r"^\s*(#.*)?$")
suppressionLineRe = re.compile(r"^\s*(.+?)\s*:\s*(.+?)\s*(?:[:]\s*([0-9]+)(?:-([0-9]+))?\s*)?$")

def __init__(self,
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/steps/source/svn.py
Expand Up @@ -411,7 +411,7 @@ def computeSourceRevision(self, changes):
@staticmethod
def svnUriCanonicalize(uri):
collapse = re.compile(r'([^/]+/\.\./?|/\./|//|/\.$|/\.\.$|^/\.\.)')
server_authority = re.compile(r'^(?:([^\@]+)\@)?([^\:]+)(?:\:(.+))?$')
server_authority = re.compile(r'^(?:([^@]+)@)?([^:]+)(?::(.+))?$')
default_port = {'http': '80',
'https': '443',
'svn': '3690'}
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/util/identifiers.py
Expand Up @@ -19,7 +19,7 @@

ident_re = re.compile('^[a-zA-Z_-][a-zA-Z0-9_-]*$')
initial_re = re.compile('^[^a-zA-Z_-]')
subsequent_re = re.compile('[^a-zA-Z-0-9_-]')
subsequent_re = re.compile('[^a-zA-Z0-9_-]')
trailing_digits_re = re.compile('_([0-9]+)$')


Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/www/hooks/github.py
Expand Up @@ -160,7 +160,7 @@ def _process_change(self, payload, user, repo, repo_url, project):
refname = payload['ref']

# We only care about regular heads, i.e. branches
match = re.match(r"^refs\/heads\/(.+)$", refname)
match = re.match(r"^refs/heads/(.+)$", refname)
if not match:
log.msg("Ignoring refname `%s': Not a branch" % refname)
return changes
Expand Down
2 changes: 1 addition & 1 deletion master/buildbot/www/hooks/gitlab.py
Expand Up @@ -33,7 +33,7 @@ def _process_change(payload, user, repo, repo_url, project, codebase=None):
refname = payload['ref']

# We only care about regular heads, i.e. branches
match = re.match(r"^refs\/heads\/(.+)$", refname)
match = re.match(r"^refs/heads/(.+)$", refname)
if not match:
log.msg("Ignoring refname `%s': Not a branch" % refname)
return changes
Expand Down
2 changes: 1 addition & 1 deletion master/contrib/buildbot_cvs_mail.py
Expand Up @@ -70,7 +70,7 @@ def sendmail(self, address, email, msg):
sys.stdout.write(msg)


rfc822_specials_re = re.compile(r'[\(\)\<\>\@\,\;\:\\\"\.\[\]]')
rfc822_specials_re = re.compile(r'[\(\)<>@,;:\\\"\.\[\]]')


def quotename(name):
Expand Down
2 changes: 1 addition & 1 deletion master/contrib/git_buildbot.py
Expand Up @@ -321,7 +321,7 @@ def process_tag_change(oldrev, newrev, refname, tag):

def process_change(oldrev, newrev, refname):
# Identify the change as a branch, tag or other, and process it
m = re.match(r"^refs\/(heads|tags)\/(.+)$", refname)
m = re.match(r"^refs/(heads|tags)/(.+)$", refname)
if not m:
logging.info("Ignoring refname `%s': Not a branch or tag", refname)
return
Expand Down
2 changes: 1 addition & 1 deletion master/contrib/github_buildbot.py
Expand Up @@ -176,7 +176,7 @@ def handle_push(self, payload, repo, repo_url):
changes = None
refname = payload['ref']

m = re.match(r"^refs\/(heads|tags)\/(.+)$", refname)
m = re.match(r"^refs/(heads|tags)/(.+)$", refname)
if not m:
logging.info(
"Ignoring refname `%s': Not a branch or a tag", refname)
Expand Down

0 comments on commit 4285c64

Please sign in to comment.