# # # patch "NEWS" # from [64240dcb7bd676dc7168901d254faf3ae1e5c684] # to [f0fb47df5fc503b5b4eb834f11ca6cce141118da] # # patch "cmd_ws_commit.cc" # from [78d1bd0388216eb6432592e8ab13d9e324e130e3] # to [c4d187ebc1adf4ad186bcaf13110be0d400acd98] # # patch "keys.cc" # from [5386aa43615c285d97e17fdd21b03cd5b09c07c9] # to [e27fd43f8730dc5ada1f4aaddfb55e910ac659ac] # # patch "keys.hh" # from [35604a1e63822b6016658e0ce80516ac38b2e8a9] # to [6b5412008a7158b8abfb8228163b687538d7879f] # ============================================================ --- NEWS 64240dcb7bd676dc7168901d254faf3ae1e5c684 +++ NEWS f0fb47df5fc503b5b4eb834f11ca6cce141118da @@ -4,6 +4,27 @@ xxx xxx xx xx:xx:xx UTC 2010 Changes + - Much more information is now passed to the editor when composing a + commit message for a new revision. The Author, Date, Branch and + Changelog values may now all be changed directly in the editor + allowing new branches to be created without using the --branch option. + Changes to other lines of this information must not be made or the + commit will abort. + + - The edit_comment lua hook now only takes one argument which is the + text to be passed to the editor to edit a commit. Existing hooks that + override the default hook will need to be changed to work properly. + + - The long date/time format used by 'status', 'commit' and 'log' must be + sufficient to preserve a date through a formatting and parsing + cycle. The 'status' command now checks for this and warns if the + format is unsuitable and 'commit' will refuse to operate with an + unsuitable format. + + - The output of the 'status' and 'log' commands has changed to align + with the new information displayed by 'commit' so that all three + commands display revisions similarly. + New features - New automation command 'update' which behaves identical to ============================================================ --- cmd_ws_commit.cc 78d1bd0388216eb6432592e8ab13d9e324e130e3 +++ cmd_ws_commit.cc c4d187ebc1adf4ad186bcaf13110be0d400acd98 @@ -134,9 +134,9 @@ get_log_message_interactively(lua_hooks string const & date_fmt, utf8 & log_message) { utf8 instructions( - _("Enter a description of this change following the Changelog line.\n" + _("Enter a description of this change following the Changelog line below.\n" "The values of Author, Date and Branch may be modified as required.\n" - "Any other modifications will cause the commit to fail.\n\n")); + "\n")); utf8 cancel(_("*** REMOVE THIS LINE TO CANCEL THE COMMIT ***\n")); @@ -160,7 +160,7 @@ get_log_message_interactively(lua_hooks oss << string(70, '-') << '\n'; if (!old_branches.empty() && old_branches.find(branch) == old_branches.end()) { - oss << _("This revision will create a new branch.") << '\n'; + oss << _("*** THIS REVISION WILL CREATE A NEW BRANCH ***") << "\n\n"; for (set::const_iterator i = old_branches.begin(); i != old_branches.end(); ++i) oss << _("Old Branch: ") << *i << '\n'; @@ -780,7 +780,7 @@ CMD(status, "status", "", CMD_REF(inform key_store keys(app); key_identity_info key; - get_user_key(app.opts, app.lua, db, keys, project, key.id, false); + get_user_key(app.opts, app.lua, db, keys, project, key.id, cache_disable); project.complete_key_identity(keys, app.lua, key); if (!app.lua.hook_get_author(app.opts.branch, key, author)) @@ -813,7 +813,7 @@ CMD(status, "status", "", CMD_REF(inform old_branches.find(app.opts.branch) == old_branches.end()) { cout << string(70, '-') << '\n' - << _("This revision will create a new branch.") << '\n'; + << _("*** THIS REVISION WILL CREATE A NEW BRANCH ***") << "\n\n"; for (set::const_iterator i = old_branches.begin(); i != old_branches.end(); ++i) cout << _("Old Branch: ") << *i << '\n'; @@ -1380,7 +1380,7 @@ CMD(commit, "commit", "ci", CMD_REF(work if (author.empty()) { key_identity_info key; - get_user_key(app.opts, app.lua, db, keys, project, key.id, false); + get_user_key(app.opts, app.lua, db, keys, project, key.id, cache_disable); project.complete_key_identity(keys, app.lua, key); if (!app.lua.hook_get_author(app.opts.branch, key, author)) ============================================================ --- keys.cc 5386aa43615c285d97e17fdd21b03cd5b09c07c9 +++ keys.cc e27fd43f8730dc5ada1f4aaddfb55e910ac659ac @@ -119,7 +119,7 @@ get_user_key(options const & opts, lua_h get_user_key(options const & opts, lua_hooks & lua, database & db, key_store & keys, project_t & project, key_id & key, - bool const cache) + key_cache_flag const cache) { if (keys.have_signing_key()) { @@ -150,7 +150,7 @@ get_user_key(options const & opts, lua_h get_only_key(keys, true, key); } - if (cache) + if (cache == cache_enable) check_and_save_chosen_key(db, keys, key); } ============================================================ --- keys.hh 35604a1e63822b6016658e0ce80516ac38b2e8a9 +++ keys.hh 6b5412008a7158b8abfb8228163b687538d7879f @@ -20,6 +20,8 @@ class globish; struct keypair; class globish; +enum key_cache_flag { cache_disable, cache_enable }; + // keys.{hh,cc} does all the "delicate" crypto (meaning: that which needs // to read passphrases and manipulate raw, decrypted private keys). it // could in theory be in transforms.cc too, but that file's already kinda @@ -31,7 +33,7 @@ void get_user_key(options const & opts, void get_user_key(options const & opts, lua_hooks & lua, database & db, key_store & keys, project_t & project, key_id & key, - bool const cache = true); + key_cache_flag const cache = cache_enable); // As above, but does not report which key has been selected; for use when // the important thing is to have selected one and cached the decrypted key.