hgext/mq.py
changeset 6940 05ec27530d04
parent 6937 3aa8ad0e03ba
child 6960 46da38eef1b0
equal deleted inserted replaced
6939:40cacb049ef6 6940:05ec27530d04
  1492                             raise util.Abort(_('need --name to import a patch from -'))
  1492                             raise util.Abort(_('need --name to import a patch from -'))
  1493                         text = sys.stdin.read()
  1493                         text = sys.stdin.read()
  1494                     else:
  1494                     else:
  1495                         text = file(filename, 'rb').read()
  1495                         text = file(filename, 'rb').read()
  1496                 except IOError:
  1496                 except IOError:
  1497                     raise util.Abort(_("unable to read %s") % patchname)
  1497                     raise util.Abort(_("unable to read %s") % filename)
  1498                 if not patchname:
  1498                 if not patchname:
  1499                     patchname = normname(os.path.basename(filename))
  1499                     patchname = normname(os.path.basename(filename))
  1500                 self.check_reserved_name(patchname)
  1500                 self.check_reserved_name(patchname)
  1501                 checkfile(patchname)
  1501                 checkfile(patchname)
  1502                 patchf = self.opener(patchname, "w")
  1502                 patchf = self.opener(patchname, "w")