comparison hgext/mq.py @ 14051:2b1226693c70 stable

mq: add '.' and '..' to list of forbidden patch names When an empty string is being passed to normname it would return '.' causing checkfile() to always return that a patch with that name exists.
author Idan Kamara <idankk86@gmail.com>
date Fri, 29 Apr 2011 22:21:13 +0300
parents 794f4476b974
children ecaa78594983 31ec4d7eb63f
comparison
equal deleted inserted replaced
14050:9e8a9d45945c 14051:2b1226693c70
832 raise util.Abort(_("local changes found, refresh first")) 832 raise util.Abort(_("local changes found, refresh first"))
833 else: 833 else:
834 raise util.Abort(_("local changes found")) 834 raise util.Abort(_("local changes found"))
835 return m, a, r, d 835 return m, a, r, d
836 836
837 _reserved = ('series', 'status', 'guards') 837 _reserved = ('series', 'status', 'guards', '.', '..')
838 def check_reserved_name(self, name): 838 def check_reserved_name(self, name):
839 if (name in self._reserved or name.startswith('.hg') 839 if (name in self._reserved or name.startswith('.hg')
840 or name.startswith('.mq') or '#' in name or ':' in name): 840 or name.startswith('.mq') or '#' in name or ':' in name):
841 raise util.Abort(_('"%s" cannot be used as the name of a patch') 841 raise util.Abort(_('"%s" cannot be used as the name of a patch')
842 % name) 842 % name)