##// END OF EJS Templates
mq: rename check_reserved_name to checkreservedname
Adrian Buehlmann -
r14584:3343a74e default
parent child Browse files
Show More
@@ -859,7 +859,7 b' class queue(object):'
859 return m, a, r, d
859 return m, a, r, d
860
860
861 _reserved = ('series', 'status', 'guards', '.', '..')
861 _reserved = ('series', 'status', 'guards', '.', '..')
862 def check_reserved_name(self, name):
862 def checkreservedname(self, name):
863 if name in self._reserved:
863 if name in self._reserved:
864 raise util.Abort(_('"%s" cannot be used as the name of a patch')
864 raise util.Abort(_('"%s" cannot be used as the name of a patch')
865 % name)
865 % name)
@@ -873,7 +873,7 b' class queue(object):'
873 % c)
873 % c)
874
874
875 def checkpatchname(self, name, force=False):
875 def checkpatchname(self, name, force=False):
876 self.check_reserved_name(name)
876 self.checkreservedname(name)
877 if not force and os.path.exists(self.join(name)):
877 if not force and os.path.exists(self.join(name)):
878 if os.path.isdir(self.join(name)):
878 if os.path.isdir(self.join(name)):
879 raise util.Abort(_('"%s" already exists as a directory')
879 raise util.Abort(_('"%s" already exists as a directory')
@@ -1809,7 +1809,7 b' class queue(object):'
1809 if filename == '-':
1809 if filename == '-':
1810 raise util.Abort(_('-e is incompatible with import from -'))
1810 raise util.Abort(_('-e is incompatible with import from -'))
1811 filename = normname(filename)
1811 filename = normname(filename)
1812 self.check_reserved_name(filename)
1812 self.checkreservedname(filename)
1813 originpath = self.join(filename)
1813 originpath = self.join(filename)
1814 if not os.path.isfile(originpath):
1814 if not os.path.isfile(originpath):
1815 raise util.Abort(_("patch %s does not exist") % filename)
1815 raise util.Abort(_("patch %s does not exist") % filename)
General Comments 0
You need to be logged in to leave comments. Login now