comparison contrib/check-commit @ 30843:2fb3ae89e4e1 stable

contrib: fix check-commit to not reject commits from `hg sign` and `hg tag` I'm tired of having a spurious red build every time we do a release. Fix it once and for all.
author Augie Fackler <augie@google.com>
date Wed, 18 Jan 2017 23:34:35 -0500
parents 8e805cf27caa
children 47084b5ffd80
comparison
equal deleted inserted replaced
30842:94af7d0c812f 30843:2fb3ae89e4e1
57 57
58 def checkcommit(commit, node=None): 58 def checkcommit(commit, node=None):
59 exitcode = 0 59 exitcode = 0
60 printed = node is None 60 printed = node is None
61 hits = [] 61 hits = []
62 signtag = (afterheader +
63 r'Added (tag [^ ]+|signature) for changeset [a-f0-9]{12}')
64 if re.search(signtag, commit):
65 return 0
62 for exp, msg in errors: 66 for exp, msg in errors:
63 for m in re.finditer(exp, commit): 67 for m in re.finditer(exp, commit):
64 end = m.end() 68 end = m.end()
65 trailing = re.search(r'(\\n)+$', exp) 69 trailing = re.search(r'(\\n)+$', exp)
66 if trailing: 70 if trailing: