# # patch "ChangeLog" # from [b88da3de37b221d6d764a02d302f1774a9bc6a82] # to [b013dc44e3cee5a8bf5a1f7e27f62c50ef763080] # # patch "commands.cc" # from [69775983dd6ab25490f1fa762414db6aa5929e95] # to [62c049c1ae2101efcdb9d5081f1756a39fbb67b2] # ======================================================================== --- ChangeLog b88da3de37b221d6d764a02d302f1774a9bc6a82 +++ ChangeLog b013dc44e3cee5a8bf5a1f7e27f62c50ef763080 @@ -1,3 +1,11 @@ +2005-08-12 Nathaniel Smith + + * commands.cc (commit): When user uses --message or + --message-file, don't require non-empty logs, and don't write out + message to MT/log. (This makes re-running a 'commit -m foo' + command line until it works possible; otherwise the second try + will get a 'MT/log non-empty and -m supplied' error.) + 2005-08-11 Nathaniel Smith * netsync.cc: Add a list of ideas for improvement that will break ======================================================================== --- commands.cc 69775983dd6ab25490f1fa762414db6aa5929e95 +++ commands.cc 62c049c1ae2101efcdb9d5081f1756a39fbb67b2 @@ -2372,15 +2372,15 @@ if (app.message().length() > 0) log_message = app.message(); else - get_log_message(rs, app, log_message); + { + get_log_message(rs, app, log_message); + N(log_message.find_first_not_of(" \r\t\n") != string::npos, + F("empty log message")); + // we write it out so that if the commit fails, the log + // message will be preserved for a retry + write_user_log(data(log_message)); + } - N(log_message.find_first_not_of(" \r\t\n") != string::npos, - F("empty log message")); - - // we write it out so that if the commit fails, the log - // message will be preserved for a retry - write_user_log(data(log_message)); - { transaction_guard guard(app.db); packet_db_writer dbw(app);