FreeBSD/contrib/subversion/subversion/svnmucc/svnmucc.c
/* Obtain the log message from multiple sources, producing an error
   if there are multiple sources. Store the result in *FINAL_MESSAGE.  */
Obtain the log message from multiple sources, producing an error
if there are multiple sources. Store the result in *FINAL_MESSAGE.
Obtain the log message from multiple sources producing an error if there are multiple sources . Store the result in * FINAL_MESSAGE .
static svn_error_t *
sanitize_log_sources(const char **final_message,
                     const char *message,
                     apr_hash_t *revprops,
                     svn_stringbuf_t *filedata,
                     apr_pool_t *result_pool,
                     apr_pool_t *scratch_pool)
{
  svn_string_t *msg;
  *final_message = NULL;
  msg = svn_hash_gets(revprops, SVN_PROP_REVISION_LOG);
  if (msg)
    {
      if (filedata || message)
        return mutually_exclusive_logs_error();
      *final_message = apr_pstrdup(result_pool, msg->data);
      svn_hash_sets(revprops, SVN_PROP_REVISION_LOG, NULL);
    }
  else if (filedata)
    {
      if (message)
        return mutually_exclusive_logs_error();
      *final_message = apr_pstrdup(result_pool, filedata->data);
    }
  else if (message)
    {
      *final_message = apr_pstrdup(result_pool, message);
    }
  return SVN_NO_ERROR;
}
static svn_error_t * sanitize_log_sources ( const char * * final_message , const char * message , apr_hash_t * revprops , svn_stringbuf_t * filedata , apr_pool_t * result_pool , apr_pool_t * scratch_pool ) { svn_string_t * msg ; * final_message = NULL ; msg = svn_hash_gets ( revprops , SVN_PROP_REVISION_LOG ) ; if ( msg ) { if ( filedata || message ) return mutually_exclusive_logs_error ( ) ; * final_message = apr_pstrdup ( result_pool , msg -> data ) ; svn_hash_sets ( revprops , SVN_PROP_REVISION_LOG , NULL ) ; } else if ( filedata ) { if ( message ) return mutually_exclusive_logs_error ( ) ; * final_message = apr_pstrdup ( result_pool , filedata -> data ) ; } else if ( message ) { * final_message = apr_pstrdup ( result_pool , message ) ; } return SVN_NO_ERROR ; }
Obtain the log message from multiple sources, producing an error
if there are multiple sources.
Obtain the log message from multiple sources producing an error if there are multiple sources .
/* If we already have a log message in the revprop hash, then just
     make sure the user didn't try to also use -m or -F.  Otherwise,
     we need to consult -m or -F to find a log message, if any. */ /* Will be re-added by libsvn_client */