From 3719e5201c9df41f6d32b71a9edc4341ab5926fc Mon Sep 17 00:00:00 2001 From: Faik Uygur Date: Fri, 22 Feb 2008 09:51:24 +0000 Subject: [PATCH] dummy workaround for default pisi hs --- pisi/cli/history.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/pisi/cli/history.py b/pisi/cli/history.py index 4cda07a6..ea0c8127 100644 --- a/pisi/cli/history.py +++ b/pisi/cli/history.py @@ -48,7 +48,7 @@ Lists previous operations.""" help=_("Output only the last n operations")) group.add_option("-s", "--snapshot", action="store_true", default=False, help=_("Take snapshot of the current system")) - group.add_option("-t", "--takeback", action="store", type="int", default=1, + group.add_option("-t", "--takeback", action="store", type="int", default=-1, help=_("Takeback to the state after the given operation finished")) def take_snapshot(self): @@ -75,7 +75,11 @@ Lists previous operations.""" if ctx.get_option('snapshot'): self.take_snapshot() + return elif ctx.get_option('takeback'): - self.takeback(ctx.get_option('takeback')) - else: - self.print_history() + opno = ctx.get_option('takeback') + if opno != -1: + self.takeback(opno) + return + + self.print_history()