(Steve Dougherty)
2013-07-09: Abort pull request in case of empty message. Abort pull request in case of empty message.
diff --git a/infocalypse/wot.py b/infocalypse/wot.py --- a/infocalypse/wot.py +++ b/infocalypse/wot.py @@ -63,11 +63,11 @@ HG: Following lines are the body of the HG: Below is the machine-readable footer describing the request. Modifying it HG: might make it not work. {1}""".format(VCS_PREFIX, footer), from_identifier) - # TODO: Abort in the case of a blank message? - # Markdown support would be on receiving end. Maybe CLI preview eventually. - # (Would that even work?) # TODO: Save message and load later in case sending fails. + if not source_text: + raise util.Abort("Empty pull request message.") + source_lines = source_text.splitlines() source_lines = [line for line in source_lines if not line.startswith('HG:')]