From ae980cdfd984b4f744b366001a80cc3726b5ab65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eray=20=C3=96zkural?= Date: Thu, 3 Nov 2005 23:18:27 +0000 Subject: [PATCH] * add an output option to graph command --- pisi/cli/commands.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pisi/cli/commands.py b/pisi/cli/commands.py index 841802ec..c38f6c3f 100644 --- a/pisi/cli/commands.py +++ b/pisi/cli/commands.py @@ -269,6 +269,9 @@ conflicts relations starting from given packages. self.parser.add_option("-a", "--all", action="store_true", default=False, help=_("graph all available packages")) + self.parser.add_option("-o", "--output", action="store", + default='pgraph.dot', + help=_("dot output file")) name = ("graph", None) @@ -293,7 +296,7 @@ conflicts relations starting from given packages. ctx.ui.info(_('Plotting a graph of relations among all installed packages')) a = ctx.installdb.list_installed() g = pisi.api.package_graph(a) - g.write_graphviz(file('pgraph.dot', 'w')) + g.write_graphviz(file(ctx.get_option('output'), 'w')) self.finalize() # option mixins