chiark
/
gitweb
/
~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add EditorException to stgit/utils.py
[stgit]
/
stgit
/
commands
/
fold.py
diff --git
a/stgit/commands/fold.py
b/stgit/commands/fold.py
index 963c1967c8dd028132c17944d7c9f6bcf603b279..e87ded2154558c8d1cdd72c10370c5f05a28ff67 100644
(file)
--- a/
stgit/commands/fold.py
+++ b/
stgit/commands/fold.py
@@
-60,7
+60,10
@@
def func(parser, options, args):
raise CmdException, 'No patches applied'
if filename:
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()
else:
print 'Folding patch from stdin...',
sys.stdout.flush()
@@
-68,10
+71,10
@@
def func(parser, options, args):
if options.threeway:
crt_patch = crt_series.get_patch(current)
bottom = crt_patch.get_bottom()
if options.threeway:
crt_patch = crt_series.get_patch(current)
bottom = crt_patch.get_bottom()
- git.apply_patch(filename
,
bottom)
+ git.apply_patch(filename
= filename, base =
bottom)
elif options.base:
elif options.base:
- git.apply_patch(filename
, git.rev_parse
(options.base))
+ git.apply_patch(filename
= filename, base = git_id
(options.base))
else:
else:
- git.apply_patch(filename)
+ git.apply_patch(filename
= filename
)
print 'done'
print 'done'