Author: julianfoad
Date: Thu Aug 24 14:51:50 2017
New Revision: 1806052

URL: http://svn.apache.org/viewvc?rev=1806052&view=rev
Log:
On the 'shelve-checkpoint3' branch: Support a description (log message).

* subversion/svn/svn.c
  (svn_cl__cmd_table,
   sub_main): Add log message options.

* subversion/svn/checkpoint3-cmd.c
  (checkpoint_list): Display the log message.
  (svn_cl__checkpoint): Initialize the standard log message callback.

* subversion/libsvn_client/checkpoint3.c
  (checkpoint_save): Don't null-out the log message callback: thus allow
    svn_client_commit6() to use it.

Modified:
    
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/checkpoint3.c
    subversion/branches/shelve-checkpoint3/subversion/svn/checkpoint3-cmd.c
    subversion/branches/shelve-checkpoint3/subversion/svn/svn.c

Modified: 
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/checkpoint3.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint3/subversion/libsvn_client/checkpoint3.c?rev=1806052&r1=1806051&r2=1806052&view=diff
==============================================================================
--- 
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/checkpoint3.c 
(original)
+++ 
subversion/branches/shelve-checkpoint3/subversion/libsvn_client/checkpoint3.c 
Thu Aug 24 14:51:50 2017
@@ -502,9 +502,6 @@ checkpoint_save(int *checkpoint_number,
 
   /* ### TODO: if not at latest checkpoint, first prune later checkpoints */
 
-  ctx->log_msg_func3 = NULL;
-  ctx->log_msg_func2 = NULL;
-  ctx->log_msg_func = NULL;
   SVN_ERR(svn_client_commit6(
             paths,
             svn_depth_infinity /*depth*/,

Modified: 
subversion/branches/shelve-checkpoint3/subversion/svn/checkpoint3-cmd.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint3/subversion/svn/checkpoint3-cmd.c?rev=1806052&r1=1806051&r2=1806052&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint3/subversion/svn/checkpoint3-cmd.c 
(original)
+++ subversion/branches/shelve-checkpoint3/subversion/svn/checkpoint3-cmd.c Thu 
Aug 24 14:51:50 2017
@@ -73,9 +73,12 @@ checkpoint_list(const char *local_abspat
       const char *name = apr_psprintf(scratch_pool, "%d", number);
       char marker = (first ? '*' : ' ');
       svn_string_t *date = svn_hash_gets(log_entry->revprops, "svn:date");
+      svn_string_t *log_str = svn_hash_gets(log_entry->revprops, "svn:log");
+      const char *logmsg = log_str ? log_str->data : "";
 
       printf("%c %s %.16s\n",
              marker, name, date ? date->data : "");
+      printf(" %s\n", logmsg);
 
       if (diffstat)
         {
@@ -234,6 +237,8 @@ svn_cl__checkpoint(apr_getopt_t *os,
     }
   else if (strcmp(subsubcommand, "save") == 0)
     {
+      svn_error_t *err;
+
       if (targets->nelts)
         return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, NULL,
                                 _("Too many arguments"));
@@ -252,8 +257,17 @@ svn_cl__checkpoint(apr_getopt_t *os,
       SVN_ERR(svn_cl__eat_peg_revisions(&targets, targets, pool));
       */
 
-      SVN_ERR(checkpoint_save(/*targets, depth, opt_state->changelists,*/
-                              opt_state->quiet, local_abspath, ctx, pool));
+      if (ctx->log_msg_func3)
+        SVN_ERR(svn_cl__make_log_msg_baton(&ctx->log_msg_baton3,
+                                           opt_state, NULL, ctx->config,
+                                           pool));
+      err = checkpoint_save(/*targets, depth, opt_state->changelists,*/
+                            opt_state->quiet, local_abspath, ctx, pool);
+      if (ctx->log_msg_func3)
+        SVN_ERR(svn_cl__cleanup_log_msg(ctx->log_msg_baton3,
+                                        err, pool));
+      else
+        SVN_ERR(err);
     }
   else if (strcmp(subsubcommand, "squash") == 0)
     {

Modified: subversion/branches/shelve-checkpoint3/subversion/svn/svn.c
URL: 
http://svn.apache.org/viewvc/subversion/branches/shelve-checkpoint3/subversion/svn/svn.c?rev=1806052&r1=1806051&r2=1806052&view=diff
==============================================================================
--- subversion/branches/shelve-checkpoint3/subversion/svn/svn.c (original)
+++ subversion/branches/shelve-checkpoint3/subversion/svn/svn.c Thu Aug 24 
14:51:50 2017
@@ -636,7 +636,7 @@ const svn_opt_subcommand_desc2_t svn_cl_
      "  6. Return to a plain WC based on the original repository.\n"),
     {'q',
      /*'-N', opt_depth, opt_targets, opt_changelist,*/
-     /*SVN_CL__LOG_MSG_OPTIONS*/} },
+     SVN_CL__LOG_MSG_OPTIONS} },
 
   { "cleanup", svn_cl__cleanup, {0}, N_
     ("Either recover from an interrupted operation that left the working copy 
locked,\n"
@@ -2954,6 +2954,7 @@ sub_main(int *exit_code, int argc, const
           || subcommand->cmd_func == svn_cl__move
           || subcommand->cmd_func == svn_cl__lock
           || subcommand->cmd_func == svn_cl__propedit
+          || subcommand->cmd_func == svn_cl__checkpoint
           || subcommand->cmd_func == svn_cl__shelve))
     {
       /* If the -F argument is a file that's under revision control,


Reply via email to