diff options
author | Nick Mathewson <nickm@torproject.org> | 2014-12-22 10:00:34 -0500 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2014-12-22 10:00:34 -0500 |
commit | 845d92295f2e4542763d09c74b522a653326006e (patch) | |
tree | b1013a13afe74de7d0053f62e1dbd16e846e3449 /scripts | |
parent | 441a481bb8ad3639d400f304cc4771e099830cfc (diff) | |
download | tor-845d92295f2e4542763d09c74b522a653326006e.tar.gz tor-845d92295f2e4542763d09c74b522a653326006e.zip |
have lintchanges check header format.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/maint/lintChanges.py | 3 | ||||
-rwxr-xr-x | scripts/maint/sortChanges.py | 6 |
2 files changed, 6 insertions, 3 deletions
diff --git a/scripts/maint/lintChanges.py b/scripts/maint/lintChanges.py index 2e57295860..fcadc5e505 100755 --- a/scripts/maint/lintChanges.py +++ b/scripts/maint/lintChanges.py @@ -28,6 +28,9 @@ def lintfile(fname): lines = contents.split("\n") isBug = ("bug" in lines[0] or "fix" in lines[0]) + if not re.match(r'^ +o (.*)', contents): + warn("header not in format expected") + contents = " ".join(contents.split()) if isBug and not re.search(r'(\d+)', contents): diff --git a/scripts/maint/sortChanges.py b/scripts/maint/sortChanges.py index 726a723f93..e8153e2848 100755 --- a/scripts/maint/sortChanges.py +++ b/scripts/maint/sortChanges.py @@ -18,10 +18,10 @@ def fetch(fn): s = "%s\n" % s.rstrip() return s -def score(s): +def score(s,fname=None): m = re.match(r'^ +o (.*)', s) if not m: - print >>sys.stderr, "Can't score %r"%s + print >>sys.stderr, "Can't score %r from %s"%(s,fname) lw = m.group(1).lower() if lw.startswith("major feature"): score = 0 @@ -41,7 +41,7 @@ def score(s): return (score, lw, s) -changes = [ score(fetch(fn)) for fn in sys.argv[1:] if not fn.endswith('~') ] +changes = [ score(fetch(fn),fn) for fn in sys.argv[1:] if not fn.endswith('~') ] changes.sort() |