* --realise' -> --install'.

This commit is contained in:
Eelco Dolstra 2003-07-07 09:29:40 +00:00
parent 5895c160c4
commit be96c2189c
2 changed files with 5 additions and 8 deletions

View file

@ -21,7 +21,7 @@ static ArgType argType = atpUnknown;
Operations: Operations:
--realise / -r: realise values --install / -i: install (or `realise') values
--delete / -d: delete values --delete / -d: delete values
--query / -q: query stored values --query / -q: query stored values
--add: add values --add: add values
@ -86,8 +86,8 @@ static void getArgType(Strings & flags)
} }
/* Realise values. */ /* Install values. */
static void opRealise(Strings opFlags, Strings opArgs) static void opInstall(Strings opFlags, Strings opArgs)
{ {
getArgType(opFlags); getArgType(opFlags);
if (!opFlags.empty()) throw UsageError("unknown flag"); if (!opFlags.empty()) throw UsageError("unknown flag");
@ -238,8 +238,8 @@ void run(Strings args)
Operation oldOp = op; Operation oldOp = op;
if (arg == "--realise" || arg == "-r") if (arg == "--install" || arg == "-i")
op = opRealise; op = opInstall;
else if (arg == "--delete" || arg == "-d") else if (arg == "--delete" || arg == "-d")
op = opDelete; op = opDelete;
else if (arg == "--add") else if (arg == "--add")

View file

@ -125,11 +125,8 @@ static string queryPathByHashPrefix(Hash hash, const string & prefix)
for (Strings::iterator it = paths.begin(); for (Strings::iterator it = paths.begin();
it != paths.end(); it++) it != paths.end(); it++)
{ {
debug(*it);
string path = *it; string path = *it;
try { try {
debug(path);
debug(prefix);
if (isInPrefix(path, prefix) && hashPath(path) == hash) if (isInPrefix(path, prefix) && hashPath(path) == hash)
return path; return path;
} catch (Error & e) { } catch (Error & e) {