diff --git a/hgext/mq.py b/hgext/mq.py --- a/hgext/mq.py +++ b/hgext/mq.py @@ -813,8 +813,7 @@ class queue(object): _reserved = ('series', 'status', 'guards') def check_reserved_name(self, name): if (name in self._reserved or name.startswith('.hg') - or name.startswith('.mq') or '#' in name - or (os.name == 'nt' and ':' in name)): + or name.startswith('.mq') or '#' in name or ':' in name): raise util.Abort(_('"%s" cannot be used as the name of a patch') % name) diff --git a/tests/test-mq-qnew b/tests/test-mq-qnew --- a/tests/test-mq-qnew +++ b/tests/test-mq-qnew @@ -21,6 +21,7 @@ runtest() { hg qnew .hgignore hg qnew .mqfoo hg qnew 'foo#bar' + hg qnew 'foo:bar' hg qinit -c diff --git a/tests/test-mq-qnew.out b/tests/test-mq-qnew.out --- a/tests/test-mq-qnew.out +++ b/tests/test-mq-qnew.out @@ -7,6 +7,7 @@ abort: "guards" cannot be used as the na abort: ".hgignore" cannot be used as the name of a patch abort: ".mqfoo" cannot be used as the name of a patch abort: "foo#bar" cannot be used as the name of a patch +abort: "foo:bar" cannot be used as the name of a patch % qnew with uncommitted changes uncommitted.patch % qnew implies add