Author: julianfoad
Date: Mon Feb 26 11:24:19 2018
New Revision: 1825354
URL: http://svn.apache.org/viewvc?rev=1825354&view=rev
Log:
Shelving: Follow-up to r1825353: fix crashes and beautify the API.
* subversion/svn/shelf-cmd.c
(shelve): Don't assume the revprops table is non-null.
* subversion/include/svn_client.h,
subversion/libsvn_client/shelf.c
(svn_client_shelf_set_log_message): Make the input message 'const'.
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/shelf.c
subversion/trunk/subversion/svn/shelf-cmd.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1825354&r1=1825353&r2=1825354&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Mon Feb 26 11:24:19 2018
@@ -7100,7 +7100,7 @@ svn_client_shelf_revprop_list(apr_hash_t
SVN_EXPERIMENTAL
svn_error_t *
svn_client_shelf_set_log_message(svn_client_shelf_t *shelf,
- char *log_message,
+ const char *log_message,
apr_pool_t *scratch_pool);
/** Get the log message in @a shelf into @a *log_message.
Modified: subversion/trunk/subversion/libsvn_client/shelf.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/shelf.c?rev=1825354&r1=1825353&r2=1825354&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/shelf.c (original)
+++ subversion/trunk/subversion/libsvn_client/shelf.c Mon Feb 26 11:24:19 2018
@@ -703,7 +703,7 @@ svn_client_shelf_get_log_message(char **
svn_error_t *
svn_client_shelf_set_log_message(svn_client_shelf_t *shelf,
- char *message,
+ const char *message,
apr_pool_t *scratch_pool)
{
svn_string_t *propval
Modified: subversion/trunk/subversion/svn/shelf-cmd.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/shelf-cmd.c?rev=1825354&r1=1825353&r2=1825354&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/shelf-cmd.c (original)
+++ subversion/trunk/subversion/svn/shelf-cmd.c Mon Feb 26 11:24:19 2018
@@ -534,8 +534,10 @@ shelve(int *new_version_p,
if (message && !dry_run)
{
- svn_string_t *propval = svn_string_create(message, shelf->pool);
+ svn_string_t *propval = svn_string_create(message, scratch_pool);
+ if (! revprop_table)
+ revprop_table = apr_hash_make(scratch_pool);
svn_hash_sets(revprop_table, SVN_PROP_REVISION_LOG, propval);
}
}