* [PATCH] stg export: check if there are any patches to export
@ 2006-01-24 21:25 Pavel Roskin
0 siblings, 0 replies; only message in thread
From: Pavel Roskin @ 2006-01-24 21:25 UTC (permalink / raw)
To: Catalin Marinas; +Cc: git
Otherwise, stg export fails with "list index out of range"
Signed-off-by: Pavel Roskin <proski@gnu.org>
---
stgit/commands/export.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/stgit/commands/export.py b/stgit/commands/export.py
index 096fb68..b8ca133 100644
--- 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
--
Regards,
Pavel Roskin
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-24 21:26 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-24 21:25 [PATCH] stg export: check if there are any patches to export Pavel Roskin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).