[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Monotone-devel] monotone-viz, bash completion and a small bug in 0.
From: |
Richard Levitte - VMS Whacker |
Subject: |
Re: [Monotone-devel] monotone-viz, bash completion and a small bug in 0.14 |
Date: |
Thu, 05 Aug 2004 20:47:47 +0200 (CEST) |
In message <address@hidden> on Thu, 05 Aug 2004 19:30:44 +0200 (CEST), Olivier
Andrieu <address@hidden> said:
oliv__a> And I found a small bug: the db execute command doesn't work
oliv__a> because there's a check that rejects the SQL argument.
Your fix removes all argument count control. An (untested)
alternative that still checks the number of arguments is attached.
-----
Please consider sponsoring my work on free software.
See http://www.free.lp.se/sponsoring.html for details.
--
Richard Levitte address@hidden
http://richard.levitte.org/
# Old manifest: 3fdeb8e9eb459627904f18b8dea0ea302cd5ce74
# New manifest: 234b2a89919840228fc61b1ea52629e89d949805
# Summary of changes:
#
# patch commands.cc
# from 1bc6630f5d08ccc983c76dbba3ea191a75fbf10e
# to 280e3089762a3483c38012c18af0a9cd288b736b
#
--- commands.cc
+++ commands.cc
@@ -2565,22 +2565,30 @@
CMD(db, "database", "init\ninfo\nversion\ndump\nload\nmigrate\nexecute SQL",
"manipulate database state")
{
- if (args.size() != 1)
- throw usage(name);
- if (idx(args, 0)() == "init")
- app.db.initialize();
- else if (idx(args, 0)() == "info")
- app.db.info(cout);
- else if (idx(args, 0)() == "version")
- app.db.version(cout);
- else if (idx(args, 0)() == "dump")
- app.db.dump(cout);
- else if (idx(args, 0)() == "load")
- app.db.load(cin);
- else if (idx(args, 0)() == "migrate")
- app.db.migrate();
- else if (idx(args, 0)() == "execute")
- app.db.debug(idx(args, 1)(), cout);
+ if (args.size() == 1)
+ {
+ if (idx(args, 0)() == "init")
+ app.db.initialize();
+ else if (idx(args, 0)() == "info")
+ app.db.info(cout);
+ else if (idx(args, 0)() == "version")
+ app.db.version(cout);
+ else if (idx(args, 0)() == "dump")
+ app.db.dump(cout);
+ else if (idx(args, 0)() == "load")
+ app.db.load(cin);
+ else if (idx(args, 0)() == "migrate")
+ app.db.migrate();
+ else
+ throw usage(name);
+ }
+ else if (args.size() == 2)
+ {
+ if (idx(args, 0)() == "execute")
+ app.db.debug(idx(args, 1)(), cout);
+ else
+ throw usage(name);
+ }
else
throw usage(name);
}
- [Monotone-devel] monotone-viz, bash completion and a small bug in 0.14, Olivier Andrieu, 2004/08/05
- Re: [Monotone-devel] monotone-viz, bash completion and a small bug in 0.14,
Richard Levitte - VMS Whacker <=
- [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Bruce Stephens, 2004/08/05
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Olivier Andrieu, 2004/08/06
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Bruce Stephens, 2004/08/06
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Olivier Andrieu, 2004/08/08
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Bruce Stephens, 2004/08/08
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Olivier Andrieu, 2004/08/12
- Re: [Monotone-devel] Re: monotone-viz, bash completion and a small bug in 0.14, Bruce Stephens, 2004/08/12