* add an output option to graph command

This commit is contained in:
Eray Özkural
2005-11-03 23:18:27 +00:00
parent 5109c95f7f
commit ae980cdfd9
+4 -1
View File
@@ -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