Author: rhuijben
Date: Tue Feb 24 14:17:03 2015
New Revision: 1661956
URL: http://svn.apache.org/r1661956
Log:
Create '1.9.x-update-tc-detection' backport branch, based of the
'1.9.x-db-verify' branch.
* subversion/include/svn_wc.h (r1661664)
(svn_wc_status3_t): Add actual_kind.
* subversion/libsvn_wc/status.c (r1661664)
(assemble_status,
assemble_unversioned): Set actual_kind.
* subversion/libsvn_wc/update_editor.c (r1661664)
(modcheck_callback): Having unversioned nodes, implies that the tree is
changed. Even when they are in the same place as a delete.
(check_tree_conflict): Only report local action as deleted if the entire
tree is deleted.
* subversion/tests/cmdline/special_tests.py (r1661654,1661664,1661695,1661698)
(update_obstructing_symlink): Make test usable on non-posix systems.
Expect a tree conflict, instead of just the symlink being there.
* subversion/tests/cmdline/svntest/sandbox.py (r1661654)
(simple_symlink): New function, extracted from...
(simple_add_symlink): ... this function.
* subversion/tests/cmdline/switch_tests.py (r1661570,1661673)
(tolerate_local_mods): Expect a tree conflict.
(tree_conflicts_on_switch_2_2): Expect tree conflict on unversioned items.
* subversion/tests/cmdline/update_tests.py (r1661570)
(tree_conflicts_on_update_2_2): Expect tree conflict on unversioned items.
* subversion/tests/libsvn_wc/op-depth-test.c
(incomplete_switch): Remove directory that was created by test setup that
now causes a tree conflict. (r1661669)
(move_away_delete_update): Update expected results. (r1661591)
(move_update_parent_replace): Update expected results. (r1661591)
Added:
subversion/branches/1.9.x-update-tc-detection/ (props changed)
- copied from r1661955, subversion/branches/1.9.x-db-verify/
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/include/svn_wc.h
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/status.c
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/update_editor.c
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/special_tests.py
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/svntest/sandbox.py
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/switch_tests.py
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/update_tests.py
subversion/branches/1.9.x-update-tc-detection/subversion/tests/libsvn_wc/op-depth-test.c
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
--- bugtraq:logregex (added)
+++ bugtraq:logregex Tue Feb 24 14:17:03 2015
@@ -0,0 +1,2 @@
+[Ii]ssues?:?(\s*(,|and)?\s*#\d+)+
+(\d+)
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
bugtraq:url = http://subversion.tigris.org/issues/show_bug.cgi?id=%BUGID%
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
--- svn:auto-props (added)
+++ svn:auto-props Tue Feb 24 14:17:03 2015
@@ -0,0 +1,13 @@
+*.c = svn:eol-style=native
+*.cpp = svn:eol-style=native
+*.h = svn:eol-style=native
+*.hpp = svn:eol-style=native
+*.java = svn:eol-style=native
+*.py = svn:eol-style=native
+*.pl = svn:eol-style=native
+*.rb = svn:eol-style=native
+*.sql = svn:eol-style=native
+*.txt = svn:eol-style=native
+README = svn:eol-style=native
+BRANCH-README = svn:eol-style=native
+STATUS = svn:eol-style=native
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Tue Feb 24 14:17:03 2015
@@ -0,0 +1,57 @@
+ChangeLog*
+Makefile
+config.cache
+config.log
+config.nice
+config.status
+configure
+libtool
+.gdb_history
+.swig_checked
+*.orig
+*.rej
+TAGS
+tags
+neon
+build-outputs.mk
+autogen-standalone.mk
+autom4te.cache
+gen-make.opts
+tests.log*
+fails.log*
+db4-win32
+db
+*.o
+*~
+.*~
+apr
+apr-util
+apr-iconv
+Release
+Debug
+ipch
+subversion_msvc.dsw
+subversion_msvc.ncb
+subversion_msvc.opt
+subversion_msvc.plg
+subversion_vcnet.sln
+subversion_vcnet.ncb
+subversion_vcnet.suo
+subversion_vcnet.v11.suo
+subversion_vcnet.sdf
+subversion_vcnet.opensdf
+mkmf.log
+.project
+.classpath
+.cdtproject
+.settings
+.cproject
+zlib
+sqlite-amalgamation
+serf
+gmock-fused
+.git
+.gitignore
+compile_commands.json
+.kdev4
+*.kdev4
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
--- svn:mergeinfo (added)
+++ svn:mergeinfo Tue Feb 24 14:17:03 2015
@@ -0,0 +1,92 @@
+/subversion/branches/1.5.x-r30215:870312
+/subversion/branches/1.7.x-fs-verify:1146708,1161180
+/subversion/branches/10Gb:1388102,1388163-1388190,1388195,1388202,1388205,1388211,1388276,1388362,1388375,1388394,1388636,1388639-1388640,1388643-1388644,1388654,1388720,1388789,1388795,1388801,1388805,1388807,1388810,1388816,1389044,1389276,1389289,1389662,1389867,1390017,1390209,1390216,1390407,1390409,1390414,1390419,1390955
+/subversion/branches/atomic-revprop:965046-1000689
+/subversion/branches/authzperf:1615360
+/subversion/branches/auto-props-sdc:1384106-1401643
+/subversion/branches/bdb-reverse-deltas:872050-872529
+/subversion/branches/cache-server:1458643-1476567
+/subversion/branches/diff-callbacks3:870059-870761
+/subversion/branches/diff-optimizations:1031270-1037352
+/subversion/branches/diff-optimizations-bytes:1037353-1067789
+/subversion/branches/dont-save-plaintext-passwords-by-default:870728-871118
+/subversion/branches/double-delete:870511-872970
+/subversion/branches/dump-load-cross-check:1654853-1657295
+/subversion/branches/ev2-export:1325914,1332738,1413107
+/subversion/branches/explore-wc:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997
+/subversion/branches/file-externals:871779-873302
+/subversion/branches/fs-rep-sharing:869036-873803
+/subversion/branches/fsfs-format7:1426304,1430673,1433848,1438408,1438982,1441129,1442051,1442068,1442504,1442910,1443171,1443803,1444690,1444693,1444695,1445040,1445080,1446103,1451129,1453590,1454307,1460579,1461851,1461865,1462837,1462904,1463120,1467362,1467382,1469487,1471208,1477166,1478055,1481447,1489817,1489949,1490673-1490674,1491784,1493042,1498029,1498103,1498155,1500054,1507729-1507731,1507735-1507736
+/subversion/branches/fsfs-improvements:1499981-1547039
+/subversion/branches/fsfs-lock-many:1571740-1577217
+/subversion/branches/fsfs-pack:873717-874575
+/subversion/branches/fsx:1507845-1509914
+/subversion/branches/fsx-id:1645603-1649011
+/subversion/branches/gnome-keyring:870558-871410
+/subversion/branches/gpg-agent-password-store:1005036-1150766
+/subversion/branches/gtest_addition:1452117-1502138
+/subversion/branches/http-protocol-v2:874395-876041
+/subversion/branches/in-memory-cache:869829-871452
+/subversion/branches/in-repo-authz:1414342-1424779
+/subversion/branches/inheritable-props:1297080-1395089
+/subversion/branches/integrate-cache-item-serialization:1068724-1068739
+/subversion/branches/integrate-cache-membuffer:998649-998852
+/subversion/branches/integrate-compression-level:1068651-1072287
+/subversion/branches/integrate-io-improvements:1068684-1072297
+/subversion/branches/integrate-is-cachable:1072568-1074082
+/subversion/branches/integrate-partial-getter:1072558-1076552
+/subversion/branches/integrate-readline-speedup:1072553-1072555
+/subversion/branches/integrate-stream-api-extensions:1068695-1072516
+/subversion/branches/integrate-string-improvements:1068251-1190617
+/subversion/branches/integrate-txdelta-caching:1072541-1078213
+/subversion/branches/issue-2779-dev:965496-984198
+/subversion/branches/issue-2843-dev:871432-874179
+/subversion/branches/issue-3000:871713,871716-871719,871721-871726,871728,871734
+/subversion/branches/issue-3067-deleted-subtrees:873375-874084
+/subversion/branches/issue-3148-dev:875193-875204
+/subversion/branches/issue-3220-dev:872210-872226
+/subversion/branches/issue-3242-dev:879653-896436
+/subversion/branches/issue-3334-dirs:875156-875867
+/subversion/branches/issue-3975:1152931-1160746
+/subversion/branches/issue-4116-dev:1424719-1425040
+/subversion/branches/issue-4194-dev:1410507-1414880
+/subversion/branches/javahl-ra:991978-1494640
+/subversion/branches/kwallet:870785-871314
+/subversion/branches/log-addressing:1509279-1546844
+/subversion/branches/log-g-performance:870941-871032
+/subversion/branches/merge-skips-obstructions:874525-874615
+/subversion/branches/move-tracking-2:1607334
+/subversion/branches/multi-layer-moves:1239019-1300930
+/subversion/branches/nfc-nfd-aware-client:870276,870376
+/subversion/branches/node_pool:1304828-1305388
+/subversion/branches/performance:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335-1029336,1029339-1029340,1029342,10
29344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365
+/subversion/branches/pin-externals:1643757-1659392
+/subversion/branches/py-tests-as-modules:956579-1033052
+/subversion/branches/ra_serf-digest-authn:875693-876404
+/subversion/branches/reintegrate-improvements:873853-874164
+/subversion/branches/remote-only-status:1581845-1586090
+/subversion/branches/revprop-cache:1298521-1326293
+/subversion/branches/revprop-caching-ng:1620597,1620599
+/subversion/branches/revprop-packing:1143907,1143971,1143997,1144017,1144499,1144568,1146145
+/subversion/branches/subtree-mergeinfo:876734-878766
+/subversion/branches/svn-auth-x509:1603509-1655900
+/subversion/branches/svn-info-detail:1660035-1660413
+/subversion/branches/svn-mergeinfo-enhancements:870119-870195,870197-870288
+/subversion/branches/svn-patch-improvements:918519-934609
+/subversion/branches/svn_mutex:1141683-1182099
+/subversion/branches/svnpatch-diff:865738-876477
+/subversion/branches/svnraisetc:874709-875149
+/subversion/branches/svnserve-logging:869828-870893
+/subversion/branches/tc-issue-3334:874697-874773
+/subversion/branches/tc-merge-notify:874017-874062
+/subversion/branches/tc-resolve:874191-874239
+/subversion/branches/tc_url_rev:874351-874483
+/subversion/branches/tree-conflicts:868291-873154
+/subversion/branches/tree-conflicts-notify:873926-874008
+/subversion/branches/tristate-chunked-request:1502394-1502681
+/subversion/branches/tweak-build-take-two:1424288-1425049,1425051-1425613
+/subversion/branches/uris-as-urls:1060426-1064427
+/subversion/branches/verify-at-commit:1462039-1462408
+/subversion/branches/verify-keep-going:1439280-1546110
+/subversion/branches/wc-collate-path:1402685-1480384
+/subversion/trunk:1660587,1660610,1660633,1660641,1660659,1660671,1660687,1660758,1660874,1660928,1660955,1660961,1661570,1661654,1661664,1661669,1661673,1661695,1661698,1661890
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
tsvn:logwidthmarker = 78
Propchange: subversion/branches/1.9.x-update-tc-detection/
------------------------------------------------------------------------------
webviewer:revision = http://svn.apache.org/r%REVISION%
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/include/svn_wc.h
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/include/svn_wc.h?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
--- subversion/branches/1.9.x-update-tc-detection/subversion/include/svn_wc.h
(original)
+++ subversion/branches/1.9.x-update-tc-detection/subversion/include/svn_wc.h
Tue Feb 24 14:17:03 2015
@@ -3835,6 +3835,13 @@ typedef struct svn_wc_status3_t
* @since New in 1.8. */
svn_boolean_t file_external;
+
+ /** The actual kind of the node in the working copy. May differ from kind
+ * on obstructions, deletes, etc. svn_node_unknown if unavailable.
+ *
+ * @since New in 1.9 */
+ svn_node_kind_t actual_kind;
+
/* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
} svn_wc_status3_t;
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/status.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/status.c?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
--- subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/status.c
(original)
+++ subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/status.c
Tue Feb 24 14:17:03 2015
@@ -378,9 +378,6 @@ assemble_status(svn_wc_status3_t **statu
svn_boolean_t copied = FALSE;
svn_boolean_t conflicted;
const char *moved_from_abspath = NULL;
- svn_filesize_t filesize = (dirent && (dirent->kind == svn_node_file))
- ? dirent->filesize
- : SVN_INVALID_FILESIZE;
/* Defaults for two main variables. */
enum svn_wc_status_kind node_status = svn_wc_status_normal;
@@ -644,7 +641,21 @@ assemble_status(svn_wc_status3_t **statu
stat->kind = svn_node_unknown;
}
stat->depth = info->depth;
- stat->filesize = filesize;
+ if (dirent)
+ {
+ stat->filesize = (dirent->kind == svn_node_file)
+ ? dirent->filesize
+ : SVN_INVALID_FILESIZE;
+ stat->actual_kind = dirent->special ? svn_node_symlink
+ : dirent->kind;
+ }
+ else
+ {
+ stat->filesize = SVN_INVALID_FILESIZE;
+ stat->actual_kind = ignore_text_mods ? svn_node_unknown
+ : svn_node_none;
+ }
+
stat->node_status = node_status;
stat->text_status = text_status;
stat->prop_status = prop_status;
@@ -733,9 +744,20 @@ assemble_unversioned(svn_wc_status3_t **
/*stat->versioned = FALSE;*/
stat->kind = svn_node_unknown; /* not versioned */
stat->depth = svn_depth_unknown;
- stat->filesize = (dirent && dirent->kind == svn_node_file)
- ? dirent->filesize
- : SVN_INVALID_FILESIZE;
+ if (dirent)
+ {
+ stat->actual_kind = dirent->special ? svn_node_symlink
+ : dirent->kind;
+ stat->filesize = (dirent->kind == svn_node_file)
+ ? dirent->filesize
+ : SVN_INVALID_FILESIZE;
+ }
+ else
+ {
+ stat->actual_kind = svn_node_none;
+ stat->filesize = SVN_INVALID_FILESIZE;
+ }
+
stat->node_status = svn_wc_status_none;
stat->text_status = svn_wc_status_none;
stat->prop_status = svn_wc_status_none;
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/update_editor.c?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/update_editor.c
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/libsvn_wc/update_editor.c
Tue Feb 24 14:17:03 2015
@@ -1332,14 +1332,21 @@ modcheck_callback(void *baton,
case svn_wc_status_incomplete:
case svn_wc_status_ignored:
case svn_wc_status_none:
- case svn_wc_status_unversioned:
case svn_wc_status_external:
break;
case svn_wc_status_deleted:
mb->found_mod = TRUE;
+ if (status->actual_kind != svn_node_none
+ && status->actual_kind != svn_node_unknown)
+ {
+ /* The delete is obstructed by something unversioned */
+ mb->found_not_delete = TRUE;
+ return svn_error_create(SVN_ERR_CEASE_INVOCATION, NULL, NULL);
+ }
break;
+ case svn_wc_status_unversioned:
case svn_wc_status_missing:
case svn_wc_status_obstructed:
mb->found_mod = TRUE;
@@ -1554,7 +1561,7 @@ check_tree_conflict(svn_skel_t **pconfli
if (modified)
{
- if (all_mods_are_deletes)
+ if (working_status == svn_wc__db_status_deleted)
reason = svn_wc_conflict_reason_deleted;
else
reason = svn_wc_conflict_reason_edited;
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/special_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/special_tests.py?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/special_tests.py
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/special_tests.py
Tue Feb 24 14:17:03 2015
@@ -612,31 +612,70 @@ def replace_symlink_with_dir(sbox):
# test for issue #1808: svn up deletes local symlink that obstructs
# versioned file
@Issue(1808)
-@SkipUnless(svntest.main.is_posix_os)
def update_obstructing_symlink(sbox):
"symlink obstructs incoming delete"
sbox.build()
wc_dir = sbox.wc_dir
- mu_path = os.path.join(wc_dir, 'A', 'mu')
- mu_url = sbox.repo_url + '/A/mu'
- iota_path = os.path.join(wc_dir, 'iota')
-
- # delete A/mu and replace it with a symlink
- svntest.main.run_svn(None, 'rm', mu_path)
- os.symlink(iota_path, mu_path)
+ mu_path = sbox.ospath('A/mu')
- svntest.main.run_svn(None, 'rm', mu_url,
- '-m', 'log msg')
+ iota_abspath = os.path.abspath(sbox.ospath('iota'))
- svntest.main.run_svn(None,
- 'up', wc_dir)
+ # delete mu and replace it with an (not-added) symlink
+ sbox.simple_rm('A/mu')
+ sbox.simple_symlink(iota_abspath, 'A/mu')
+
+ # delete pi and replace it with an added symlink
+ sbox.simple_rm('A/D/G/pi')
+ sbox.simple_add_symlink(iota_abspath, 'A/D/G/pi')
+
+ if not os.path.exists(mu_path):
+ raise svntest.Failure("mu should be there")
+
+ # Now remove mu and pi in the repository
+ svntest.main.run_svn(None, 'rm', '-m', 'log msg',
+ sbox.repo_url + '/A/mu',
+ sbox.repo_url + '/A/D/G/pi')
+
+ # We expect tree conflicts
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/mu': Item(status=' ', treeconflict='C'),
+ 'A/D/G/pi': Item(status=' ', treeconflict='C')
+ })
+
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.tweak('A/mu', status='? ', treeconflict='C',
+ wc_rev=None)
+
+ expected_status.tweak('A/D/G/pi', status='A ',treeconflict='C',
+ wc_rev='-')
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, None,
+ expected_status)
+
+ expected_info = [
+ {
+ 'Path': re.escape(sbox.ospath('A/D/G/pi')),
+ 'Tree conflict': 'local file replace, incoming file delete or move.*'
+ },
+ {
+ 'Path': re.escape(sbox.ospath('A/mu')),
+ 'Tree conflict': 'local file delete, incoming file delete or move.*'
+ }
+ ]
+
+ svntest.actions.run_and_verify_info(expected_info,
+ sbox.ospath('A/D/G/pi'),
+ sbox.ospath('A/mu'))
# check that the symlink is still there
- target = os.readlink(mu_path)
- if target != iota_path:
- raise svntest.Failure
-
+ if not os.path.exists(mu_path):
+ raise svntest.Failure("mu should be there")
+ if svntest.main.is_posix_os():
+ target = os.readlink(mu_path)
+ if target != iota_abspath:
+ raise svntest.Failure("mu no longer points to the same location")
def warn_on_reserved_name(sbox):
"warn when attempt operation on a reserved name"
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/svntest/sandbox.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/svntest/sandbox.py?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/svntest/sandbox.py
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/svntest/sandbox.py
Tue Feb 24 14:17:03 2015
@@ -381,15 +381,18 @@ class Sandbox:
raise Exception("Unexpected line '" + line + "' in proplist output" +
str(out))
return props
- def simple_add_symlink(self, dest, target):
- """Create a symlink TARGET pointing to DEST and add it to subversion"""
+ def simple_symlink(self, dest, target):
+ """Create a symlink TARGET pointing to DEST"""
if svntest.main.is_posix_os():
os.symlink(dest, self.ospath(target))
else:
svntest.main.file_write(self.ospath(target), "link %s" % dest)
+
+ def simple_add_symlink(self, dest, target, add=True):
+ """Create a symlink TARGET pointing to DEST and add it to subversion"""
+ self.simple_symlink(dest, target)
self.simple_add(target)
- if not svntest.main.is_posix_os():
- # '*' is evaluated on Windows
+ if not svntest.main.is_posix_os(): # '*' is evaluated on Windows
self.simple_propset('svn:special', 'X', target)
def simple_add_text(self, text, *targets):
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/switch_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/switch_tests.py?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/switch_tests.py
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/switch_tests.py
Tue Feb 24 14:17:03 2015
@@ -2048,7 +2048,7 @@ def tolerate_local_mods(sbox):
svntest.main.file_write(LM_path, 'Locally modified file.\n', 'w+')
expected_output = svntest.wc.State(wc_dir, {
- 'A/L' : Item(status='D '),
+ 'A/L' : Item(status=' ', treeconflict='C'),
})
expected_disk = svntest.main.greek_state.copy()
@@ -2060,6 +2060,9 @@ def tolerate_local_mods(sbox):
expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
expected_status.tweak('', 'iota', wc_rev=1)
expected_status.tweak('A', switched='S')
+ expected_status.add({
+ 'A/L' : Item(status='A ', copied='+', treeconflict='C', wc_rev='-')
+ })
# Used to fail with locally modified or unversioned files
svntest.actions.run_and_verify_switch(wc_dir, A_path, A2_url,
@@ -2391,12 +2394,12 @@ def tree_conflicts_on_switch_2_2(sbox):
expected_output = deep_trees_conflict_output
expected_disk = svntest.wc.State('', {
+ 'DDF/D1/D2' : Item(),
'F' : Item(),
'D' : Item(),
- 'DF' : Item(),
- 'DD' : Item(),
- 'DDF' : Item(),
- 'DDD' : Item(),
+ 'DF/D1' : Item(),
+ 'DD/D1' : Item(),
+ 'DDD/D1/D2' : Item(),
})
expected_status = svntest.deeptrees.deep_trees_virginal_state.copy()
@@ -2408,20 +2411,16 @@ def tree_conflicts_on_switch_2_2(sbox):
# Expect the incoming tree deletes and the local leaf deletes to mean
# that all deleted paths are *really* gone, not simply scheduled for
# deletion.
- expected_status.tweak('F/alpha',
- 'D/D1',
- 'DD/D1',
- 'DF/D1',
- 'DDD/D1',
- 'DDF/D1',
+ expected_status.tweak('DD/D1', 'DF/D1', 'DDF/D1', 'DDD/D1',
+ status='A ', copied='+', treeconflict='C',
+ wc_rev='-')
+ expected_status.tweak('DDF/D1/D2', 'DDD/D1/D2',
+ copied='+', wc_rev='-')
+ expected_status.tweak('DD/D1/D2', 'DF/D1/beta', 'DDD/D1/D2/D3',
+ 'DDF/D1/D2/gamma',
+ status='D ', copied='+', wc_rev='-')
+ expected_status.tweak('F/alpha', 'D/D1',
status='! ', treeconflict='C', wc_rev=None)
- # Remove from expected status and disk everything below the deleted paths.
- expected_status.remove('DD/D1/D2',
- 'DF/D1/beta',
- 'DDD/D1/D2',
- 'DDD/D1/D2/D3',
- 'DDF/D1/D2',
- 'DDF/D1/D2/gamma',)
expected_info = {
'F/alpha' : {
@@ -2432,13 +2431,13 @@ def tree_conflicts_on_switch_2_2(sbox):
},
'DF/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon switch'
+ '^local dir edit, incoming dir delete or move upon switch'
+ ' Source left: .dir.*/DF/D1@2'
+ ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon switch'
+ '^local dir edit, incoming dir delete or move upon switch'
+ ' Source left: .dir.*/DDF/D1@2'
+ ' Source right: .none.*(/DDF/D1@3)?$',
},
@@ -2450,13 +2449,13 @@ def tree_conflicts_on_switch_2_2(sbox):
},
'DD/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon switch'
+ '^local dir edit, incoming dir delete or move upon switch'
+ ' Source left: .dir.*/DD/D1@2'
+ ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon switch'
+ '^local dir edit, incoming dir delete or move upon switch'
+ ' Source left: .dir.*/DDD/D1@2'
+ ' Source right: .none.*(/DDD/D1@3)?$',
},
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/update_tests.py
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/update_tests.py?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/update_tests.py
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/tests/cmdline/update_tests.py
Tue Feb 24 14:17:03 2015
@@ -4386,12 +4386,12 @@ def tree_conflicts_on_update_2_2(sbox):
expected_output = deep_trees_conflict_output
expected_disk = svntest.wc.State('', {
+ 'DDF/D1/D2' : Item(),
'F' : Item(),
'D' : Item(),
- 'DF' : Item(),
- 'DD' : Item(),
- 'DDF' : Item(),
- 'DDD' : Item(),
+ 'DF/D1' : Item(),
+ 'DD/D1' : Item(),
+ 'DDD/D1/D2' : Item(),
})
expected_status = svntest.deeptrees.deep_trees_virginal_state.copy()
@@ -4410,20 +4410,16 @@ def tree_conflicts_on_update_2_2(sbox):
# Expect the incoming tree deletes and the local leaf deletes to mean
# that all deleted paths are *really* gone, not simply scheduled for
# deletion.
- expected_status.tweak('F/alpha',
- 'D/D1',
- 'DD/D1',
- 'DF/D1',
- 'DDD/D1',
- 'DDF/D1',
- status='! ', wc_rev=None)
- # Remove from expected status and disk everything below the deleted paths.
- expected_status.remove('DD/D1/D2',
- 'DF/D1/beta',
- 'DDD/D1/D2',
- 'DDD/D1/D2/D3',
- 'DDF/D1/D2',
- 'DDF/D1/D2/gamma',)
+ expected_status.tweak('DD/D1', 'DF/D1', 'DDF/D1', 'DDD/D1',
+ status='A ', copied='+', treeconflict='C',
+ wc_rev='-')
+ expected_status.tweak('DDF/D1/D2', 'DDD/D1/D2',
+ copied='+', wc_rev='-')
+ expected_status.tweak('DD/D1/D2', 'DF/D1/beta', 'DDD/D1/D2/D3',
+ 'DDF/D1/D2/gamma',
+ status='D ', copied='+', wc_rev='-')
+ expected_status.tweak('F/alpha', 'D/D1',
+ status='! ', treeconflict='C', wc_rev=None)
expected_info = {
'F/alpha' : {
@@ -4434,13 +4430,13 @@ def tree_conflicts_on_update_2_2(sbox):
},
'DF/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon update'
+ '^local dir edit, incoming dir delete or move upon update'
+ ' Source left: .dir.*/DF/D1@2'
+ ' Source right: .none.*(/DF/D1@3)?$',
},
'DDF/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon update'
+ '^local dir edit, incoming dir delete or move upon update'
+ ' Source left: .dir.*/DDF/D1@2'
+ ' Source right: .none.*(/DDF/D1@3)?$',
},
@@ -4452,13 +4448,13 @@ def tree_conflicts_on_update_2_2(sbox):
},
'DD/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon update'
+ '^local dir edit, incoming dir delete or move upon update'
+ ' Source left: .dir.*/DD/D1@2'
+ ' Source right: .none.*(/DD/D1@3)?$',
},
'DDD/D1' : {
'Tree conflict' :
- '^local dir delete, incoming dir delete or move upon update'
+ '^local dir edit, incoming dir delete or move upon update'
+ ' Source left: .dir.*/DDD/D1@2'
+ ' Source right: .none.*(/DDD/D1@3)?$',
},
Modified:
subversion/branches/1.9.x-update-tc-detection/subversion/tests/libsvn_wc/op-depth-test.c
URL:
http://svn.apache.org/viewvc/subversion/branches/1.9.x-update-tc-detection/subversion/tests/libsvn_wc/op-depth-test.c?rev=1661956&r1=1661955&r2=1661956&view=diff
==============================================================================
---
subversion/branches/1.9.x-update-tc-detection/subversion/tests/libsvn_wc/op-depth-test.c
(original)
+++
subversion/branches/1.9.x-update-tc-detection/subversion/tests/libsvn_wc/op-depth-test.c
Tue Feb 24 14:17:03 2015
@@ -3732,6 +3732,8 @@ incomplete_switch(const svn_test_opts_t
};
SVN_ERR(insert_dirs(&b, before));
+ SVN_ERR(svn_io_remove_dir2(sbox_wc_path(&b, "A/B/C/D"), FALSE,
+ NULL, NULL, pool));
SVN_ERR(check_db_rows(&b, "", before));
SVN_ERR(sbox_wc_update(&b, "", 4));
SVN_ERR(check_db_rows(&b, "", after_update));
@@ -7167,9 +7169,21 @@ move_away_delete_update(const svn_test_o
{0, "P", "normal", 2, "P"},
{1, "C2", "normal", 1, "A/B/C"},
{1, "Q2", "normal", 1, "P/Q"},
+
+ {2, "A/B", "normal", 1, "A/B"},
+ {2, "A/B/C", "normal", 1, "A/B/C"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "C2"},
+ {0}
+ };
+ conflict_info_t conflicts[] = {
+ {"A/B", FALSE, FALSE, {svn_wc_conflict_action_delete,
+ svn_wc_conflict_reason_edited}},
+ {"P/Q", FALSE, FALSE, {svn_wc_conflict_action_delete,
+ svn_wc_conflict_reason_moved_away, "P/Q"}},
{0}
};
SVN_ERR(check_db_rows(&b, "", nodes));
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
}
return SVN_NO_ERROR;
@@ -8611,36 +8625,46 @@ move_update_parent_replace(const svn_tes
SVN_ERR(sbox_wc_update(&b, "", 2));
{
nodes_row_t nodes[] = {
- {0, "", "normal", 2, ""},
- {0, "A", "normal", 2, "A"},
- {0, "A/B", "normal", 2, "A/B"},
- {2, "A/C", "normal", 1, "A/B/C"},
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+
+ {2, "A/C", "normal", 1, "A/B/C"},
+
+ {2, "A/B", "normal", 1, "A/B"},
+ {2, "A/B/C", "normal", 1, "A/B/C"},
+
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "A/C"},
+
{0}
};
- actual_row_t actual[] = {
- {"A/B", NULL},
+ conflict_info_t conflicts[] = {
+ {"A/B", FALSE, FALSE, {svn_wc_conflict_action_replace,
+ svn_wc_conflict_reason_edited}},
{0}
};
SVN_ERR(check_db_rows(&b, "", nodes));
- SVN_ERR(check_db_actual(&b, actual));
+ SVN_ERR(check_db_conflicts(&b, "", conflicts));
}
SVN_ERR(sbox_wc_resolve(&b, "A/B", svn_depth_infinity,
- svn_wc_conflict_choose_mine_conflict));
+ svn_wc_conflict_choose_merged));
{
nodes_row_t nodes[] = {
- {0, "", "normal", 2, ""},
- {0, "A", "normal", 2, "A"},
- {0, "A/B", "normal", 2, "A/B"},
- {2, "A/C", "normal", 1, "A/B/C"},
- {0}
- };
- actual_row_t actual[] = {
+ {0, "", "normal", 2, ""},
+ {0, "A", "normal", 2, "A"},
+ {0, "A/B", "normal", 2, "A/B"},
+ {2, "A/C", "normal", 1, "A/B/C"},
+ {2, "A/B", "normal", 1, "A/B"},
+ {2, "A/B/C", "normal", 1, "A/B/C"},
+ {3, "A/B/C", "base-deleted", NO_COPY_FROM, "A/C"},
+
{0}
};
+
SVN_ERR(check_db_rows(&b, "", nodes));
- SVN_ERR(check_db_actual(&b, actual));
+ SVN_ERR(check_db_conflicts(&b, "", NULL));
}
return SVN_NO_ERROR;