diff --git a/pisi/cli/history.py b/pisi/cli/history.py index 2ef34586..89db3c75 100644 --- a/pisi/cli/history.py +++ b/pisi/cli/history.py @@ -54,7 +54,7 @@ Lists previous operations.""" def print_history(self): for operation in self.historydb.get_last(ctx.get_option('last')): - print _("Operation: %s") % operation.type + print _("Operation #%03d: %s") % (operation.no, operation.type) print _("Date: %s %s") % (operation.date, operation.time) print diff --git a/pisi/db/historydb.py b/pisi/db/historydb.py index 357e38c8..fc0038ef 100644 --- a/pisi/db/historydb.py +++ b/pisi/db/historydb.py @@ -50,4 +50,5 @@ class HistoryDB(lazydb.LazyDB): count = count or len(self.__logs) for log in self.__logs[:count]: hist = pisi.history.History(os.path.join(ctx.config.history_dir(), log)) + hist.operation.no = int(log.split("_")[0]) yield hist.operation