import sys
import terminal
+import checkpatch
import settings
Args:
fname: filename of patch file to apply
"""
+ col = terminal.Color()
cmd = ['git', 'am', fname]
pipe = subprocess.Popen(cmd, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
print line
match = re_error.match(line)
if match:
- print GetWarningMsg('warning', match.group(1), int(match.group(2)),
- 'Patch failed')
+ print checkpatch.GetWarningMsg(col, 'warning', match.group(1),
+ int(match.group(2)), 'Patch failed')
return pipe.returncode == 0, stdout
def ApplyPatches(verbose, args, start_point):