aboutsummaryrefslogtreecommitdiff
path: root/src/nix-store/nix-store.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2010-06-21 07:55:38 +0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2010-06-21 07:55:38 +0000
commitbf87cc44b4484df74388b526c89884fea166ab7f (patch)
tree18a9a0e77d2e2a027eac094b3cdb43d6dd988cf4 /src/nix-store/nix-store.cc
parentd1f6c0cbe39b509545f809f08cbd580859f38e34 (diff)
parentb57189174f6e11c3e9e0f7c65c08a72f689fe194 (diff)
* Sync with the trunk.
Diffstat (limited to 'src/nix-store/nix-store.cc')
-rw-r--r--src/nix-store/nix-store.cc14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/nix-store/nix-store.cc b/src/nix-store/nix-store.cc
index 3b34b9dae..b6ece30ce 100644
--- a/src/nix-store/nix-store.cc
+++ b/src/nix-store/nix-store.cc
@@ -6,6 +6,7 @@
#include "archive.hh"
#include "shared.hh"
#include "dotgraph.hh"
+#include "xmlgraph.hh"
#include "local-store.hh"
#include "util.hh"
#include "help.txt.hh"
@@ -226,7 +227,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
{
enum { qOutputs, qRequisites, qReferences, qReferrers
, qReferrersClosure, qDeriver, qBinding, qHash
- , qTree, qGraph, qResolve, qRoots } query = qOutputs;
+ , qTree, qGraph, qXml, qResolve, qRoots } query = qOutputs;
bool useOutput = false;
bool includeOutputs = false;
bool forceRealise = false;
@@ -249,6 +250,7 @@ static void opQuery(Strings opFlags, Strings opArgs)
else if (*i == "--hash") query = qHash;
else if (*i == "--tree") query = qTree;
else if (*i == "--graph") query = qGraph;
+ else if (*i == "--xml") query = qXml;
else if (*i == "--resolve") query = qResolve;
else if (*i == "--roots") query = qRoots;
else if (*i == "--use-output" || *i == "-u") useOutput = true;
@@ -327,7 +329,15 @@ static void opQuery(Strings opFlags, Strings opArgs)
PathSet roots;
foreach (Strings::iterator, i, opArgs)
roots.insert(maybeUseOutput(followLinksToStorePath(*i), useOutput, forceRealise));
- printDotGraph(roots);
+ printDotGraph(roots);
+ break;
+ }
+
+ case qXml: {
+ PathSet roots;
+ foreach (Strings::iterator, i, opArgs)
+ roots.insert(maybeUseOutput(followLinksToStorePath(*i), useOutput, forceRealise));
+ printXmlGraph(roots);
break;
}