# # patch "ChangeLog" # from [5fe57d4a17b17950075a1a6a295cc41c815e6d5b] # to [9acc01b5dcd3b1a3e5a0881c0f8791925b9c322d] # # patch "commands.cc" # from [c8342080295451a7e1679618fabc396f9452f448] # to [8994f4295e5a7107f64ef074260e511026ec6857] # # patch "key_store.cc" # from [0cac0c59a072149fc9663db7a1a9e69152e975cc] # to [32a483ab9e29305e02c76f9c7b0cac9ce6f723d5] # # patch "key_store.hh" # from [ed83144ff6fdb7f931e8f950b36362bf48b45273] # to [22c42b7740822edeb4062fd88ae1bafc2ed06f7f] # # patch "schema_migration.cc" # from [76589f0bdcb17e1118fc8a771affa6b76ff7816e] # to [9a892271e8cc99f14028876d9702d1f4c80c7a0e] # ======================================================================== --- ChangeLog 5fe57d4a17b17950075a1a6a295cc41c815e6d5b +++ ChangeLog 9acc01b5dcd3b1a3e5a0881c0f8791925b9c322d @@ -1,3 +1,12 @@ +2005-10-14 Nathaniel Smith + + * key_store.{cc,hh} (get_key_dir): New method. + * schema_migration.cc (migrate_client_to_external_privkeys): Tell + user that we're moving their keys. + * commands.cc (genkey): Refer to keystore by the directory, not as + "keystore". + (ls_keys): Likewise. + 2005-10-14 Matthew Gregan * database.cc, schema.sql, schema_migration.cc: Use SQLite 3's ======================================================================== --- commands.cc c8342080295451a7e1679618fabc396f9452f448 +++ commands.cc 8994f4295e5a7107f64ef074260e511026ec6857 @@ -675,7 +675,7 @@ cout << hash_code << " " << keyid << " (*)" << endl; } if (!all_in_db) - cout << _("(*) - only in keystore") << endl; + cout << F("(*) - only in %s/") % app.keys.get_key_dir() << endl; cout << endl; } @@ -866,9 +866,9 @@ N(!exists, F("key '%s' already exists") % ident); keypair kp; - P(F("generating key-pair '%s'\n") % ident); + P(F("generating key-pair '%s'") % ident); generate_key_pair(app.lua, ident, kp); - P(F("storing key-pair '%s' in keystore\n") % ident); + P(F("storing key-pair '%s' in %s/") % ident % app.keys.get_key_dir()); app.keys.put_key_pair(ident, kp); } ======================================================================== --- key_store.cc 0cac0c59a072149fc9663db7a1a9e69152e975cc +++ key_store.cc 32a483ab9e29305e02c76f9c7b0cac9ce6f723d5 @@ -65,12 +65,19 @@ { key_dir = system_path(get_homedir()) / ".monotone/keys"; } + void key_store::set_key_dir(system_path const & kd) { key_dir = kd; } +system_path const & +key_store::get_key_dir() +{ + return key_dir; +} + void key_store::read_key_dir() { ======================================================================== --- key_store.hh ed83144ff6fdb7f931e8f950b36362bf48b45273 +++ key_store.hh 22c42b7740822edeb4062fd88ae1bafc2ed06f7f @@ -13,6 +13,7 @@ class key_store { +private: friend struct keyreader; system_path key_dir; bool have_read; @@ -27,6 +28,7 @@ public: key_store(app_state * a); void set_key_dir(system_path const & kd); + system_path const & get_key_dir(); void ensure_in_database(rsa_keypair_id const & ident); bool try_ensure_in_db(hexenc const & hash); ======================================================================== --- schema_migration.cc 76589f0bdcb17e1118fc8a771affa6b76ff7816e +++ schema_migration.cc 9a892271e8cc99f14028876d9702d1f4c80c7a0e @@ -827,6 +827,8 @@ F("public and private keys for %s don't match") % ident); } + P(F("moving key '%s' from database to %s") + % ident % app->keys.get_key_dir()); app->keys.put_key_pair(ident, kp); }