You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2018/11/28 04:00:25 UTC
svn commit: r1847608 - in /subversion/branches/1.10.x: ./ STATUS
subversion/libsvn_client/copy.c subversion/tests/cmdline/copy_tests.py
Author: svn-role
Date: Wed Nov 28 04:00:25 2018
New Revision: 1847608
URL: http://svn.apache.org/viewvc?rev=1847608&view=rev
Log:
Merge the r1847181 group from trunk:
* r1847181, r1847182, r1847188, r1847264
Fix issue SVN-4792: Foreign repo copy of file adding mergeinfo.
Justification:
We don't want bogus mergeinfo.
Votes:
+1: julianfoad, brane, rhuijben
Modified:
subversion/branches/1.10.x/ (props changed)
subversion/branches/1.10.x/STATUS
subversion/branches/1.10.x/subversion/libsvn_client/copy.c
subversion/branches/1.10.x/subversion/tests/cmdline/copy_tests.py
Propchange: subversion/branches/1.10.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Nov 28 04:00:25 2018
@@ -103,4 +103,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788,1825979,1826720-1826721,1826747,1826811,1826814,1826877,1826907,1826971,1827105,1827114,1827191,1827562,1827574,1827670,1828613,1829012,1829015,1829241,1829260,1829344,1830083,1830882-1830883,1830885,1830900-1830901,1831110,1831112,1831540,1833465,1833621,1833836,1833842,1833864,1833866,1833895,1833897,1833899,1833901,1835760,1836306,1836762,1836802,1836960,1836963,1836968,1836976,1837037,1837790,1838813,1839662,1839703,1839734,1839739,1840991,1842260,1842262,1842264,184
3888,1844882,1844987,1845204,1845261,1845408,1845555,1845577,1846299,1846403,1846406,1846704
+/subversion/trunk:1817837,1817856,1818577-1818578,1818584,1818651,1818662,1818727,1818801,1818803,1818807,1818868,1818871,1819036-1819037,1819043,1819049,1819052,1819093,1819146,1819162,1819444,1819556-1819557,1819603,1819804,1819911,1820044,1820046-1820047,1820518,1820627,1820718,1820778,1821183,1821224,1821621,1821678,1822401,1822587,1822591,1822996,1823202-1823203,1823211,1823327,1823791,1823966,1823989,1824033,1825024,1825045,1825215,1825266,1825306,1825709,1825711,1825721,1825736,1825778,1825783,1825787-1825788,1825979,1826720-1826721,1826747,1826811,1826814,1826877,1826907,1826971,1827105,1827114,1827191,1827562,1827574,1827670,1828613,1829012,1829015,1829241,1829260,1829344,1830083,1830882-1830883,1830885,1830900-1830901,1831110,1831112,1831540,1833465,1833621,1833836,1833842,1833864,1833866,1833895,1833897,1833899,1833901,1835760,1836306,1836762,1836802,1836960,1836963,1836968,1836976,1837037,1837790,1838813,1839662,1839703,1839734,1839739,1840991,1842260,1842262,1842264,184
3888,1844882,1844987,1845204,1845261,1845408,1845555,1845577,1846299,1846403,1846406,1846704,1847181-1847182,1847188,1847264
Modified: subversion/branches/1.10.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/STATUS?rev=1847608&r1=1847607&r2=1847608&view=diff
==============================================================================
--- subversion/branches/1.10.x/STATUS (original)
+++ subversion/branches/1.10.x/STATUS Wed Nov 28 04:00:25 2018
@@ -27,10 +27,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1847181, r1847182, r1847188, r1847264
- Fix issue SVN-4792: Foreign repo copy of file adding mergeinfo.
- Justification:
- We don't want bogus mergeinfo.
- Votes:
- +1: julianfoad, brane, rhuijben
Modified: subversion/branches/1.10.x/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/libsvn_client/copy.c?rev=1847608&r1=1847607&r2=1847608&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/1.10.x/subversion/libsvn_client/copy.c Wed Nov 28 04:00:25 2018
@@ -2550,13 +2550,18 @@ repos_to_wc_copy_single(svn_boolean_t *t
pool));
}
- /* Record the implied mergeinfo (before the notification callback
- is invoked for the root node). */
- SVN_ERR(svn_client__get_repos_mergeinfo(
- &src_mergeinfo, ra_session,
- pair->src_abspath_or_url, pair->src_revnum,
- svn_mergeinfo_inherited, TRUE /*squelch_incapable*/, pool));
- SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));
+ if (same_repositories)
+ {
+ /* Record the implied mergeinfo (before the notification callback
+ is invoked for the root node). */
+ SVN_ERR(svn_client__get_repos_mergeinfo(&src_mergeinfo, ra_session,
+ pair->src_abspath_or_url,
+ pair->src_revnum,
+ svn_mergeinfo_inherited,
+ TRUE /*squelch_incapable*/,
+ pool));
+ SVN_ERR(extend_wc_mergeinfo(dst_abspath, src_mergeinfo, ctx, pool));
+ }
/* Do our own notification for the root node, even if we could possibly
have delegated it. See also issue #1552.
Modified: subversion/branches/1.10.x/subversion/tests/cmdline/copy_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.10.x/subversion/tests/cmdline/copy_tests.py?rev=1847608&r1=1847607&r2=1847608&view=diff
==============================================================================
--- subversion/branches/1.10.x/subversion/tests/cmdline/copy_tests.py (original)
+++ subversion/branches/1.10.x/subversion/tests/cmdline/copy_tests.py Wed Nov 28 04:00:25 2018
@@ -1032,43 +1032,63 @@ def foreign_repos_to_wc(sbox):
repo_url + '/' + source,
repo_url + '/' + dest)
+ # Scenarios:
+ # (parent-path-under-'A/', base-name, child-paths, mergeinfo-inheritance)
+ scenarios = [
+ ('B', 'E', ['alpha','beta'], 'explicit'),
+ ('B', 'F', [], 'inherited'),
+ ('D/G', 'pi', [], 'explicit'),
+ ('D/G', 'rho', [], 'inherited'),
+ ]
+
+ # Add some mergeinfo, which should be discarded by a foreign repo copy.
+ # On each path of interest, add either explicit or inherited mergeinfo:
+ # the implementation handles these cases differently.
+ # (We commit these initially in the original repo just for convenience: as
+ # we already have a WC. Really they only need to be in the 'other' repo.)
+ for parent, name, children, mi_inheritance in scenarios:
+ if mi_inheritance == 'explicit':
+ sbox.simple_propset(SVN_PROP_MERGEINFO,
+ '/branch/' + name + ':1', 'A/' + parent + '/' + name)
+ else:
+ sbox.simple_propset(SVN_PROP_MERGEINFO,
+ '/branch/' + name + ':1', 'A/' + parent)
+ sbox.simple_commit()
+
# We have a standard repository and working copy. Now we create a
# second repository with the same greek tree, but different UUID.
repo_dir = sbox.repo_dir
other_repo_dir, other_repo_url = sbox.add_repo_path('other')
- svntest.main.copy_repos(repo_dir, other_repo_dir, 1, 1)
+ svntest.main.copy_repos(repo_dir, other_repo_dir, 2, 1)
move_url(other_repo_url, 'A', 'A2')
move_url(other_repo_url, 'A2', 'A3')
# URL->wc copy:
# copy a file and a directory from a foreign repository.
# we should get some scheduled additions *without history*.
- E_url = other_repo_url + "/A2/B/E"
- pi_url = other_repo_url + "/A2/D/G/pi"
- peg_rev = '2'
- op_rev = '1'
- E_url_resolved = E_url.replace('/A2/', '/A/')
- pi_url_resolved = pi_url.replace('/A2/', '/A/')
-
- expected_output = svntest.verify.UnorderedOutput([
- '--- Copying from foreign repository URL \'%s\':\n' % E_url_resolved,
- 'A %s\n' % sbox.ospath('E'),
- 'A %s\n' % sbox.ospath('E/beta'),
- 'A %s\n' % sbox.ospath('E/alpha'),
- ])
- svntest.actions.run_and_verify_svn(expected_output, [],
- 'copy', '-r' + op_rev,
- E_url + '@' + peg_rev,
- wc_dir)
-
- expected_output = [
- '--- Copying from foreign repository URL \'%s\':\n' % pi_url_resolved,
- 'A %s\n' % sbox.ospath('pi'),
- ]
- svntest.actions.run_and_verify_svn(expected_output, [],
- 'copy', '-r' + op_rev,
- pi_url + '@' + peg_rev,
- wc_dir)
+ peg_rev = '3'
+ op_rev = '2'
+
+ for parent, name, children, mi_inheritance in scenarios:
+ src_url = other_repo_url + '/A2/' + parent + '/' + name
+ src_url_resolved = src_url.replace('/A2/', '/A/')
+
+ expected_output = svntest.verify.UnorderedOutput([
+ '--- Copying from foreign repository URL \'%s\':\n' % src_url_resolved,
+ 'A %s\n' % sbox.ospath(name),
+ ] + [
+ 'A %s\n' % sbox.ospath(name + '/' + child)
+ for child in children
+ ])
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'copy', '-r' + op_rev,
+ src_url + '@' + peg_rev,
+ wc_dir)
+
+ # Validate the mergeinfo of the copy destination (we expect none)
+ svntest.actions.run_and_verify_svn([], '.*W200017: Property.*not found',
+ 'propget', SVN_PROP_MERGEINFO,
+ sbox.ospath(name))
#----------------------------------------------------------------------
# Issue 1084: ra_svn move/copy bug