# HG changeset patch # User Sune Foldager # Date 1267782596 -3600 # Node ID 92b8c79b34c2a287c061c70a6178cabbf369e362 # Parent b0b19d61d79ae919c44bbecac8cdbebe309d2a80 mq: disallow : in patch names (issue2065) diff -r b0b19d61d79a -r 92b8c79b34c2 hgext/mq.py --- a/hgext/mq.py Thu Mar 04 14:23:54 2010 +0100 +++ b/hgext/mq.py Fri Mar 05 10:49:56 2010 +0100 @@ -813,8 +813,7 @@ _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 -r b0b19d61d79a -r 92b8c79b34c2 tests/test-mq-qnew --- a/tests/test-mq-qnew Thu Mar 04 14:23:54 2010 +0100 +++ b/tests/test-mq-qnew Fri Mar 05 10:49:56 2010 +0100 @@ -21,6 +21,7 @@ hg qnew .hgignore hg qnew .mqfoo hg qnew 'foo#bar' + hg qnew 'foo:bar' hg qinit -c diff -r b0b19d61d79a -r 92b8c79b34c2 tests/test-mq-qnew.out --- a/tests/test-mq-qnew.out Thu Mar 04 14:23:54 2010 +0100 +++ b/tests/test-mq-qnew.out Fri Mar 05 10:49:56 2010 +0100 @@ -7,6 +7,7 @@ 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