##// END OF EJS Templates
mq: support qimport -
Brendan Cully -
r3547:891c8d20 default
parent child Browse files
Show More
@@ -1337,13 +1337,20 b' class queue:'
1337
1337
1338 for filename in files:
1338 for filename in files:
1339 if existing:
1339 if existing:
1340 if filename == '-':
1341 raise util.Abort(_('-e is incompatible with import from -'))
1340 if not patchname:
1342 if not patchname:
1341 patchname = filename
1343 patchname = filename
1342 if not os.path.isfile(self.join(patchname)):
1344 if not os.path.isfile(self.join(patchname)):
1343 raise util.Abort(_("patch %s does not exist") % patchname)
1345 raise util.Abort(_("patch %s does not exist") % patchname)
1344 else:
1346 else:
1345 try:
1347 try:
1346 text = file(filename).read()
1348 if filename == '-':
1349 if not patchname:
1350 raise util.Abort(_('need --name to import a patch from -'))
1351 text = sys.stdin.read()
1352 else:
1353 text = file(filename).read()
1347 except IOError:
1354 except IOError:
1348 raise util.Abort(_("unable to read %s") % patchname)
1355 raise util.Abort(_("unable to read %s") % patchname)
1349 if not patchname:
1356 if not patchname:
General Comments 0
You need to be logged in to leave comments. Login now