changeset 31556 | 448acdee9161 |
parent 31460 | 03d99d08147b |
child 32193 | c6cbd0b66465 |
--- a/hgext/mq.py Fri Mar 10 16:18:43 2017 -0800 +++ b/hgext/mq.py Mon Mar 20 11:38:37 2017 +0900 @@ -1116,6 +1116,10 @@ if name in self._reserved: raise error.Abort(_('"%s" cannot be used as the name of a patch') % name) + if name != name.strip(): + # whitespace is stripped by parseseries() + raise error.Abort(_('patch name cannot begin or end with ' + 'whitespace')) for prefix in ('.hg', '.mq'): if name.startswith(prefix): raise error.Abort(_('patch name cannot begin with "%s"')