subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1660646 - /subversion/trunk/subversion/libsvn_wc/entries.c
Date Wed, 18 Feb 2015 15:11:38 GMT
Author: rhuijben
Date: Wed Feb 18 15:11:38 2015
New Revision: 1660646

URL: http://svn.apache.org/r1660646
Log:
Fix an ugly corner case in the upgrade from entries code where replaced
directories would receive an invalid repository location.

In general WC-NG wouldn't use the value, as they are never recorded
on an op-root, and commit only uses these paths from op-roots.

This case tripped the validation rules from upgrade tests #16.

* subversion/libsvn_wc/entries.c
  (write_entry): Fix repository location for directories.
    entry->name was "" for the directory itself. Use revision
    from same source as repos-path and repos-id.

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

Modified: subversion/trunk/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/entries.c?rev=1660646&r1=1660645&r2=1660646&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/entries.c (original)
+++ subversion/trunk/subversion/libsvn_wc/entries.c Wed Feb 18 15:11:38 2015
@@ -2135,17 +2135,18 @@ write_entry(struct write_baton **entry_n
       below_working_node->presence = svn_wc__db_status_normal;
       below_working_node->kind = entry->kind;
       below_working_node->repos_id = work->repos_id;
+      below_working_node->revision = work->revision;
 
       /* This is just guessing. If the node below would have been switched
          or if it was updated to a different version, the guess would
          fail. But we don't have better information pre wc-ng :( */
       if (work->repos_relpath)
         below_working_node->repos_relpath
-          = svn_relpath_join(work->repos_relpath, entry->name,
+          = svn_relpath_join(work->repos_relpath,
+                             svn_relpath_basename(local_relpath, NULL),
                              result_pool);
       else
         below_working_node->repos_relpath = NULL;
-      below_working_node->revision = parent_node->work->revision;
 
       /* The revert_base checksum isn't available in the entry structure,
          so the caller provides it. */



Mime
View raw message