[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

issue #406 patch 3

From: Matt Kraai <kraai_at_alumni.carnegiemellon.edu>
Date: 2001-11-06 21:53:36 CET

Howdy,

The following patch changes the svn_fs_change_{node,rev,txn}_prop
family of functions to use a const char * as the property name.
It compiles without warnings, and passes all of the tests in the
test suite. I think there are one or two more patches left.

Matt

* subversion/svnadmin/main.c

  (main): Update call to svn_fs_change_rev_prop.

* subversion/include/svn_fs.h

  (svn_fs_change_node_prop): Change name to const char *.
  (svn_fs_change_rev_prop): Change name to const char *.
  (svn_fs_change_txn_prop): Change name to const char *.

* subversion/libsvn_fs/proplist.c

  (set_fs__set_prop): Change name to const char *.

* subversion/libsvn_fs/proplist.h

  (set_fs__set_prop): Change name to const char *.

* subversion/libsvn_fs/dag.c

  (txn_body_dag_init_fs, svn_fs__dag_commit_txn): Update calls to
  svn_fs__set_rev_prop.

* subversion/libsvn_fs/txn-table.c

  (svn_fs_change_txn_prop): Change name to const char *.

* subversion/libsvn_fs/tree.c

  (svn_fs_change_node_prop): Change name to const char *.

* subversion/libsvn_fs/txn.c

  (svn_fs_begin_txn): Update call to svn_fs_change_txn_prop.

* subversion/libsvn_fs/rev-table.c

  (svn_fs__set_rev_prop, svn_fs_change_rev_prop): Change name to
  const char *.

* subversion/libsvn_fs/rev-table.h

  (svn_fs__set_rev_prop): Change name to const char *.

* subversion/libsvn_ra_local/commit_editor.c

  (change_file_prop, change_dir_prop): Update calls to
  svn_fs_change_node_prop.

* subversion/mod_dav_svn/deadprops.c

  (save_value): Update calls to svn_fs_change_txn_prop and
  svn_fs_change_node_prop.

* subversion/tests/libsvn_fs/fs-test.c

  (call_functions_with_unopened_fs): Update call to
  svn_fs_change_rev_prop.
  (revision_props): Update calls to svn_fs_change_rev_prop.
  (transaction_props): Update calls to svn_fs_change_txn_prop.
  (node_props): Update calls to svn_fs_change_node_prop.

* subversion/tests/libsvn_repos/dir-delta-editor.c

  (test_change_file_prop, test_change_dir_prop): Update calls to
  svn_fs_change_node_prop.

* subversion/libsvn_repos/hooks.c

  (svn_repos_fs_begin_txn_for_commit): Update calls to
  svn_fs_change_txn_prop.
  (svn_repos_fs_begin_txn_for_update): Update call to
  svn_fs_change_txn_prop.

Index: ./subversion/svnadmin/main.c
===================================================================
--- ./subversion/svnadmin/.svn/text-base/main.c Tue Nov 6 12:51:56 2001
+++ ./subversion/svnadmin/main.c Tue Nov 6 13:02:45 2001
@@ -393,8 +393,6 @@
       svn_revnum_t the_rev;
       svn_stringbuf_t *file_contents;
       svn_string_t log_contents;
- svn_string_t log_prop = {SVN_PROP_REVISION_LOG,
- strlen(SVN_PROP_REVISION_LOG)};
 
       if (argc != 5)
         {
@@ -415,9 +413,8 @@
       if (err) goto error;
 
       /* set the revision property */
- err = svn_fs_change_rev_prop (fs, the_rev,
- &log_prop, &log_contents,
- pool);
+ err = svn_fs_change_rev_prop (fs, the_rev, SVN_PROP_REVISION_LOG,
+ &log_contents, pool);
       if (err) goto error;
     }
   else if ((is_deltify) || (is_undeltify))
Index: ./subversion/include/svn_fs.h
===================================================================
--- ./subversion/include/.svn/text-base/svn_fs.h Tue Nov 6 12:51:51 2001
+++ ./subversion/include/svn_fs.h Tue Nov 6 13:02:59 2001
@@ -541,7 +541,7 @@
    removed altogether. Do any necessary temporary allocation in
    POOL. */
 svn_error_t *svn_fs_change_txn_prop (svn_fs_txn_t *txn,
- const svn_string_t *name,
+ const char *name,
                                      const svn_string_t *value,
                                      apr_pool_t *pool);
 
@@ -745,7 +745,7 @@
    Do any necessary temporary allocation in POOL. */
 svn_error_t *svn_fs_change_node_prop (svn_fs_root_t *root,
                                       const char *path,
- const svn_string_t *name,
+ const char *name,
                                       const svn_string_t *value,
                                       apr_pool_t *pool);
 
@@ -1144,12 +1144,10 @@
    them after the revision has been committed. They are not protected
    via transactions.
 
- Do any necessary temporary allocation in POOL.
-
- ### todo (issue #406): could be const char *name. */
+ Do any necessary temporary allocation in POOL. */
 svn_error_t *svn_fs_change_rev_prop (svn_fs_t *fs,
                                      svn_revnum_t rev,
- const svn_string_t *name,
+ const char *name,
                                      const svn_string_t *value,
                                      apr_pool_t *pool);
 
Index: ./subversion/libsvn_fs/proplist.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/proplist.c Tue Nov 6 12:51:40 2001
+++ ./subversion/libsvn_fs/proplist.c Tue Nov 6 13:03:10 2001
@@ -96,7 +96,7 @@
 
 svn_error_t *
 svn_fs__set_prop (skel_t *proplist,
- const svn_string_t *name,
+ const char *name,
                   const svn_string_t *value,
                   apr_pool_t *pool)
 {
@@ -115,7 +115,7 @@
       skel_t *this_name = prop;
       skel_t *this_value = prop->next;
 
- if (svn_fs__atom_matches_string (this_name, name))
+ if (svn_fs__matches_atom (this_name, name))
         {
           /* We've found the property we wish to change. Let's see
              what kind of change we're supposed to be making here. */
@@ -177,8 +177,8 @@
                                          value->len,
                                          pool),
                        proplist);
- svn_fs__prepend (svn_fs__mem_atom (name->data,
- name->len,
+ svn_fs__prepend (svn_fs__mem_atom (name,
+ strlen (name),
                                          pool),
                        proplist);
     }
Index: ./subversion/libsvn_fs/proplist.h
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/proplist.h Tue Nov 6 12:51:39 2001
+++ ./subversion/libsvn_fs/proplist.h Tue Nov 6 13:03:15 2001
@@ -43,11 +43,9 @@
 /* Set the value of the property NAME in PROPLIST to VALUE. If NAME
    is not found in PROPLIST, add it to the list (with value VALUE).
    If VALUE is NULL, remove the property from the list altogether. Do
- all necessary allocations in POOL.
-
- ### todo (issue #406): could be const char *name. */
+ all necessary allocations in POOL. */
 svn_error_t *svn_fs__set_prop (skel_t *proplist,
- const svn_string_t *name,
+ const char *name,
                                const svn_string_t *value,
                                apr_pool_t *pool);
 
Index: ./subversion/libsvn_fs/dag.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/dag.c Tue Nov 6 12:51:47 2001
+++ ./subversion/libsvn_fs/dag.c Tue Nov 6 13:14:08 2001
@@ -338,15 +338,13 @@
 
   /* Set a date on revision 0. */
   {
- svn_string_t propname, date;
-
- propname.data = SVN_PROP_REVISION_DATE;
- propname.len = strlen (SVN_PROP_REVISION_DATE);
+ svn_string_t date;
 
     date.data = svn_time_to_nts (apr_time_now(), trail->pool);
     date.len = strlen (date.data);
 
- SVN_ERR (svn_fs__set_rev_prop (fs, 0, &propname, &date, trail));
+ SVN_ERR (svn_fs__set_rev_prop (fs, 0, SVN_PROP_REVISION_DATE, &date,
+ trail));
   }
 
   return SVN_NO_ERROR;
@@ -1869,15 +1867,13 @@
   /* Set a date on the commit. We wait until now to fetch the date,
      so it's definitely newer than any previous revision's date. */
   {
- svn_string_t propname, date;
-
- propname.data = SVN_PROP_REVISION_DATE;
- propname.len = strlen (SVN_PROP_REVISION_DATE);
+ svn_string_t date;
 
     date.data = svn_time_to_nts (apr_time_now(), trail->pool);
     date.len = strlen (date.data);
 
- SVN_ERR (svn_fs__set_rev_prop (fs, *new_rev, &propname, &date, trail));
+ SVN_ERR (svn_fs__set_rev_prop (fs, *new_rev, SVN_PROP_REVISION_DATE, &date,
+ trail));
   }
 
   /* Recursively stabilize from ROOT using the new revision. */
Index: ./subversion/libsvn_fs/txn-table.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/txn-table.c Tue Nov 6 12:51:46 2001
+++ ./subversion/libsvn_fs/txn-table.c Tue Nov 6 13:03:22 2001
@@ -512,7 +512,7 @@
 struct change_txn_prop_args {
   svn_fs_t *fs;
   const char *id;
- const svn_string_t *name;
+ const char *name;
   const svn_string_t *value;
 };
 
@@ -541,7 +541,7 @@
 
 svn_error_t *
 svn_fs_change_txn_prop (svn_fs_txn_t *txn,
- const svn_string_t *name,
+ const char *name,
                         const svn_string_t *value,
                         apr_pool_t *pool)
 {
Index: ./subversion/libsvn_fs/tree.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/tree.c Tue Nov 6 12:51:45 2001
+++ ./subversion/libsvn_fs/tree.c Tue Nov 6 13:03:26 2001
@@ -895,7 +895,7 @@
 struct change_node_prop_args {
   svn_fs_root_t *root;
   const char *path;
- const svn_string_t *name;
+ const char *name;
   const svn_string_t *value;
 };
 
@@ -921,7 +921,7 @@
 svn_error_t *
 svn_fs_change_node_prop (svn_fs_root_t *root,
                          const char *path,
- const svn_string_t *name,
+ const char *name,
                          const svn_string_t *value,
                          apr_pool_t *pool)
 {
Index: ./subversion/libsvn_fs/txn.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/txn.c Tue Nov 6 12:51:43 2001
+++ ./subversion/libsvn_fs/txn.c Tue Nov 6 13:17:38 2001
@@ -136,15 +136,12 @@
      a txn is promoted to a revision, this property will be
      automatically overwritten with a revision datestamp. */
   {
- svn_string_t propname, date;
-
- propname.data = SVN_PROP_REVISION_DATE;
- propname.len = strlen (SVN_PROP_REVISION_DATE);
+ svn_string_t date;
 
     date.data = svn_time_to_nts (apr_time_now(), pool);
     date.len = strlen (date.data);
 
- SVN_ERR (svn_fs_change_txn_prop (txn, &propname, &date, pool));
+ SVN_ERR (svn_fs_change_txn_prop (txn, SVN_PROP_REVISION_DATE, &date, pool));
   }
 
   return SVN_NO_ERROR;
Index: ./subversion/libsvn_fs/rev-table.c
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/rev-table.c Tue Nov 6 12:51:42 2001
+++ ./subversion/libsvn_fs/rev-table.c Tue Nov 6 13:03:31 2001
@@ -364,7 +364,7 @@
 svn_error_t *
 svn_fs__set_rev_prop (svn_fs_t *fs,
                       svn_revnum_t rev,
- const svn_string_t *name,
+ const char *name,
                       const svn_string_t *value,
                       trail_t *trail)
 {
@@ -399,7 +399,7 @@
 struct change_rev_prop_args {
   svn_fs_t *fs;
   svn_revnum_t rev;
- const svn_string_t *name;
+ const char *name;
   const svn_string_t *value;
 };
 
@@ -419,7 +419,7 @@
 svn_error_t *
 svn_fs_change_rev_prop (svn_fs_t *fs,
                         svn_revnum_t rev,
- const svn_string_t *name,
+ const char *name,
                         const svn_string_t *value,
                         apr_pool_t *pool)
 {
Index: ./subversion/libsvn_fs/rev-table.h
===================================================================
--- ./subversion/libsvn_fs/.svn/text-base/rev-table.h Tue Nov 6 12:51:42 2001
+++ ./subversion/libsvn_fs/rev-table.h Tue Nov 6 13:03:33 2001
@@ -74,13 +74,10 @@
                                    trail_t *trail);
 
 
-/* Set property NAME to VALUE on REV in FS, as part of TRAIL.
-
- ### todo (issue #406): name could be const char *, value_p
- svn_string_t instead of svn_stringbuf_t. */
+/* Set property NAME to VALUE on REV in FS, as part of TRAIL. */
 svn_error_t *svn_fs__set_rev_prop (svn_fs_t *fs,
                                    svn_revnum_t rev,
- const svn_string_t *name,
+ const char *name,
                                    const svn_string_t *value,
                                    trail_t *trail);
 
Index: ./subversion/libsvn_ra_local/commit_editor.c
===================================================================
--- ./subversion/libsvn_ra_local/.svn/text-base/commit_editor.c Tue Nov 6 12:54:24 2001
+++ ./subversion/libsvn_ra_local/commit_editor.c Tue Nov 6 13:26:05 2001
@@ -490,12 +490,11 @@
 {
   struct file_baton *fb = file_baton;
   struct edit_baton *eb = fb->parent->edit_baton;
- svn_string_t propname = { name->data, name->len };
   svn_string_t propvalue = { value->data, value->len };
 
   /* This routine is a mindless wrapper. */
   SVN_ERR (svn_fs_change_node_prop (eb->txn_root, fb->path->data,
- &propname, &propvalue, fb->subpool));
+ name->data, &propvalue, fb->subpool));
 
   return SVN_NO_ERROR;
 }
@@ -508,12 +507,11 @@
 {
   struct dir_baton *db = dir_baton;
   struct edit_baton *eb = db->edit_baton;
- svn_string_t propname = { name->data, name->len };
   svn_string_t propvalue = { value->data, value->len };
 
   /* This routine is a mindless wrapper. */
   SVN_ERR (svn_fs_change_node_prop (eb->txn_root, db->path->data,
- &propname, &propvalue, db->subpool));
+ name->data, &propvalue, db->subpool));
 
   return SVN_NO_ERROR;
 }
Index: ./subversion/mod_dav_svn/deadprops.c
===================================================================
--- ./subversion/mod_dav_svn/.svn/text-base/deadprops.c Tue Nov 6 12:53:22 2001
+++ ./subversion/mod_dav_svn/deadprops.c Tue Nov 6 13:03:57 2001
@@ -117,7 +117,7 @@
 static dav_error *save_value(dav_db *db, const dav_prop_name *name,
                              const svn_string_t *value)
 {
- svn_string_t propname;
+ char *propname;
   svn_error_t *serr;
   char *tpropname;
 
@@ -137,11 +137,11 @@
   /* Working Baseline or Working (Version) Resource */
   if (db->resource->baselined)
     serr = svn_fs_change_txn_prop(db->resource->info->root.txn,
- &propname, value, db->resource->pool);
+ propname, value, db->resource->pool);
   else
     serr = svn_fs_change_node_prop(db->resource->info->root.root,
                                    get_repos_path(db->resource->info),
- &propname, value, db->resource->pool);
+ propname, value, db->resource->pool);
   if (serr != NULL)
     return dav_svn_convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
                                "could not change a property");
Index: ./subversion/tests/libsvn_fs/fs-test.c
===================================================================
--- ./subversion/tests/libsvn_fs/.svn/text-base/fs-test.c Tue Nov 6 12:52:09 2001
+++ ./subversion/tests/libsvn_fs/fs-test.c Tue Nov 6 13:31:30 2001
@@ -368,8 +368,8 @@
   }
 
   {
- svn_string_t unused1, unused2;
- err = svn_fs_change_rev_prop (fs, 0, &unused1, &unused2, pool);
+ svn_string_t unused1;
+ err = svn_fs_change_rev_prop (fs, 0, NULL, &unused1, pool);
     SVN_ERR (check_no_fs_error (err, pool));
   }
 
@@ -677,7 +677,6 @@
   svn_string_t *value;
   int i;
   svn_string_t s1;
- svn_string_t s2;
 
   const char *initial_props[4][2] = {
     { "color", "red" },
@@ -705,31 +704,26 @@
   /* Set some properties on the revision. */
   for (i = 0; i < 4; i++)
     {
- SET_STR (&s1, initial_props[i][0]);
- SET_STR (&s2, initial_props[i][1]);
- SVN_ERR (svn_fs_change_rev_prop (fs, 0, &s1, &s2, pool));
+ SET_STR (&s1, initial_props[i][1]);
+ SVN_ERR (svn_fs_change_rev_prop (fs, 0, initial_props[i][0], &s1, pool));
     }
 
   /* Change some of the above properties. */
- SET_STR (&s1, "color");
- SET_STR (&s2, "violet");
- SVN_ERR (svn_fs_change_rev_prop (fs, 0, &s1, &s2, pool));
-
- SET_STR (&s1, "auto");
- SET_STR (&s2, "Red 2000 Chevrolet Blazer");
- SVN_ERR (svn_fs_change_rev_prop (fs, 0, &s1, &s2, pool));
+ SET_STR (&s1, "violet");
+ SVN_ERR (svn_fs_change_rev_prop (fs, 0, "color", &s1, pool));
+
+ SET_STR (&s1, "Red 2000 Chevrolet Blazer");
+ SVN_ERR (svn_fs_change_rev_prop (fs, 0, "auto", &s1, pool));
 
   /* Remove a property altogether */
- SET_STR (&s1, "size");
- SVN_ERR (svn_fs_change_rev_prop (fs, 0, &s1, NULL, pool));
+ SVN_ERR (svn_fs_change_rev_prop (fs, 0, "size", NULL, pool));
 
   /* Copy a property's value into a new property. */
   SVN_ERR (svn_fs_revision_prop (&value, fs, 0, "color", pool));
 
- SET_STR (&s1, "flower");
- s2.data = value->data;
- s2.len = value->len;
- SVN_ERR (svn_fs_change_rev_prop (fs, 0, &s1, &s2, pool));
+ s1.data = value->data;
+ s1.len = value->len;
+ SVN_ERR (svn_fs_change_rev_prop (fs, 0, "flower", &s1, pool));
 
   /* Obtain a list of all current properties, and make sure it matches
      the expected values. */
@@ -787,7 +781,6 @@
   svn_revnum_t after_rev;
   int i;
   svn_string_t s1;
- svn_string_t s2;
 
   const char *initial_props[4][2] = {
     { "color", "red" },
@@ -817,31 +810,26 @@
   /* Set some properties on the revision. */
   for (i = 0; i < 4; i++)
     {
- SET_STR (&s1, initial_props[i][0]);
- SET_STR (&s2, initial_props[i][1]);
- SVN_ERR (svn_fs_change_txn_prop (txn, &s1, &s2, pool));
+ SET_STR (&s1, initial_props[i][1]);
+ SVN_ERR (svn_fs_change_txn_prop (txn, initial_props[i][0], &s1, pool));
     }
 
   /* Change some of the above properties. */
- SET_STR (&s1, "color");
- SET_STR (&s2, "violet");
- SVN_ERR (svn_fs_change_txn_prop (txn, &s1, &s2, pool));
-
- SET_STR (&s1, "auto");
- SET_STR (&s2, "Red 2000 Chevrolet Blazer");
- SVN_ERR (svn_fs_change_txn_prop (txn, &s1, &s2, pool));
+ SET_STR (&s1, "violet");
+ SVN_ERR (svn_fs_change_txn_prop (txn, "color", &s1, pool));
+
+ SET_STR (&s1, "Red 2000 Chevrolet Blazer");
+ SVN_ERR (svn_fs_change_txn_prop (txn, "auto", &s1, pool));
 
   /* Remove a property altogether */
- SET_STR (&s1, "size");
- SVN_ERR (svn_fs_change_txn_prop (txn, &s1, NULL, pool));
+ SVN_ERR (svn_fs_change_txn_prop (txn, "size", NULL, pool));
 
   /* Copy a property's value into a new property. */
   SVN_ERR (svn_fs_txn_prop (&value, txn, "color", pool));
 
- SET_STR (&s1, "flower");
- s2.data = value->data;
- s2.len = value->len;
- SVN_ERR (svn_fs_change_txn_prop (txn, &s1, &s2, pool));
+ s1.data = value->data;
+ s1.len = value->len;
+ SVN_ERR (svn_fs_change_txn_prop (txn, "flower", &s1, pool));
 
   /* Obtain a list of all current properties, and make sure it matches
      the expected values. */
@@ -950,7 +938,6 @@
   svn_string_t *value;
   int i;
   svn_string_t s1;
- svn_string_t s2;
 
   const char *initial_props[4][2] = {
     { "Best Rock Artist", "Creed" },
@@ -983,33 +970,32 @@
   /* Set some properties on the nodes. */
   for (i = 0; i < 4; i++)
     {
- SET_STR (&s1, initial_props[i][0]);
- SET_STR (&s2, initial_props[i][1]);
+ SET_STR (&s1, initial_props[i][1]);
       SVN_ERR (svn_fs_change_node_prop
- (txn_root, "music.txt", &s1, &s2, pool));
+ (txn_root, "music.txt", initial_props[i][0], &s1, pool));
     }
 
   /* Change some of the above properties. */
- SET_STR (&s1, "Best Rock Artist");
- SET_STR (&s2, "P.O.D.");
- SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", &s1, &s2, pool));
-
- SET_STR (&s1, "Best Rap Artist");
- SET_STR (&s2, "Busta Rhymes");
- SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", &s1, &s2, pool));
+ SET_STR (&s1, "P.O.D.");
+ SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", "Best Rock Artist",
+ &s1, pool));
+
+ SET_STR (&s1, "Busta Rhymes");
+ SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", "Best Rap Artist",
+ &s1, pool));
 
   /* Remove a property altogether */
- SET_STR (&s1, "Best Country Artist");
- SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", &s1, NULL, pool));
+ SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt",
+ "Best Country Artist", NULL, pool));
 
   /* Copy a property's value into a new property. */
   SVN_ERR (svn_fs_node_prop (&value, txn_root, "music.txt",
                              "Best Sound Designer", pool));
 
- SET_STR (&s1, "Biggest Cakewalk Fanatic");
- s2.data = value->data;
- s2.len = value->len;
- SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt", &s1, &s2, pool));
+ s1.data = value->data;
+ s1.len = value->len;
+ SVN_ERR (svn_fs_change_node_prop (txn_root, "music.txt",
+ "Biggest Cakewalk Fanatic", &s1, pool));
 
   /* Obtain a list of all current properties, and make sure it matches
      the expected values. */
Index: ./subversion/tests/libsvn_repos/dir-delta-editor.c
===================================================================
--- ./subversion/tests/libsvn_repos/.svn/text-base/dir-delta-editor.c Tue Nov 6 12:52:16 2001
+++ ./subversion/tests/libsvn_repos/dir-delta-editor.c Tue Nov 6 13:04:07 2001
@@ -265,11 +265,10 @@
                        svn_stringbuf_t *name, svn_stringbuf_t *value)
 {
   struct file_baton *fb = (struct file_baton *) file_baton;
- svn_string_t propname = { name->data, name->len };
   svn_string_t propvalue = { value->data, value->len };
 
   return svn_fs_change_node_prop (fb->dir_baton->edit_baton->txn_root,
- fb->path->data, &propname, &propvalue,
+ fb->path->data, name->data, &propvalue,
                                   fb->dir_baton->edit_baton->pool);
 }
 
@@ -279,11 +278,10 @@
                       svn_stringbuf_t *name, svn_stringbuf_t *value)
 {
   struct dir_baton *d = (struct dir_baton *) parent_baton;
- svn_string_t propname = { name->data, name->len };
   svn_string_t propvalue = { value->data, value->len };
 
   return svn_fs_change_node_prop (d->edit_baton->txn_root,
- d->path->data, &propname, &propvalue,
+ d->path->data, name->data, &propvalue,
                                   d->edit_baton->pool);
 }
 
Index: ./subversion/libsvn_repos/hooks.c
===================================================================
--- ./subversion/libsvn_repos/.svn/text-base/hooks.c Tue Nov 6 12:52:04 2001
+++ ./subversion/libsvn_repos/hooks.c Tue Nov 6 13:04:39 2001
@@ -218,24 +218,19 @@
      them as properties on the txn. Later, when we commit the txn,
      these properties will be copied into the newly created revision. */
   {
- svn_string_t log_prop_name = { SVN_PROP_REVISION_LOG,
- sizeof(SVN_PROP_REVISION_LOG) - 1};
- svn_string_t author_prop_name = { SVN_PROP_REVISION_AUTHOR,
- sizeof(SVN_PROP_REVISION_AUTHOR) - 1};
-
     /* User (author). */
     {
       svn_string_t val;
       val.data = author;
       val.len = strlen (author);
       
- SVN_ERR (svn_fs_change_txn_prop (*txn_p, &author_prop_name,
+ SVN_ERR (svn_fs_change_txn_prop (*txn_p, SVN_PROP_REVISION_AUTHOR,
                                        &val, pool));
     }
     
     /* Log message. */
     if (log_msg != NULL)
- SVN_ERR (svn_fs_change_txn_prop (*txn_p, &log_prop_name,
+ SVN_ERR (svn_fs_change_txn_prop (*txn_p, SVN_PROP_REVISION_LOG,
                                        log_msg, pool));
   }
 
@@ -260,16 +255,13 @@
   /* We pass the author to the filesystem by adding it as a property
      on the txn. */
   {
- svn_string_t author_prop_name = { SVN_PROP_REVISION_AUTHOR,
- sizeof(SVN_PROP_REVISION_AUTHOR) - 1};
-
     /* User (author). */
     {
       svn_string_t val;
       val.data = author;
       val.len = strlen (author);
       
- SVN_ERR (svn_fs_change_txn_prop (*txn_p, &author_prop_name,
+ SVN_ERR (svn_fs_change_txn_prop (*txn_p, SVN_PROP_REVISION_AUTHOR,
                                        &val, pool));
     }
   }

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sat Oct 21 14:36:48 2006

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.