raise CmdException, 'No patches applied'
if filename:
- print 'Folding patch "%s"...' % filename,
+ if os.path.exists(filename):
+ print 'Folding patch "%s"...' % filename,
+ else:
+ raise CmdException, 'No such file: %s' % filename
else:
print 'Folding patch from stdin...',
sys.stdout.flush()
bottom = crt_patch.get_bottom()
git.apply_patch(filename, bottom)
elif options.base:
- git.apply_patch(filename, git.rev_parse(options.base))
+ git.apply_patch(filename, git_id(options.base))
else:
git.apply_patch(filename)