Skip to content

Commit

Permalink
hghooks: add tests for wip commit message checker (Bug 1749747)
Browse files Browse the repository at this point in the history
--HG--
extra : rebase_source : fc7fec915c3cba4890a20618c24a6947f1623270
extra : histedit_source : 819839fcbe3526d946e19575d33a68096ee53f9b
  • Loading branch information
cgsheeh committed Jan 12, 2022
1 parent 4d976e8 commit 56afe75
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion hghooks/tests/test-commit-messages.t
Original file line number Diff line number Diff line change
Expand Up @@ -469,6 +469,31 @@ Test some bad commit messages
*************************************************************
transaction abort!
rollback completed
abort: pretxnchangegroup.commit_message hook failed
[255]
$ hg strip -r . > /dev/null
Ensure `WIP:` commit messages are rejected.
$ echo a > b
$ hg -q commit -A -m 'WIP: bug 123: this is a wip r=reviewer'
$ hg push
pushing to $TESTTMP/server
searching for changes
adding changesets
adding manifests
adding file changes
************************** ERROR ****************************
Rev c3e477021244 seems to be marked as WIP.
test
WIP: bug 123: this is a wip r=reviewer
*************************************************************
transaction abort!
rollback completed
abort: pretxnchangegroup.commit_message hook failed
Expand All @@ -484,7 +509,7 @@ IGNORE BAD COMMIT MESSAGES should work
adding changesets
adding manifests
adding file changes
added 2 changesets with 2 changes to 1 files
added 2 changesets with 2 changes to 2 files
"try" at the end of words should not trigger the try syntax checking
Expand Down

0 comments on commit 56afe75

Please sign in to comment.