You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2013/03/23 16:44:38 UTC

svn commit: r1460176 [3/3] - in /subversion/trunk/subversion: bindings/swig/perl/libsvn_swig_perl/ bindings/swig/python/libsvn_swig_py/ bindings/swig/ruby/libsvn_swig_ruby/ libsvn_auth_gnome_keyring/ libsvn_client/ libsvn_delta/ libsvn_diff/ libsvn_fs/...

Modified: subversion/trunk/subversion/svnsync/svnsync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/svnsync.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/svnsync.c (original)
+++ subversion/trunk/subversion/svnsync/svnsync.c Sat Mar 23 15:44:36 2013
@@ -19,6 +19,7 @@
  * ====================================================================
  */
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
 #include "svn_pools.h"
@@ -490,7 +491,7 @@ remove_props_not_in_source(svn_ra_sessio
         continue;
 
       /* Delete property if the name can't be found in SOURCE_PROPS. */
-      if (! apr_hash_get(source_props, propname, APR_HASH_KEY_STRING))
+      if (! svn_hash_gets(source_props, propname))
         SVN_ERR(svn_ra_change_rev_prop2(session, rev, propname, NULL,
                                         NULL, subpool));
     }
@@ -533,7 +534,7 @@ filter_props(int *filtered_count, apr_ha
           - matching the include pattern if provided */
       if (!filter || !filter(propname))
         {
-          apr_hash_set(filtered, propname, APR_HASH_KEY_STRING, propval);
+          svn_hash_sets(filtered, propname, propval);
         }
       else
         {
@@ -923,12 +924,9 @@ open_source_session(svn_ra_session_t **f
 
   SVN_ERR(svn_ra_rev_proplist(to_session, 0, &props, pool));
 
-  from_url_str = apr_hash_get(props, SVNSYNC_PROP_FROM_URL,
-                              APR_HASH_KEY_STRING);
-  from_uuid_str = apr_hash_get(props, SVNSYNC_PROP_FROM_UUID,
-                               APR_HASH_KEY_STRING);
-  *last_merged_rev = apr_hash_get(props, SVNSYNC_PROP_LAST_MERGED_REV,
-                                  APR_HASH_KEY_STRING);
+  from_url_str = svn_hash_gets(props, SVNSYNC_PROP_FROM_URL);
+  from_uuid_str = svn_hash_gets(props, SVNSYNC_PROP_FROM_UUID);
+  *last_merged_rev = svn_hash_gets(props, SVNSYNC_PROP_LAST_MERGED_REV);
 
   if (! from_url_str || ! from_uuid_str || ! *last_merged_rev)
     return svn_error_create
@@ -1237,9 +1235,9 @@ replay_rev_started(svn_revnum_t revision
      have to set it to at least the empty string. If there's a svn:log
      property on this revision, we will write the actual value in the
      replay_rev_finished callback. */
-  if (! apr_hash_get(filtered, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING))
-    apr_hash_set(filtered, SVN_PROP_REVISION_LOG, APR_HASH_KEY_STRING,
-                 svn_string_create_empty(pool));
+  if (! svn_hash_gets(filtered, SVN_PROP_REVISION_LOG))
+    svn_hash_sets(filtered, SVN_PROP_REVISION_LOG,
+                  svn_string_create_empty(pool));
 
   /* If necessary, normalize encoding and line ending style. Add the number
      of properties that required EOL normalization to the overall count
@@ -1815,18 +1813,15 @@ info_cmd(apr_getopt_t *os, void *b, apr_
 
   SVN_ERR(svn_ra_rev_proplist(to_session, 0, &props, pool));
 
-  from_url = apr_hash_get(props, SVNSYNC_PROP_FROM_URL,
-                          APR_HASH_KEY_STRING);
+  from_url = svn_hash_gets(props, SVNSYNC_PROP_FROM_URL);
 
   if (! from_url)
     return svn_error_createf
       (SVN_ERR_BAD_URL, NULL,
        _("Repository '%s' is not initialized for synchronization"), to_url);
 
-  from_uuid = apr_hash_get(props, SVNSYNC_PROP_FROM_UUID,
-                           APR_HASH_KEY_STRING);
-  last_merged_rev = apr_hash_get(props, SVNSYNC_PROP_LAST_MERGED_REV,
-                                 APR_HASH_KEY_STRING);
+  from_uuid = svn_hash_gets(props, SVNSYNC_PROP_FROM_UUID);
+  last_merged_rev = svn_hash_gets(props, SVNSYNC_PROP_LAST_MERGED_REV);
 
   /* Print the info. */
   SVN_ERR(svn_cmdline_printf(pool, _("Source URL: %s\n"), from_url->data));
@@ -2235,8 +2230,7 @@ main(int argc, const char *argv[])
                                             "svnsync: ", "--config-option"));
     }
 
-  config = apr_hash_get(opt_baton.config, SVN_CONFIG_CATEGORY_CONFIG,
-                        APR_HASH_KEY_STRING);
+  config = svn_hash_gets(opt_baton.config, SVN_CONFIG_CATEGORY_CONFIG);
 
   opt_baton.source_prop_encoding = source_prop_encoding;
 

Modified: subversion/trunk/subversion/svnsync/sync.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svnsync/sync.c?rev=1460176&r1=1460175&r2=1460176&view=diff
==============================================================================
--- subversion/trunk/subversion/svnsync/sync.c (original)
+++ subversion/trunk/subversion/svnsync/sync.c Sat Mar 23 15:44:36 2013
@@ -19,6 +19,7 @@
  * ====================================================================
  */
 
+#include "svn_hash.h"
 #include "svn_cmdline.h"
 #include "svn_config.h"
 #include "svn_pools.h"
@@ -116,7 +117,7 @@ svnsync_normalize_revprops(apr_hash_t *r
                   source_prop_encoding, pool, pool));
 
           /* Replace the existing prop value. */
-          apr_hash_set(rev_props, propname, APR_HASH_KEY_STRING, propval);
+          svn_hash_sets(rev_props, propname, propval);
 
           if (was_normalized)
             (*normalized_count)++; /* Count it. */