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:
026c068
)
stg export: check if there are any patches to export
author
Pavel Roskin
<proski@gnu.org>
Tue, 24 Jan 2006 21:25:41 +0000
(16:25 -0500)
committer
Catalin Marinas
<catalin.marinas@gmail.com>
Wed, 25 Jan 2006 21:31:30 +0000
(21:31 +0000)
Otherwise, stg export fails with "list index out of range"
Signed-off-by: Pavel Roskin <proski@gnu.org>
stgit/commands/export.py
patch
|
blob
|
blame
|
history
diff --git
a/stgit/commands/export.py
b/stgit/commands/export.py
index 096fb68a09ef694065083560e04d7686452cc3e1..b8ca133ee7be9906ea8547e1b3232df7f323b1cd 100644
(file)
--- a/
stgit/commands/export.py
+++ b/
stgit/commands/export.py
@@
-124,6
+124,9
@@
def func(parser, options, args):
patches = applied[start_idx:stop_idx]
num = len(patches)
+ if num == 0:
+ raise CmdException, 'No patches applied'
+
zpadding = len(str(num))
if zpadding < 2:
zpadding = 2