[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor/master] have lintchanges check header format.
commit 845d92295f2e4542763d09c74b522a653326006e
Author: Nick Mathewson <nickm@xxxxxxxxxxxxxx>
Date: Mon Dec 22 10:00:34 2014 -0500
have lintchanges check header format.
---
changes/bug13678 | 1 -
changes/feature13192 | 2 +-
scripts/maint/lintChanges.py | 3 +++
scripts/maint/sortChanges.py | 6 +++---
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/changes/bug13678 b/changes/bug13678
index d71b88a..74f6a98 100644
--- a/changes/bug13678
+++ b/changes/bug13678
@@ -1,4 +1,3 @@
-
o Testing:
- In the unit tests, use 'chgrp' to change the group of the unit test
temporary directory to the current user, so that the sticky bit doesn't
diff --git a/changes/feature13192 b/changes/feature13192
index 8a9741c..503979e 100644
--- a/changes/feature13192
+++ b/changes/feature13192
@@ -1,4 +1,4 @@
-m o Major features (hidden services):
+ o Major features (hidden services):
- Add a HiddenServiceStatistics option that allows Tor relays to
gather and publish statistics about hidden service usage, to
better understand the size and volume of the hidden service
diff --git a/scripts/maint/lintChanges.py b/scripts/maint/lintChanges.py
index 2e57295..fcadc5e 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 726a723..e8153e2 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()
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits