monotone-commits-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Monotone-commits-diffs] net.venge.monotone: 1da4faa048851ffc49d678f023


From: code
Subject: [Monotone-commits-diffs] net.venge.monotone: 1da4faa048851ffc49d678f023ce41526a537af9
Date: Sun, 23 Jan 2011 18:05:21 GMT

revision:            1da4faa048851ffc49d678f023ce41526a537af9
date:                2011-01-23T18:04:06
author:              Richard Levitte <address@hidden>
branch:              net.venge.monotone
changelog:
propagate from branch 'net.venge.monotone.issue-130' (head 
e3116ec35bd77e9419683c331cea14fcb1d2f3cb)
            to branch 'net.venge.monotone' (head 
03eab89789562e6056b6bfb721615023472938a2)

manifest:
format_version "1"

new_manifest [22d8008f42415a7fbc13ad321ec88c20ce6618fa]

old_revision [03eab89789562e6056b6bfb721615023472938a2]

patch "cmd_key_cert.cc"
 from [0b6074acdf9014b625369a976da51ce3677e0630]
   to [071b47b387bf2b8bc33839765e8056f378bc3d81]

patch "cmd_list.cc"
 from [1761568b06cf3afa752a2e6d1611b450cbfae6c4]
   to [d5f1d76cb76151d303cda19a974fe5c86f806d70]

patch "cmd_packet.cc"
 from [31321e792e77dd18121f7689413777c23045537a]
   to [672156d0fefaa0b7ec02795871573a0e4057b89b]

patch "database.cc"
 from [ecdc5c4bc826e966f06d310e35115e41f783df92]
   to [1ca31c776dd4882e3c783f80dbc20e351e5fd908]

patch "database.hh"
 from [18a9504000bb0856b693577e3de47861d7a7f5e0]
   to [66798497f77bc1010b7e5850d2c406eaf1010b2e]

patch "tests/key_management_without_a_database/__driver__.lua"
 from [87ef58d870b76fa10441e6f47654e93b794cebb8]
   to [6f6dccf171baf344b914fdef614ac3856ee792dd]

old_revision [e3116ec35bd77e9419683c331cea14fcb1d2f3cb]

patch "cmd_diff_log.cc"
 from [7bc853e14df844cd704eeb8d3b54ab4fe9bfde06]
   to [94a354875b587d372e6d0898ab6fc8355ce29c21]

patch "cmd_netsync.cc"
 from [732e7c4f6adb6bc8bd96964ab147e53e700053c1]
   to [5b0013c5fa9dd8d362bf5c6c627099e0aaad06da]

patch "contrib/authorize_remote_automate.lua"
 from [9d6f81a90c85dcb1a566755ce5a04d5ba2c23d2a]
   to [6c972b03ef5a025b1b792bc942bfac3a851a530e]

patch "contrib/monotone.bash_completion2"
 from [2da4963e0f3257440d155c166d23f35e2138ccaf]
   to [96bd88bb4ea8c37873f01d83a2ec352e62282190]

patch "database.cc"
 from [194048deac195b53eff970e1c84768c1b4007dec]
   to [1ca31c776dd4882e3c783f80dbc20e351e5fd908]

patch "monotone.texi"
 from [7b8697cc25916c0f68737ac70a22634eb5a5403f]
   to [4f64ca94db9ee9221dd674961f24706bb62e0eee]

patch "netsync.cc"
 from [23b3d65718b94c552bcbb12beb74b3a44f0c8b5e]
   to [bda5adcae7b66d8c3195a4eceae052a225219a17]

patch "po/sv.po"
 from [28ee671ed028cddc15512892efde8c1c88499a6e]
   to [5803557f4c06071a4779b86691548795481d0587]
============================================================
--- database.cc	ecdc5c4bc826e966f06d310e35115e41f783df92
+++ database.cc	1ca31c776dd4882e3c783f80dbc20e351e5fd908
@@ -509,14 +509,14 @@ database_cache database::dbcache;
 
 database_cache database::dbcache;
 
-database::database(app_state & app)
-  : opts(app.opts), lua(app.lua)
+database::database(app_state & app, database::dboptions d)
+  : opts(app.opts), lua(app.lua), dbopts(d)
 {
   init();
 }
 
-database::database(options const & o, lua_hooks & l)
-  : opts(o), lua(l)
+database::database(options const & o, lua_hooks & l, database::dboptions d)
+  : opts(o), lua(l), dbopts(d)
 {
   init();
 }
@@ -526,7 +526,7 @@ database::init()
 {
   database_path_helper helper(lua);
   system_path dbpath;
-  helper.get_database_path(opts, dbpath);
+  helper.get_database_path(opts, dbpath, dbopts);
 
   // FIXME: for all :memory: databases an empty path is returned above, thus
   // all requests for a :memory: database point to the same database
@@ -4930,13 +4930,20 @@ void
 }
 
 void
-database_path_helper::get_database_path(options const & opts, system_path & path)
+database_path_helper::get_database_path(options const & opts,
+                                        system_path & path,
+                                        database::dboptions dbopts)
 {
   if (!opts.dbname_given ||
       (opts.dbname.as_internal().empty() &&
        opts.dbname_alias.empty() &&
        opts.dbname_type != memory_db))
     {
+      if (dbopts == database::maybe_unspecified)
+        {
+          L(FL("no database option given or options empty"));
+          return;
+        }
       E(false, origin::user, F("no database specified"));
     }
 
============================================================
--- database.hh	18a9504000bb0856b693577e3de47861d7a7f5e0
+++ database.hh	66798497f77bc1010b7e5850d2c406eaf1010b2e
@@ -87,8 +87,11 @@ public:
   // --== Opening the database and schema checking ==--
   //
 public:
-  explicit database(app_state & app);
-  database(options const & o, lua_hooks & l);
+  // database options
+  typedef enum { none, maybe_unspecified } dboptions;
+
+  explicit database(app_state & app, dboptions dbopts = none);
+  database(options const & o, lua_hooks & l, dboptions dbopts = none);
   ~database();
 
   system_path get_filename();
@@ -499,6 +502,7 @@ private:
   boost::shared_ptr<database_impl> imp;
   options opts;
   lua_hooks & lua;
+  dboptions dbopts;
 };
 
 // not a member function, defined in database_check.cc
@@ -607,7 +611,8 @@ public:
 public:
   database_path_helper(lua_hooks & l) : lua(l) {}
 
-  void get_database_path(options const & opts, system_path & path);
+  void get_database_path(options const & opts, system_path & path,
+                         database::dboptions dbopts = database::none);
 
   void maybe_set_default_alias(options & opts);
 
============================================================
--- cmd_key_cert.cc	0b6074acdf9014b625369a976da51ce3677e0630
+++ cmd_key_cert.cc	071b47b387bf2b8bc33839765e8056f378bc3d81
@@ -47,7 +47,7 @@ CMD(genkey, "genkey", "", CMD_REF(key_an
     "",
     options::opts::force_duplicate_key)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
 
   if (args.size() != 1)
@@ -80,7 +80,7 @@ CMD_AUTOMATE(generate_key, N_("KEY_NAME 
   E(args.size() == 2, origin::user,
     F("wrong argument count"));
 
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
 
   key_name name = typecast_vocab<key_name>(idx(args, 0));
@@ -124,7 +124,7 @@ dropkey_common(app_state & app,
                args_vector args,
                bool drop_private)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   bool key_deleted = false;
   bool checked_db = false;
@@ -198,7 +198,7 @@ CMD(passphrase, "passphrase", "", CMD_RE
     throw usage(execid);
 
   key_store keys(app);
-  database db(app);
+  database db(app, database::maybe_unspecified);
   project_t project(db);
   key_identity_info identity;
 
@@ -216,7 +216,7 @@ CMD(ssh_agent_export, "ssh_agent_export"
     "",
     options::opts::none)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
@@ -244,7 +244,7 @@ CMD(ssh_agent_add, "ssh_agent_add", "", 
     "",
     options::opts::none)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
============================================================
--- cmd_list.cc	1761568b06cf3afa752a2e6d1611b450cbfae6c4
+++ cmd_list.cc	d5f1d76cb76151d303cda19a974fe5c86f806d70
@@ -359,7 +359,7 @@ CMD(keys, "keys", "", CMD_REF(list), "[P
   if (args.size() > 1)
     throw usage(execid);
 
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
@@ -961,7 +961,7 @@ CMD_AUTOMATE(keys, "",
   E(args.empty(), origin::user,
     F("no arguments needed"));
 
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
============================================================
--- cmd_packet.cc	31321e792e77dd18121f7689413777c23045537a
+++ cmd_packet.cc	672156d0fefaa0b7ec02795871573a0e4057b89b
@@ -85,7 +85,7 @@ pubkey_common(app_state & app,
               args_vector args,
               std::ostream & output)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
@@ -141,7 +141,7 @@ CMD(privkey, "privkey", "", CMD_REF(pack
     "",
     options::opts::none)
 {
-  database db(app);
+  database db(app, database::maybe_unspecified);
   key_store keys(app);
   project_t project(db);
 
============================================================
--- tests/key_management_without_a_database/__driver__.lua	87ef58d870b76fa10441e6f47654e93b794cebb8
+++ tests/key_management_without_a_database/__driver__.lua	6f6dccf171baf344b914fdef614ac3856ee792dd
@@ -2,17 +2,42 @@ mtn_setup()
 mtn_setup()
 
 -- with no database should work
-check(raw_mtn("--keydir=keys", "genkey", "foobar"), 0, false, false,
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "genkey", "foobar"), 0, false, false,
       string.rep("foobar\n", 2))
 
-check(raw_mtn("--keydir=keys", "passphrase", "foobar"), 0, false, false,
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "passphrase", "foobar"), 0, false, false,
       "foobar\n"..string.rep("barfoo\n", 2))
 
-check(raw_mtn("--keydir=keys", "ls", "keys"), 0, false, false)
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "ls", "keys"), 0, false, false)
 
-check(raw_mtn("--keydir=keys", "pubkey", "foobar"), 0, false, false)
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "pubkey", "foobar"), 0, false, false)
 
-check(raw_mtn("--keydir=keys", "dropkey", "foobar"), 0, false, false)
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "privkey", "foobar"), 0, false, false)
 
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "ssh_agent_export", "--key", "foobar"), 0, false, false,
+      "barfoo\n")
+
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "dropkey", "foobar"), 0, false, false)
+
+-- now with the automate interface
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "au", "generate_key", "foobar", "foobar"), 0, false, false)
+
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "au", "keys"), 0, false, false)
+
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "au", "get_public_key", "foobar"), 0, false, false)
+
+check(raw_mtn("--keydir=keys", "--no-workspace",
+	      "dropkey", "foobar"), 0, false, false)
+
 -- with an invalid database should fail
 check(raw_mtn("--keydir=keys", "--db=bork", "genkey", "address@hidden"), 1, false, false, string.rep("address@hidden", 2))
============================================================
--- database.cc	194048deac195b53eff970e1c84768c1b4007dec
+++ database.cc	1ca31c776dd4882e3c783f80dbc20e351e5fd908
@@ -4497,22 +4497,29 @@ database::get_var(var_key const & key, v
 void
 database::get_var(var_key const & key, var_value & value)
 {
-  // FIXME: sillyly inefficient.  Doesn't really matter, though.
-  map<var_key, var_value> vars;
-  get_vars(vars);
-  map<var_key, var_value>::const_iterator i = vars.find(key);
-  I(i != vars.end());
-  value = i->second;
+  results res;
+  imp->fetch(res, one_col, any_rows, 
+             query("SELECT value FROM db_vars "
+                   "WHERE domain = ? AND name = ?")
+                   % text(key.first())
+                   % blob(key.second()));
+  I(res.size() == 1);
+  var_value dbvalue(res[0][0], origin::database);
+  value = dbvalue;
 }
 
 bool
 database::var_exists(var_key const & key)
 {
-  // FIXME: sillyly inefficient.  Doesn't really matter, though.
-  map<var_key, var_value> vars;
-  get_vars(vars);
-  map<var_key, var_value>::const_iterator i = vars.find(key);
-  return i != vars.end();
+  results res;
+  imp->fetch(res, one_col, any_rows,
+             query("SELECT 1 "
+                   "WHERE EXISTS("
+                   "  SELECT 1 FROM db_vars "
+                   "  WHERE domain = ? AND name = ?)")
+                   % text(key.first())
+                   % blob(key.second()));
+  return ! res.empty();
 }
 
 void
============================================================
--- monotone.texi	7b8697cc25916c0f68737ac70a22634eb5a5403f
+++ monotone.texi	4f64ca94db9ee9221dd674961f24706bb62e0eee
@@ -13020,7 +13020,7 @@ @section Implementation Differences
 progress messages, and prevents unexpected out-of-band output in the
 @ref{Automation} interface.
 
-If you explicitely need to write to either stdout or stderr, please use
+If you explicitly need to write to either stdout or stderr, please use
 @code{io.stdout:write} and @code{io.stderr.write}.
 
 @item os.execute, io.popen
============================================================
--- netsync.cc	23b3d65718b94c552bcbb12beb74b3a44f0c8b5e
+++ netsync.cc	bda5adcae7b66d8c3195a4eceae052a225219a17
@@ -110,6 +110,8 @@ call_server(app_state & app,
     instant(0,1);
 
   P(F("connecting to %s") % info->client.get_uri().resource());
+  P(F("  include pattern  %s") % info->client.get_include_pattern());
+  P(F("  exclude pattern  %s") % info->client.get_exclude_pattern());
 
   shared_ptr<Netxx::StreamBase> server
     = build_stream_to_server(app.opts, app.lua, info, timeout);
============================================================
--- po/sv.po	28ee671ed028cddc15512892efde8c1c88499a6e
+++ po/sv.po	5803557f4c06071a4779b86691548795481d0587
@@ -150,12 +150,15 @@
 # work set                        arbetsmängd
 # workspace                       arbetskopia (el. kanske arbetskatalog, ibland)
 #
+# If that isn't enough, maybe having a look at the swedish part of the
+# Translation Project might help:  http://www.tp-sv.se/
+#
 msgid ""
 msgstr ""
 "Project-Id-Version: monotone 0.26pre1\n"
 "Report-Msgid-Bugs-To: address@hidden"
-"POT-Creation-Date: 2011-01-17 12:50+0100\n"
-"PO-Revision-Date: 2011-01-17 13:15+0100\n"
+"POT-Creation-Date: 2011-01-20 14:26+0100\n"
+"PO-Revision-Date: 2011-01-21 15:13+0100\n"
 "Last-Translator: Joel Rosdahl <address@hidden>\n"
 "Language-Team: Richard Levitte <address@hidden>\n"
 "Language: \n"
@@ -947,7 +950,7 @@ msgstr "--message och --message-file få
 msgid "--message and --message-file are mutually exclusive"
 msgstr "--message och --message-file får inte anges samtidigt"
 
-#: cmd_netsync.cc:68 cmd_netsync.cc:766
+#: cmd_netsync.cc:68 cmd_netsync.cc:768
 #, c-format
 msgid "cannot use --exclude in URL mode"
 msgstr "kan inte använda --exclude när en URL används"
@@ -964,25 +967,26 @@ msgstr "Öppnar en koppling till en serv
 msgid "Opens an 'automate stdio' connection to a remote server"
 msgstr "Öppnar en koppling till en server, typ 'automate stdio'"
 
-#: cmd_netsync.cc:122 cmd_netsync.cc:224
-#, c-format
+#: cmd_netsync.cc:122 cmd_netsync.cc:225
+#, fuzzy, c-format
 msgid ""
-"No database given; assuming '%s' database. This means that we can't\n"
-"verify the server key, because we have no record of what it should be."
+"No database given; assuming '%s' database. This means that\n"
+"we can't verify the server key, because we have no record of\n"
+"what it should be."
 msgstr ""
-"Ingen databas angiven; databasen '%s' antagen.  Detta innebär att vi\n"
-"inte kan kolla servernyckeln, eftersom vi inte har någon uppgift om\n"
-"vad den borde vara."
+"Ingen databas angiven; databasen '%s' antagen.  Detta innebär\n"
+"att vi inte kan kolla servernyckeln, eftersom vi inte har\n"
+"någon uppgift om vad den borde vara."
 
-#: cmd_netsync.cc:211
+#: cmd_netsync.cc:212
 msgid "COMMAND [ARGS]"
 msgstr "KOMMANDO [ARGUMENT]"
 
-#: cmd_netsync.cc:212
+#: cmd_netsync.cc:213
 msgid "Executes COMMAND on a remote server"
 msgstr "Kör KOMMANDO på servern i andra änden"
 
-#: cmd_netsync.cc:220 cmd_list.cc:1021 cmd_packet.cc:73 cmd_packet.cc:134
+#: cmd_netsync.cc:221 cmd_list.cc:1021 cmd_packet.cc:73 cmd_packet.cc:134
 #: cmd_packet.cc:254 cmd_key_cert.cc:81 cmd_key_cert.cc:186 cmd_merging.cc:384
 #: cmd_merging.cc:1141 cmd_merging.cc:1219 cmd_ws_commit.cc:1134
 #: cmd_ws_commit.cc:1342 cmd_ws_commit.cc:1456 cmd_ws_commit.cc:1478
@@ -998,41 +1002,41 @@ msgstr "felaktigt antal givna argument"
 msgid "wrong argument count"
 msgstr "felaktigt antal givna argument"
 
-#: cmd_netsync.cc:278
+#: cmd_netsync.cc:280
 #, c-format
 msgid "received remote error code %d"
 msgstr "fick felkod %d från andra änden"
 
-#: cmd_netsync.cc:291
+#: cmd_netsync.cc:293
 #, c-format
 msgid "would receive %d revisions, %d certs, and at least %d keys\n"
 msgstr ""
 "skulle ha tagit emot %d revisioner, %d certifikat och minst %d nycklar\n"
 
-#: cmd_netsync.cc:298
+#: cmd_netsync.cc:300
 #, c-format
 msgid "would receive %d revisions, %d certs, and %d keys\n"
 msgstr "skulle ha tagit emot %d revisioner, %d certifikat och %d nycklar\n"
 
-#: cmd_netsync.cc:306
+#: cmd_netsync.cc:308
 #, c-format
 msgid "would send %d certs and %d keys\n"
 msgstr "skulle ha skickat %d certifikat och %d nycklar\n"
 
-#: cmd_netsync.cc:310
+#: cmd_netsync.cc:312
 #, c-format
 msgid "would send %d revisions\n"
 msgid_plural "would send %d revisions:\n"
 msgstr[0] "skulle ha skickat %d revisioner\n"
 msgstr[1] "skulle ha skickat %d revisioner:\n"
 
-#: cmd_netsync.cc:329
+#: cmd_netsync.cc:331
 #, c-format
 msgid "%9d in branch %s\n"
 msgstr "%9d i grenen %s\n"
 
-#: cmd_netsync.cc:539 cmd_netsync.cc:562 cmd_netsync.cc:588 cmd_netsync.cc:623
-#: cmd_netsync.cc:649 cmd_netsync.cc:689
+#: cmd_netsync.cc:541 cmd_netsync.cc:564 cmd_netsync.cc:590 cmd_netsync.cc:625
+#: cmd_netsync.cc:651 cmd_netsync.cc:691
 msgid ""
 "[URL]\n"
 "[ADDRESS[:PORTNUMBER] [PATTERN ...]]"
@@ -1040,11 +1044,11 @@ msgstr ""
 "[URL]\n"
 "[ADRESS[:PORTNUMMER] [MÖNSTER ...]]"
 
-#: cmd_netsync.cc:540 cmd_netsync.cc:563
+#: cmd_netsync.cc:542 cmd_netsync.cc:565
 msgid "Pushes branches to a netsync server"
 msgstr "Skickar grenar till en netsync-server"
 
-#: cmd_netsync.cc:541
+#: cmd_netsync.cc:543
 msgid ""
 "This will push all branches that match the pattern given in PATTERN to the "
 "netsync server at the address ADDRESS."
@@ -1052,11 +1056,11 @@ msgstr ""
 "Det här kommer att skicka alla grenar som matchar MÖNSTER till netsync-"
 "server på adressen ADRESS"
 
-#: cmd_netsync.cc:589 cmd_netsync.cc:624
+#: cmd_netsync.cc:591 cmd_netsync.cc:626
 msgid "Pulls branches from a netsync server"
 msgstr "Hämtar grenar från netsync-server"
 
-#: cmd_netsync.cc:590
+#: cmd_netsync.cc:592
 msgid ""
 "This pulls all branches that match the pattern given in PATTERN from the "
 "netsync server at the address ADDRESS."
@@ -1064,16 +1068,16 @@ msgstr ""
 "Det här hämtar alla grenar som matchar MÖNSTER till netsync-server på "
 "adressen ADRESS"
 
-#: cmd_netsync.cc:607 cmd_netsync.cc:844
+#: cmd_netsync.cc:609 cmd_netsync.cc:846
 #, c-format
 msgid "doing anonymous pull; use -kKEYNAME if you need authentication"
 msgstr "hämtar anonymt; använd -kNYCKELNAMN om du behöver autentisera"
 
-#: cmd_netsync.cc:650 cmd_netsync.cc:690
+#: cmd_netsync.cc:652 cmd_netsync.cc:692
 msgid "Synchronizes branches with a netsync server"
 msgstr "Synkronisera grenar med en netsync-server"
 
-#: cmd_netsync.cc:651
+#: cmd_netsync.cc:653
 msgid ""
 "This synchronizes branches that match the pattern given in PATTERN with the "
 "netsync server at the address ADDRESS."
@@ -1081,7 +1085,7 @@ msgstr ""
 "Det här synkronisera grenar som matchar MÖNSTER med netsync-server på "
 "adressen ADRESS"
 
-#: cmd_netsync.cc:721
+#: cmd_netsync.cc:723
 msgid ""
 "URL [DIRECTORY]\n"
 "HOST[:PORTNUMBER] BRANCH [DIRECTORY]"
@@ -1089,11 +1093,11 @@ msgstr ""
 "URL [KATALOG]\n"
 "ADRESS[:PORTNUMMER] GREN [KATALOG]"
 
-#: cmd_netsync.cc:722
+#: cmd_netsync.cc:724
 msgid "Checks out a revision from a remote database into a directory"
 msgstr "Hämtar en revision från en databas på en annan dator till en katalog"
 
-#: cmd_netsync.cc:723
+#: cmd_netsync.cc:725
 msgid ""
 "If a revision is given, that's the one that will be checked out.  Otherwise, "
 "it will be the head of the branch supplied.  If no directory is given, the "
@@ -1103,63 +1107,63 @@ msgstr ""
 "kommer lövet i grenen (implicit eller angiven) att hämtas. Om ingen katalog "
 "anges kommer grenens namn att användas som katalognamn."
 
-#: cmd_netsync.cc:742
+#: cmd_netsync.cc:744
 #, c-format
 msgid "the --branch option is only valid with an URI to clone"
 msgstr "Flaggan --branch kan enbart användas tillsammans med en URL"
 
-#: cmd_netsync.cc:791
+#: cmd_netsync.cc:793
 #, c-format
 msgid "you must specify an unambiguous branch to clone"
 msgstr "du måste ange en unik gren att klona"
 
-#: cmd_netsync.cc:823
+#: cmd_netsync.cc:825
 #, c-format
 msgid "clone destination directory '%s' already exists"
 msgstr "kloningens tilltänkta katalog '%s' finns redan"
 
-#: cmd_netsync.cc:830 cmd_ws_commit.cc:1842 cmd_ws_commit.cc:1931
+#: cmd_netsync.cc:832 cmd_ws_commit.cc:1842 cmd_ws_commit.cc:1931
 #, c-format
 msgid "bookkeeping directory already exists in '%s'"
 msgstr "det finns redan en administrativ katalog i '%s'"
 
-#: cmd_netsync.cc:864 cmd_merging.cc:535 cmd_merging.cc:636 cmd_merging.cc:641
+#: cmd_netsync.cc:866 cmd_merging.cc:535 cmd_merging.cc:636 cmd_merging.cc:641
 #: cmd_merging.cc:1471 cmd_ws_commit.cc:1030
 #, c-format
 msgid "branch '%s' is empty"
 msgstr "grenen '%s' är tom"
 
-#: cmd_netsync.cc:867 cmd_ws_commit.cc:1033 cmd_ws_commit.cc:1910
+#: cmd_netsync.cc:869 cmd_ws_commit.cc:1033 cmd_ws_commit.cc:1910
 #, c-format
 msgid "branch %s has multiple heads:"
 msgstr "grenen %s har flera löv:"
 
-#: cmd_netsync.cc:871
+#: cmd_netsync.cc:873
 #, c-format
 msgid "choose one with '%s clone -r<id> URL'"
 msgstr "välj ett med '%s clone -r<id> URL'"
 
-#: cmd_netsync.cc:872 cmd_ws_commit.cc:1039 cmd_ws_commit.cc:1916
+#: cmd_netsync.cc:874 cmd_ws_commit.cc:1039 cmd_ws_commit.cc:1916
 #, c-format
 msgid "branch %s has multiple heads"
 msgstr "grenen %s har flera löv"
 
-#: cmd_netsync.cc:883 cmd_ws_commit.cc:1054 cmd_ws_commit.cc:1896
+#: cmd_netsync.cc:885 cmd_ws_commit.cc:1054 cmd_ws_commit.cc:1896
 #, c-format
 msgid "revision %s is not a member of branch %s"
 msgstr "revisionen %s är inte med i grenen %s"
 
-#: cmd_netsync.cc:916
+#: cmd_netsync.cc:918
 #, c-format
 msgid "pid file '%s' already exists"
 msgstr "pid-filen '%s' finns redan"
 
-#: cmd_netsync.cc:918
+#: cmd_netsync.cc:920
 #, c-format
 msgid "failed to create pid file '%s'"
 msgstr "misslyckades med att skapa pid-filen %s"
 
-#: cmd_netsync.cc:941
+#: cmd_netsync.cc:943
 msgid "Serves the database to connecting clients"
 msgstr "Servera databasen till anslutande klienter"
 
@@ -4806,7 +4810,7 @@ msgid "key '%s' has hash '%s'"
 #: key_store.cc:762
 #, c-format
 msgid "key '%s' has hash '%s'"
-msgstr "nyckeln '%s' has kontrollsumman '%s'"
+msgstr "nyckeln '%s' har kontrollsumman '%s'"
 
 #: key_store.cc:828
 #, c-format
@@ -8508,4 +8512,3 @@ msgstr "Tryck [Retur] när underprocesse
 #: std_hooks.lua:58
 msgid "Press enter when the subprocess has completed"
 msgstr "Tryck [Retur] när underprocessen är klar"
-
============================================================
--- cmd_diff_log.cc	7bc853e14df844cd704eeb8d3b54ab4fe9bfde06
+++ cmd_diff_log.cc	94a354875b587d372e6d0898ab6fc8355ce29c21
@@ -989,7 +989,7 @@ CMD_AUTOMATE(log, N_("[PATH] ..."),
 }
 
 CMD_AUTOMATE(log, N_("[PATH] ..."),
-             N_("list selected revision history"),
+             N_("Lists the selected revision history"),
              "",
     options::opts::last | options::opts::next |
     options::opts::from | options::opts::to |
============================================================
--- cmd_netsync.cc	732e7c4f6adb6bc8bd96964ab147e53e700053c1
+++ cmd_netsync.cc	5b0013c5fa9dd8d362bf5c6c627099e0aaad06da
@@ -119,8 +119,9 @@ CMD_AUTOMATE_NO_STDIO(remote_stdio,
 
   if (!app.opts.dbname_given)
     {
-      W(F("No database given; assuming '%s' database. This means that we can't\n"
-          "verify the server key, because we have no record of what it should be.")
+      W(F("No database given; assuming '%s' database. This means that\n"
+          "we can't verify the server key, because we have no record of\n"
+          "what it should be.")
           % memory_db_identifier);
       app.opts.dbname_type = memory_db;
       app.opts.dbname_given = true;
@@ -221,8 +222,9 @@ CMD_AUTOMATE_NO_STDIO(remote,
 
   if (!app.opts.dbname_given)
     {
-      W(F("No database given; assuming '%s' database. This means that we can't\n"
-          "verify the server key, because we have no record of what it should be.")
+      W(F("No database given; assuming '%s' database. This means that\n"
+          "we can't verify the server key, because we have no record of\n"
+          "what it should be.")
           % memory_db_identifier);
       app.opts.dbname_type = memory_db;
       app.opts.dbname_given = true;
============================================================
--- contrib/monotone.bash_completion2	2da4963e0f3257440d155c166d23f35e2138ccaf
+++ contrib/monotone.bash_completion2	96bd88bb4ea8c37873f01d83a2ec352e62282190
@@ -667,7 +667,7 @@ _monotone() {
 			argtype=${args[${#args[*]}-2]}
 		    fi
 		    case $argtype in
-			PATH | *FILENAME )
+			*PATH | PATHS | *FILENAME )
 			    _filedir
 			    ;;
 			REV* | NEW_REV* | OLD_REV* | *REVID | FROM | TO )
============================================================
--- contrib/authorize_remote_automate.lua	9d6f81a90c85dcb1a566755ce5a04d5ba2c23d2a
+++ contrib/authorize_remote_automate.lua	6c972b03ef5a025b1b792bc942bfac3a851a530e
@@ -1,5 +1,6 @@
 -- Copyright (c) 2010, Thomas Keller <address@hidden>
 --                     Richard Levitte <address@hidden>
+-- License: GPLv2 or later
 --
 -- This script reads key identities from a file "remote-automate-permissions"
 -- in the configuration directory and permits those authenticating with one
@@ -30,16 +31,12 @@ do
       _safe_commands = ARA_safe_commands
    end
 
-   local _save_get_remote_automate_permitted = get_remote_automate_permitted
-   function get_remote_automate_permitted(key_identity, command, options)
-      local permfile =
-	 io.open(get_confdir() .. "/remote-automate-permissions", "r")
+   function _get_remote_automate_permitted(key_identity, permfilename)
+      if not exists(permfilename) or isdir(permfilename) then return false end
+      local permfile = io.open(permfilename, "r")
       if (permfile == nil) then
 	 return false
       end
-
-      -- See if the incoming key matches any of the key identities or
-      -- patterns found in the permissions file.
       local matches = false
       local line = permfile:read()
       while (not matches and line ~= nil) do
@@ -52,8 +49,30 @@ do
 	 end
       end
       io.close(permfile)
-      if matches then return true end
+      return matches
+   end
 
+   local _save_get_remote_automate_permitted = get_remote_automate_permitted
+   function get_remote_automate_permitted(key_identity, command, options)
+      local permfilename = get_confdir() .. "/remote-automate-permissions"
+      local permdirname = permfilename .. ".d"
+
+      -- See if the incoming key matches any of the key identities or
+      -- patterns found in the permissions file.
+      if _get_remote_automate_permitted(key_identity, permfilename) then
+	 return true
+      end
+      if isdir(permdirname) then
+	 local files = read_directory(permdirname)
+	 table.sort(files)
+	 for _,f in ipairs(files) do
+	    pf = permdirname.."/"..f
+	    if _get_remote_automate_permitted(key_identity, pf) then
+	       return true
+	    end
+	 end
+      end
+
       -- No matching key found, let's see if the command matches one the
       -- admin allowed to be performed anonymously
       for _,v in ipairs(_safe_commands) do

reply via email to

[Prev in Thread] Current Thread [Next in Thread]