hgext/mq.py
changeset 37559 c4a0626f6b6e
parent 37525 a7de62adcf03
child 37603 678d760c71ff
equal deleted inserted replaced
37558:8a73132214a3 37559:c4a0626f6b6e
  1162                 raise error.Abort(_('patch name cannot begin with "%s"')
  1162                 raise error.Abort(_('patch name cannot begin with "%s"')
  1163                                  % prefix)
  1163                                  % prefix)
  1164         for c in ('#', ':', '\r', '\n'):
  1164         for c in ('#', ':', '\r', '\n'):
  1165             if c in name:
  1165             if c in name:
  1166                 raise error.Abort(_('%r cannot be used in the name of a patch')
  1166                 raise error.Abort(_('%r cannot be used in the name of a patch')
  1167                                  % c)
  1167                                  % pycompat.bytestr(c))
  1168 
  1168 
  1169     def checkpatchname(self, name, force=False):
  1169     def checkpatchname(self, name, force=False):
  1170         self.checkreservedname(name)
  1170         self.checkreservedname(name)
  1171         if not force and os.path.exists(self.join(name)):
  1171         if not force and os.path.exists(self.join(name)):
  1172             if os.path.isdir(self.join(name)):
  1172             if os.path.isdir(self.join(name)):