chiark
/
gitweb
/
~mdw
/
stgit
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
4db741b
)
Check whether the file exists in the fold command
author
Catalin Marinas
<catalin.marinas@gmail.com>
Sun, 5 Feb 2006 10:31:27 +0000
(10:31 +0000)
committer
Catalin Marinas
<catalin.marinas@gmail.com>
Sun, 5 Feb 2006 10:31:27 +0000
(10:31 +0000)
This is to avoid an error reported by GIT.
Signed-off-by: Catalin Marinas <catalin.marinas@gmail.com>
stgit/commands/fold.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/commands/fold.py
b/stgit/commands/fold.py
index a9bb7fa715c6d337780b1010ac563e24f3e9ede0..8b796cac6f9404ef59ee0443f9d18a943b7a382b 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:
- 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()