Closed
Bug 1173881
Opened 9 years ago
Closed 9 years ago
Reject commit messages with ' r?'
Categories
(Developer Services :: Mercurial: hg.mozilla.org, defect)
Developer Services
Mercurial: hg.mozilla.org
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: poiru, Assigned: poiru)
Details
Attachments
(1 file, 1 obsolete file)
2.92 KB,
patch
|
gps
:
review+
|
Details | Diff | Splinter Review |
Assignee | ||
Comment 1•9 years ago
|
||
I didn't find false positives with this simple check (see link in comment 0).
Attachment #8621109 -
Flags: review?(gps)
Comment 2•9 years ago
|
||
Comment on attachment 8621109 [details] [diff] [review] Reject commit messages with ' r?' Review of attachment 8621109 [details] [diff] [review]: ----------------------------------------------------------------- ::: hghooks/mozhghooks/commit-message.py @@ +52,5 @@ > if "[PATCH" in desc: > message("Rev {rev} contains git-format-patch \"[PATCH]\" cruft. Use git-format-patch -k to avoid this.") > return False > > + if " r?" in firstline: This is slightly too greedy for my liking since it will flag "Fix bug with r? detection". We probably want the regexp 'r\?\w' to match "r?" followed by some characters. Feel free to request review on an updated patch or submit this and file a follow-up bug.
Attachment #8621109 -
Flags: review?(gps) → review+
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Gregory Szorc [:gps] from comment #2) > This is slightly too greedy for my liking since it will flag "Fix bug with > r? detection". We probably want the regexp 'r\?\w' to match "r?" followed by > some characters. Done.
Attachment #8621109 -
Attachment is obsolete: true
Attachment #8621227 -
Flags: review?(gps)
Comment 4•9 years ago
|
||
Comment on attachment 8621227 [details] [diff] [review] Reject commit messages with 'r?' Review of attachment 8621227 [details] [diff] [review]: ----------------------------------------------------------------- ::: hghooks/mozhghooks/commit-message.py @@ +17,5 @@ > > import re > from mercurial.node import hex > > +INVALID_REVIEW_FLAG_RE = re.compile(r'[\s;.]r\?\w') This may not be greedy enough! But it should be good for most scenarios. When it comes to potentially getting in the way of user workflows, I'd rather cast a narrow net before a wide one.
Attachment #8621227 -
Flags: review?(gps) → review+
Assignee | ||
Comment 5•9 years ago
|
||
http://hg.mozilla.org/hgcustom/version-control-tools/rev/f74a7a7f5e86
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Comment 6•9 years ago
|
||
Deployed to production.
Updated•9 years ago
|
Flags: sec-review?
Flags: needs-treeclosure?
Flags: needinfo?
Flags: cab-review?
Updated•9 years ago
|
Flags: sec-review?
Flags: needinfo?
Updated•9 years ago
|
Flags: needs-treeclosure?
Flags: cab-review?
You need to log in
before you can comment on or make changes to this bug.
Description
•