subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hwri...@apache.org
Subject svn commit: r1173052 - in /subversion/branches/1.7.x: ./ subversion/libsvn_wc/ subversion/tests/cmdline/ subversion/tests/cmdline/upgrade_tests_data/
Date Tue, 20 Sep 2011 09:39:20 GMT
Author: hwright
Date: Tue Sep 20 09:39:19 2011
New Revision: 1173052

URL: http://svn.apache.org/viewvc?rev=1173052&view=rev
Log:
* STATUS: Vote for an approve the issue 4015 fix.

Added:
    subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests_data/upgrade_file_externals.tar.bz2
      - copied unchanged from r1167503, subversion/trunk/subversion/tests/cmdline/upgrade_tests_data/upgrade_file_externals.tar.bz2
Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_wc/entries.c
    subversion/branches/1.7.x/subversion/libsvn_wc/wc-queries.sql
    subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
    subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests.py

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Sep 20 09:39:19 2011
@@ -64,4 +64,4 @@
 /subversion/branches/tree-conflicts:868291-873154
 /subversion/branches/tree-conflicts-notify:873926-874008
 /subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313,1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158187,115
 8193-1158194,1158196,1158201,1158207,1158209-1158210,1158217,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616-1158617,1158634,1158854,1158875,1158886,1158893,1158896,1158919,1158924,1158963,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159400,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705,1160756,1161063,1161080,1161185,1161210,1161683,1161721,1162024,1162033,1162201,1162516,1162880,1163557,1163792,1163953,1164027,1164517,1164535,1164554,1164580,1164645,1164760,1164765,1166500,1166555,1166678,1167062,1167173,1167209,1167269
+/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313,1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158187,115
 8193-1158194,1158196,1158201,1158207,1158209-1158210,1158217,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616-1158617,1158634,1158854,1158875,1158886,1158893,1158896,1158919,1158924,1158963,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159400,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705,1160756,1161063,1161080,1161185,1161210,1161683,1161721,1162024,1162033,1162201,1162516,1162880,1163557,1163792,1163953,1164027,1164517,1164535,1164554,1164580,1164645,1164760,1164765,1166500,1166555,1166678,1167062,1167173,1167209,1167269,1167503,1169524,1169531

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1173052&r1=1173051&r2=1173052&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Tue Sep 20 09:39:19 2011
@@ -121,8 +121,6 @@ Candidate changes:
    Make relocate act recursively on all externals, not just immediate ones.
    Justification:
      Relocating externals is new 1.7, no reason not to do them all.
-   Notes:
-     Depends on issue 4015 merge.
    Votes:
      +1: philip, neels
 
@@ -138,10 +136,3 @@ Veto-blocked changes:
 
 Approved changes:
 =================
-
- * r1167503, r1169524, r1169531
-   Fix issue 4015, file externals upgrade to bogus non-external files.
-   Justification:
-     Upgrade with file externals breaks working copies.
-   Votes:
-     +1: philip, neels, hwright

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/entries.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/entries.c?rev=1173052&r1=1173051&r2=1173052&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/entries.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/entries.c Tue Sep 20 09:39:19 2011
@@ -1975,6 +1975,9 @@ write_entry(struct write_baton **entry_n
       base_node->changed_date = entry->cmt_date;
       base_node->changed_author = entry->cmt_author;
 
+      if (entry->file_external_path)
+        base_node->file_external = TRUE;
+
       SVN_ERR(insert_node(sdb, base_node, scratch_pool));
 
       /* We have to insert the lock after the base node, because the node
@@ -1992,12 +1995,6 @@ write_entry(struct write_baton **entry_n
           SVN_ERR(svn_wc__db_lock_add(db, tmp_entry_abspath, &lock,
                                       scratch_pool));
         }
-
-      /* Now, update the file external information. */
-      if (entry->file_external_path)
-        {
-          base_node->file_external = TRUE;
-        }
     }
 
   if (below_working_node)

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/wc-queries.sql
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/wc-queries.sql?rev=1173052&r1=1173051&r2=1173052&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/wc-queries.sql (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/wc-queries.sql Tue Sep 20 09:39:19 2011
@@ -945,6 +945,16 @@ INSERT OR REPLACE INTO externals (
     repos_id, def_repos_relpath, def_operational_revision, def_revision)
 VALUES (?1, ?2, ?3, ?4, ?5, ?6, ?7, ?8, ?9, ?10)
 
+-- STMT_INSERT_EXTERNAL_UPGRADE
+INSERT OR REPLACE INTO externals (
+    wc_id, local_relpath, parent_relpath, presence, kind, def_local_relpath,
+    repos_id, def_repos_relpath, def_operational_revision, def_revision)
+VALUES (?1, ?2, ?3, ?4,
+        CASE WHEN (SELECT file_external FROM nodes
+                   WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = 0)
+             IS NOT NULL THEN 'file' ELSE 'unknown' END,
+        ?5, ?6, ?7, ?8, ?9)
+
 -- STMT_SELECT_EXTERNAL_INFO
 SELECT presence, kind, def_local_relpath, repos_id,
     def_repos_relpath, def_operational_revision, def_revision, presence

Modified: subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c?rev=1173052&r1=1173051&r2=1173052&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/wc_db.c Tue Sep 20 09:39:19 2011
@@ -9854,7 +9854,8 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
           int i;
           apr_array_header_t *ext;
 
-          SVN_ERR(svn_sqlite__get_statement(&stmt, sdb, STMT_INSERT_EXTERNAL));
+          SVN_ERR(svn_sqlite__get_statement(&stmt, sdb,
+                                            STMT_INSERT_EXTERNAL_UPGRADE));
 
           SVN_ERR(svn_wc_parse_externals_description3(
                             &ext, svn_dirent_join(dir_abspath, local_relpath,
@@ -9869,13 +9870,12 @@ svn_wc__db_upgrade_apply_props(svn_sqlit
               item_relpath = svn_relpath_join(local_relpath, item->target_dir,
                                               scratch_pool);
 
-              SVN_ERR(svn_sqlite__bindf(stmt, "isssssis",
+              SVN_ERR(svn_sqlite__bindf(stmt, "issssis",
                                         wc_id,
                                         item_relpath,
                                         svn_relpath_dirname(item_relpath,
                                                             scratch_pool),
                                         "normal",
-                                        "unknown",
                                         local_relpath,
                                         (apr_int64_t)1, /* repos_id */
                                         "" /* repos_relpath */));

Modified: subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests.py?rev=1173052&r1=1173051&r2=1173052&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/upgrade_tests.py Tue Sep 20 09:39:19
2011
@@ -1112,6 +1112,79 @@ def upgrade_locked(sbox):
 
   run_and_verify_status_no_server(sbox.wc_dir, expected_status)
 
+@Issue(4015)
+def upgrade_file_externals(sbox):
+  "upgrade with file externals"
+
+  sbox.build()
+  replace_sbox_with_tarfile(sbox, 'upgrade_file_externals.tar.bz2')
+  svntest.main.run_svnadmin('setuuid', sbox.repo_dir,
+                            '07146bbd-0b64-4aaf-ab70-cd76a0df2d41')
+
+  expected_output = svntest.verify.RegexOutput('r2 committed.*')
+  svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+                                         'propset', 'svn:externals',
+                                         '^/A/B/E EX\n^/A/mu muX',
+                                         sbox.repo_url + '/A/B/F')
+
+  expected_output = svntest.verify.RegexOutput('r3 committed.*')
+  svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+                                         'propset', 'svn:externals',
+                                         '^/A/B/F FX\n^/A/B/lambda lambdaX',
+                                         sbox.repo_url + '/A/C')
+
+  expected_output = svntest.verify.RegexOutput('r4 committed.*')
+  svntest.actions.run_and_verify_svnmucc(None, expected_output, [],
+                                         'propset', 'pname1', 'pvalue1',
+                                         sbox.repo_url + '/A/mu',
+                                         'propset', 'pname2', 'pvalue2',
+                                         sbox.repo_url + '/A/B/lambda',
+                                         'propset', 'pname3', 'pvalue3',
+                                         sbox.repo_url + '/A/B/E/alpha')
+
+  svntest.actions.run_and_verify_svn(None, None, [], 'upgrade', sbox.wc_dir)
+  svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+                                     'file:///tmp/repo', sbox.repo_url,
+                                     sbox.wc_dir)
+  # Relocate not fully recursive?
+  svntest.actions.run_and_verify_svn(None, None, [], 'relocate',
+                                     'file:///tmp/repo', sbox.repo_url,
+                                     sbox.ospath('A/C/FX/EX'))
+  
+  expected_output = svntest.wc.State(sbox.wc_dir, {
+      'A/mu'            : Item(status=' U'),
+      'A/B/lambda'      : Item(status=' U'),
+      'A/B/E/alpha'     : Item(status=' U'),
+      'A/C/FX/EX/alpha' : Item(status=' U'),
+      'A/C/FX/muX'      : Item(status=' U'),
+      'A/C/lambdaX'     : Item(status=' U'),
+      'A/B/F/EX/alpha'  : Item(status=' U'),
+      'A/B/F/muX'       : Item(status=' U'),
+      })
+  svntest.actions.run_and_verify_update(sbox.wc_dir, expected_output,
+                                        None, None)
+
+  ### simple_property_verify only sees last line of multi-line
+  ### property values such as svn:externals
+  simple_property_verify(sbox.wc_dir, {
+      'A/mu'          : {'pname1' : 'pvalue1' },
+      'A/B/lambda'    : {'pname2' : 'pvalue2' },
+      'A/B/E/alpha'   : {'pname3' : 'pvalue3' },
+      'A/B/F'         : {'svn:externals' : '^/A/mu muX'},
+      'A/C'           : {'svn:externals' : '^/A/B/lambda lambdaX'},
+      'A/B/F/muX'     : {'pname1' : 'pvalue1' },
+      'A/C/lambdaX'   : {'pname2' : 'pvalue2' },
+      })
+
+  simple_property_verify(sbox.ospath('A/C/FX'), {
+      ''    : {'svn:externals' : '^/A/mu muX'},
+      'muX' : {'pname1' : 'pvalue1' },
+      })
+
+  simple_property_verify(sbox.ospath('A/C/FX/EX'), {
+      'alpha' : {'pname3' : 'pvalue3' },
+      })
+
 ########################################################################
 # Run the tests
 
@@ -1160,6 +1233,7 @@ test_list = [ None,
               add_add_x2,
               upgrade_with_missing_subdir,
               upgrade_locked,
+              upgrade_file_externals,
              ]
 
 



Mime
View raw message