# # # patch "automate.cc" # from [63b44f3c2366f52a040cc8d0029ffc1d896740d9] # to [4a5ef4b00f72c0c766b65bcf4d26fce3c662cbfc] # # patch "monotone.texi" # from [50c10e49ae961d0b36374f02b09b5af2fab9cb00] # to [d562dab57e07e0822e54af0b40dea69881c085c5] # # patch "tests/automate_get_current_revision/__driver__.lua" # from [a56d2598ca7be71521f38b0a577baa92fbf55022] # to [febb7bc6adea00e46e2f0e932ec3f939badab4a2] # ============================================================ --- automate.cc 63b44f3c2366f52a040cc8d0029ffc1d896740d9 +++ automate.cc 4a5ef4b00f72c0c766b65bcf4d26fce3c662cbfc @@ -1260,8 +1260,7 @@ CMD_AUTOMATE(get_revision, N_("REVID"), // Added in: 7.0 // Purpose: Outputs (an optionally restricted) revision based on // changes in the current workspace -// Error conditions: If there are no changes in the current workspace or the -// restriction is invalid or has no recorded changes, prints an error message +// Error conditions: If the restriction is invalid, prints an error message // to stderr and exits with status 1. A workspace is required. CMD_AUTOMATE(get_current_revision, N_("[PATHS ...]"), N_("Shows change information for a workspace"), @@ -1293,7 +1292,6 @@ CMD_AUTOMATE(get_current_revision, N_("[ make_restricted_revision(old_rosters, new_roster, mask, rev, excluded, join_words(execid)); rev.check_sane(); - E(rev.is_nontrivial(), origin::user, F("no changes to commit")); calculate_ident(rev, ident); write_revision(rev, dat); ============================================================ --- monotone.texi 50c10e49ae961d0b36374f02b09b5af2fab9cb00 +++ monotone.texi d562dab57e07e0822e54af0b40dea69881c085c5 @@ -7716,9 +7716,8 @@ @section Automation @item Error conditions: -If the command is executed outside of a workspace, there are no changes in the -current workspace or the restriction is invalid or has no recorded changes, -prints an error message to stderr and exits with status 1. +If the command is executed outside of a workspace, or the restriction is +invalid, prints an error message to stderr and exits with status 1. @end table ============================================================ --- tests/automate_get_current_revision/__driver__.lua a56d2598ca7be71521f38b0a577baa92fbf55022 +++ tests/automate_get_current_revision/__driver__.lua febb7bc6adea00e46e2f0e932ec3f939badab4a2 @@ -6,8 +6,7 @@ check(mtn("commit", "--date=2005-05-21T1 "--branch=testbranch", "--message=blah-blah"), 0, false, false) -- ensure clear workspace fails wih error -check(mtn("automate", "get_current_revision"), 1, true, false) -check(fsize("stdout") == 0) +check(mtn("automate", "get_current_revision"), 0, true, false) addfile("foox", "blah\n") addfile("barx", "blah2\n")