You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/04/19 02:34:27 UTC

svn commit: r1094834 - /subversion/trunk/subversion/libsvn_wc/update_editor.c

Author: rhuijben
Date: Tue Apr 19 00:34:27 2011
New Revision: 1094834

URL: http://svn.apache.org/viewvc?rev=1094834&view=rev
Log:
* subversion/libsvn_wc/update_editor.c
  (accumulate_last_change): Check result of number conversion.
  (check_path_under_root): Remove some outdated TODOs.

Modified:
    subversion/trunk/subversion/libsvn_wc/update_editor.c

Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1094834&r1=1094833&r2=1094834&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue Apr 19 00:34:27 2011
@@ -869,7 +869,11 @@ accumulate_last_change(svn_revnum_t *cha
       if (! strcmp(prop->name, SVN_PROP_ENTRY_LAST_AUTHOR))
         *changed_author = apr_pstrdup(result_pool, prop->value->data);
       else if (! strcmp(prop->name, SVN_PROP_ENTRY_COMMITTED_REV))
-        *changed_rev = SVN_STR_TO_REV(prop->value->data);
+        {
+          apr_int64_t rev;
+          SVN_ERR(svn_cstring_atoi64(&rev, prop->value->data));
+          *changed_rev = (svn_revnum_t)rev;
+        }
       else if (! strcmp(prop->name, SVN_PROP_ENTRY_COMMITTED_DATE))
         SVN_ERR(svn_time_from_cstring(changed_date, prop->value->data,
                                       scratch_pool));
@@ -896,24 +900,21 @@ accumulate_last_change(svn_revnum_t *cha
 static svn_error_t *
 check_path_under_root(const char *base_path,
                       const char *add_path,
-                      apr_pool_t *pool)
+                      apr_pool_t *scratch_pool)
 {
-  const char *full_path;
   svn_boolean_t under_root;
 
-  SVN_ERR(svn_dirent_is_under_root(&under_root, &full_path, base_path, add_path, pool));
+  SVN_ERR(svn_dirent_is_under_root(&under_root, NULL, base_path, add_path,
+                                   scratch_pool));
 
   if (! under_root)
     {
       return svn_error_createf(
           SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
          _("Path '%s' is not in the working copy"),
-         /* Not using full_path here because it might be NULL or
-            undefined, since apr_filepath_merge() returned error.
-            (Pity we can't pass NULL for &full_path in the first place,
-            but the APR docs don't bless that.) */
-         svn_dirent_local_style(svn_dirent_join(base_path, add_path, pool),
-                                pool));
+         svn_dirent_local_style(svn_dirent_join(base_path, add_path,
+                                                scratch_pool),
+                                scratch_pool));
     }
 
   return SVN_NO_ERROR;