Author: hwright
Date: Tue Mar 16 14:20:37 2010
New Revision: 923749
URL: http://svn.apache.org/viewvc?rev=923749&view=rev
Log:
Reintegrate the 1.6.x-r891672 branch:
* r891672
Fix issue #3552 - File external from URL cannot overwrite the existing
versioned item
Justification:
This defect affects 'subversive' client users in 1.6.x.
Notes:
The backport branch exists in order to make the patch compatible with
1.6.x tests. r876917 introduces 'switched' to wc status which is not
available in 1.6.x.
Branch:
^/subversion/branches/1.6.x-r891672
Votes:
+1: stylesen, cmpilato, rhuijben
Modified:
subversion/branches/1.6.x/ (props changed)
subversion/branches/1.6.x/CHANGES (props changed)
subversion/branches/1.6.x/STATUS
subversion/branches/1.6.x/subversion/libsvn_client/commit_util.c
subversion/branches/1.6.x/subversion/tests/cmdline/externals_tests.py
Propchange: subversion/branches/1.6.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 16 14:20:37 2010
@@ -24,6 +24,7 @@
/subversion/branches/1.6.x-r39887:876369-876411
/subversion/branches/1.6.x-r40452:880530-890996
/subversion/branches/1.6.x-r889840:889888-890974
+/subversion/branches/1.6.x-r891672:891676-923748
/subversion/branches/1.6.x-r896522:896528-897866
/subversion/branches/1.6.x-r898963:899874-915098
/subversion/branches/1.6.x-r905326:905545-923537
@@ -56,4 +57,4 @@
/subversion/branches/tc_url_rev:870696-870828
/subversion/branches/tree-conflicts:864636-869499
/subversion/branches/tree-conflicts-notify:870271-870353
-/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,895514,895653,896522,898963,899826,899828,900797,904594,905326,922516
+/subversion/trunk:875976,875980-875981,876054-876056,876092,876175,876299,876306,876427,876440,876450,876507,876571,879093,879688,880274-880275,880370,880450,880474,880525-880526,880552,881905,884842,886164,886197,888715,888979,889081,889840,891672,895514,895653,896522,898963,899826,899828,900797,904594,905326,922516
Propchange: subversion/branches/1.6.x/CHANGES
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Mar 16 14:20:37 2010
@@ -24,6 +24,7 @@
/subversion/branches/1.6.x-r39887/CHANGES:876369-876411
/subversion/branches/1.6.x-r40452/CHANGES:880530-890996
/subversion/branches/1.6.x-r889840/CHANGES:889888-890974
+/subversion/branches/1.6.x-r891672/CHANGES:891676-923748
/subversion/branches/1.6.x-r896522/CHANGES:896528-897866
/subversion/branches/1.6.x-r898963/CHANGES:899874-915098
/subversion/branches/1.6.x-r905326/CHANGES:905545-923537
Modified: subversion/branches/1.6.x/STATUS
URL:
http://svn.apache.org/viewvc/subversion/branches/1.6.x/STATUS?rev=923749&r1=923748&r2=923749&view=diff
==============================================================================
--- subversion/branches/1.6.x/STATUS (original)
+++ subversion/branches/1.6.x/STATUS Tue Mar 16 14:20:37 2010
@@ -214,20 +214,6 @@ Veto-blocked changes:
Approved changes:
=================
-* r891672
- Fix issue #3552 - File external from URL cannot overwrite the existing
- versioned item
- Justification:
- This defect affects 'subversive' client users in 1.6.x.
- Notes:
- The backport branch exists in order to make the patch compatible with
- 1.6.x tests. r876917 introduces 'switched' to wc status which is not
- available in 1.6.x.
- Branch:
- ^/subversion/branches/1.6.x-r891672
- Votes:
- +1: stylesen, cmpilato, rhuijben
-
* r892050, 892085
Fix a reintegrate bug which can occur when the merge source has mergeinfo
that explicitly describes common history with the reintegrate target.
Modified: subversion/branches/1.6.x/subversion/libsvn_client/commit_util.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/libsvn_client/commit_util.c?rev=923749&r1=923748&r2=923749&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/libsvn_client/commit_util.c (original)
+++ subversion/branches/1.6.x/subversion/libsvn_client/commit_util.c Tue Mar 16
14:20:37 2010
@@ -461,6 +461,9 @@ harvest_committables(apr_hash_t *committ
svn_path_local_style(path, scratch_pool));
}
+ if (entry->file_external_path && copy_mode)
+ return SVN_NO_ERROR;
+
if (entry->kind == svn_node_dir)
{
/* Read the dir's own entries for use when recursing. */
Modified: subversion/branches/1.6.x/subversion/tests/cmdline/externals_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.6.x/subversion/tests/cmdline/externals_tests.py?rev=923749&r1=923748&r2=923749&view=diff
==============================================================================
--- subversion/branches/1.6.x/subversion/tests/cmdline/externals_tests.py
(original)
+++ subversion/branches/1.6.x/subversion/tests/cmdline/externals_tests.py Tue
Mar 16 14:20:37 2010
@@ -1199,6 +1199,105 @@ def binary_file_externals(sbox):
True)
+#----------------------------------------------------------------------
+
+# Issue #3552
+def wc_repos_file_externals(sbox):
+ "tag directory with file externals from wc to url"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ repo_url = sbox.repo_url
+
+ # Add a file A/theta.
+ theta_path = os.path.join(wc_dir, 'A', 'theta')
+ svntest.main.file_write(theta_path, 'theta', 'w')
+ svntest.main.run_svn(None, 'add', theta_path)
+
+ # Created expected output tree for 'svn ci'
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/theta' : Item(verb='Adding'),
+ })
+
+ # Create expected status tree
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=2),
+ })
+
+ # Commit the new file, creating revision 2.
+ svntest.actions.run_and_verify_commit(wc_dir, expected_output,
+ expected_status, None, wc_dir)
+
+
+ # Create a file external on the file A/theta
+ C = os.path.join(wc_dir, 'A', 'C')
+ external = os.path.join(C, 'theta')
+ externals_prop = "^/A/theta theta\n"
+
+ # Set and commit the property.
+ change_external(C, externals_prop)
+
+
+ # Now, /A/C/theta is designated as a file external pointing to
+ # the file /A/theta, but the external file is not there yet.
+ # Try to actually insert the external file via a verified update:
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/C/theta' : Item(status='E '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/theta' : Item('theta'),
+ 'A/C' : Item(props={'svn:externals':externals_prop}),
+ 'A/C/theta' : Item('theta'),
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=3),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None, None, None, None,
+ True)
+
+ # Copy A/C to a new tag in the repos
+ tag_url = repo_url + '/A/I'
+ svntest.main.run_svn(None, 'cp', C, tag_url, '-m', 'create tag')
+
+ # Try to actually insert the external file (A/I/theta) via a verified update:
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/I' : Item(status='A '),
+ 'A/I/theta' : Item(status='E '),
+ })
+
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/theta' : Item('theta'),
+ 'A/C' : Item(props={'svn:externals':externals_prop}),
+ 'A/C/theta' : Item('theta'),
+ 'A/I' : Item(props={'svn:externals':externals_prop}),
+ 'A/I/theta' : Item('theta'),
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 4)
+ expected_status.add({
+ 'A/theta' : Item(status=' ', wc_rev=4),
+ 'A/I' : Item(status=' ', wc_rev=4),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status,
+ None, None, None, None, None,
+ True)
+
+
########################################################################
# Run the tests
@@ -1223,6 +1322,7 @@ test_list = [ None,
can_place_file_external_into_dir_external,
external_into_path_with_spaces,
binary_file_externals,
+ wc_repos_file_externals,
]
if __name__ == '__main__':