##// END OF EJS Templates
patch: migrate to util.iterfile
Jun Wu -
r30397:564b33ac default
parent child Browse files
Show More
@@ -1069,7 +1069,7 b' the hunk is left unchanged.'
1069 # Remove comment lines
1069 # Remove comment lines
1070 patchfp = open(patchfn)
1070 patchfp = open(patchfn)
1071 ncpatchfp = stringio()
1071 ncpatchfp = stringio()
1072 for line in patchfp:
1072 for line in util.iterfile(patchfp):
1073 if not line.startswith('#'):
1073 if not line.startswith('#'):
1074 ncpatchfp.write(line)
1074 ncpatchfp.write(line)
1075 patchfp.close()
1075 patchfp.close()
@@ -2012,7 +2012,7 b' def _externalpatch(ui, repo, patcher, pa'
2012 fp = util.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
2012 fp = util.popen('%s %s -p%d < %s' % (patcher, ' '.join(args), strip,
2013 util.shellquote(patchname)))
2013 util.shellquote(patchname)))
2014 try:
2014 try:
2015 for line in fp:
2015 for line in util.iterfile(fp):
2016 line = line.rstrip()
2016 line = line.rstrip()
2017 ui.note(line + '\n')
2017 ui.note(line + '\n')
2018 if line.startswith('patching file '):
2018 if line.startswith('patching file '):
General Comments 0
You need to be logged in to leave comments. Login now