550
533
svntest.actions.run_and_verify_status(wc_dir, expected_status)
552
535
# These should produce an error
553
svntest.actions.run_and_verify_svn('Illegal target',
554
None, svntest.verify.AnyOutput,
536
svntest.actions.run_and_verify_svn(None, svntest.verify.AnyOutput,
555
537
'propset', 'svn:executable', 'on', A_path)
557
svntest.actions.run_and_verify_svn('Illegal target', None,
539
svntest.actions.run_and_verify_svn(None,
558
540
svntest.verify.AnyOutput, 'propset',
559
541
'svn:keywords', 'LastChangedDate',
562
svntest.actions.run_and_verify_svn('Illegal target', None,
544
svntest.actions.run_and_verify_svn(None,
563
545
svntest.verify.AnyOutput, 'propset',
564
546
'svn:eol-style', 'native', A_path)
566
svntest.actions.run_and_verify_svn('Invalid svn:eol-style', None,
548
svntest.actions.run_and_verify_svn(None,
567
549
svntest.verify.AnyOutput, 'propset',
568
550
'svn:eol-style', 'invalid value',
569
551
os.path.join(A_path, 'mu'))
571
svntest.actions.run_and_verify_svn('Illegal target', None,
553
svntest.actions.run_and_verify_svn(None,
572
554
svntest.verify.AnyOutput, 'propset',
573
555
'svn:mime-type', 'image/png', A_path)
575
svntest.actions.run_and_verify_svn('Illegal target', None,
557
svntest.actions.run_and_verify_svn(None,
576
558
svntest.verify.AnyOutput, 'propset',
577
559
'svn:ignore', '*.o', iota_path)
579
svntest.actions.run_and_verify_svn('Illegal target', None,
561
svntest.actions.run_and_verify_svn(None,
580
562
svntest.verify.AnyOutput, 'propset',
582
564
'foo http://host.com/repos', iota_path)
584
svntest.actions.run_and_verify_svn('Illegal target', None,
566
svntest.actions.run_and_verify_svn(None,
585
567
svntest.verify.AnyOutput, 'propset',
586
568
'svn:author', 'socrates', iota_path)
588
svntest.actions.run_and_verify_svn('Illegal target', None,
570
svntest.actions.run_and_verify_svn(None,
589
571
svntest.verify.AnyOutput, 'propset',
590
572
'svn:log', 'log message', iota_path)
592
svntest.actions.run_and_verify_svn('Illegal target', None,
574
svntest.actions.run_and_verify_svn(None,
593
575
svntest.verify.AnyOutput, 'propset',
594
576
'svn:date', 'Tue Jan 19 04:14:07 2038',
597
svntest.actions.run_and_verify_svn('Illegal target', None,
579
svntest.actions.run_and_verify_svn(None,
598
580
svntest.verify.AnyOutput, 'propset',
599
581
'svn:original-date',
600
582
'Thu Jan 1 01:00:00 1970', iota_path)
658
640
path = sbox.ospath('binary')
659
641
svntest.main.file_append(path, "binary")
660
svntest.actions.run_and_verify_svn(None, None, [],
642
svntest.actions.run_and_verify_svn(None, [],
661
643
'propset', '--force',
662
644
'svn:eol-style', 'CRLF',
665
647
path = sbox.ospath('multi-eol')
666
svntest.actions.run_and_verify_svn(None, None, [],
648
svntest.actions.run_and_verify_svn(None, [],
667
649
'propset', '--force',
668
650
'svn:eol-style', 'LF',
671
653
path = sbox.ospath('backwards-eol')
672
svntest.actions.run_and_verify_svn(None, None, [],
654
svntest.actions.run_and_verify_svn(None, [],
673
655
'propset', '--force',
674
656
'svn:eol-style', 'native',
677
659
path = sbox.ospath('incomplete-eol')
678
svntest.actions.run_and_verify_svn(None, None, [],
660
svntest.actions.run_and_verify_svn(None, [],
679
661
'propset', '--force',
680
662
'svn:eol-style', 'CR',
715
697
# ...contain revision ranges with start revisions greater than or
716
698
# equal to end revisions.
717
svntest.actions.run_and_verify_svn('range start >= range end', None,
699
svntest.actions.run_and_verify_svn(None,
718
700
"svn: E200020: Unable to parse reversed "
719
701
"revision range '20-5'\n",
720
702
'propset', SVN_PROP_MERGEINFO,
721
703
'/featureX:4,20-5', path)
723
705
# ...contain paths mapped to empty revision ranges
724
svntest.actions.run_and_verify_svn('empty ranges', None,
706
svntest.actions.run_and_verify_svn(None,
725
707
"svn: E200020: Mergeinfo for '/trunk' maps to "
726
708
"an empty revision range\n",
727
709
'propset', SVN_PROP_MERGEINFO,
730
712
# ...contain non-inheritable ranges when the target is a file.
731
svntest.actions.run_and_verify_svn('empty ranges', None,
713
svntest.actions.run_and_verify_svn(None,
732
714
"svn: E200020: Cannot set non-inheritable "
733
715
"mergeinfo on a non-directory*",
734
716
'propset', SVN_PROP_MERGEINFO,
808
790
# non-Posix platforms, we won't have to skip here:
809
791
@Skip(is_non_posix_and_non_windows_os)
811
@XFail(svntest.main.is_ra_type_dav)
812
793
def revprop_change(sbox):
813
794
"set, get, and delete a revprop change"
817
798
# First test the error when no revprop-change hook exists.
818
svntest.actions.run_and_verify_svn(None, None, '.*pre-revprop-change',
799
svntest.actions.run_and_verify_svn(None, '.*pre-revprop-change',
819
800
'propset', '--revprop', '-r', '0',
820
801
'cash-sound', 'cha-ching!', sbox.wc_dir)
822
803
# Now test error output from revprop-change hook.
823
804
svntest.actions.disable_revprop_changes(sbox.repo_dir)
824
svntest.actions.run_and_verify_svn(None, None, '.*pre-revprop-change.* 0 jrandom cash-sound A',
805
svntest.actions.run_and_verify_svn(None, '.*pre-revprop-change.* 0 jrandom cash-sound A',
825
806
'propset', '--revprop', '-r', '0',
826
807
'cash-sound', 'cha-ching!', sbox.wc_dir)
828
809
# Create the revprop-change hook for this test
829
810
svntest.actions.enable_revprop_changes(sbox.repo_dir)
831
svntest.actions.run_and_verify_svn(None, None, [],
812
svntest.actions.run_and_verify_svn(None, [],
832
813
'propset', '--revprop', '-r', '0',
833
814
'cash-sound', 'cha-ching!', sbox.wc_dir)
835
svntest.actions.run_and_verify_svn(None, None, [],
816
svntest.actions.run_and_verify_svn(None, [],
836
817
'propget', '--revprop', '-r', '0',
837
818
'cash-sound', sbox.wc_dir)
839
820
# Now test that blocking the revprop delete.
840
821
svntest.actions.disable_revprop_changes(sbox.repo_dir)
841
svntest.actions.run_and_verify_svn(None, None, '.*pre-revprop-change.* 0 jrandom cash-sound D',
822
svntest.actions.run_and_verify_svn(None, '.*pre-revprop-change.* 0 jrandom cash-sound D',
842
823
'propdel', '--revprop', '-r', '0',
843
824
'cash-sound', sbox.wc_dir)
845
826
# Now test actually deleting the revprop.
846
827
svntest.actions.enable_revprop_changes(sbox.repo_dir)
847
svntest.actions.run_and_verify_svn(None, None, [],
828
svntest.actions.run_and_verify_svn(None, [],
848
829
'propdel', '--revprop', '-r', '0',
849
830
'cash-sound', sbox.wc_dir)
851
actual_exit, actual_stdout, actual_stderr = svntest.main.run_svn(
852
None, 'pg', '--revprop', '-r', '0', 'cash-sound', sbox.wc_dir)
854
832
# The property should have been deleted.
856
for line in actual_stdout:
857
if re.match(regex, line):
858
raise svntest.Failure
833
svntest.actions.run_and_verify_svn(None,
834
'.*(E195011|E200017).*cash-sound.*',
835
'propget', '--revprop', '-r', '0', 'cash-sound', sbox.wc_dir)
861
838
#----------------------------------------------------------------------
1197
1171
'propedit', prop1, '-m', 'editlog', iota_url)
1198
1172
svntest.main.run_svn(None,
1199
1173
'propedit', prop1, '-m', 'editlog', A_url)
1200
svntest.actions.run_and_verify_svn(None, [ propval1 + '\n' ], [],
1174
svntest.actions.run_and_verify_svn([ propval1 + '\n' ], [],
1201
1175
'propget', prop1, iota_url)
1202
svntest.actions.run_and_verify_svn(None, [ propval1 + '\n' ], [],
1176
svntest.actions.run_and_verify_svn([ propval1 + '\n' ], [],
1203
1177
'propget', prop1, A_url)
1205
1179
# Edit without actually changing the property
1206
1180
svntest.main.use_editor('identity')
1207
svntest.actions.run_and_verify_svn(None,
1208
"No changes to property '%s' on '.*'"
1181
svntest.actions.run_and_verify_svn("No changes to property '%s' on '.*'"
1211
1184
'propedit', prop1, '-m', 'nocommit',
1233
1206
# create new fs file
1234
1207
open(newfile_path, 'w').close()
1235
1208
# Add it and set a property
1236
svntest.actions.run_and_verify_svn(None, file_add_output, [], 'add', newfile_path)
1237
svntest.actions.run_and_verify_svn(None, propset_output, [], 'propset',
1209
svntest.actions.run_and_verify_svn(file_add_output, [], 'add', newfile_path)
1210
svntest.actions.run_and_verify_svn(propset_output, [], 'propset',
1238
1211
'newprop', 'newvalue', newfile_path)
1239
svntest.actions.run_and_verify_svn(None, propls_output, [],
1212
svntest.actions.run_and_verify_svn(propls_output, [],
1240
1213
'proplist', '-v', newfile_path)
1241
1214
# remove the file
1242
svntest.actions.run_and_verify_svn(None, file_rm_output, [],
1215
svntest.actions.run_and_verify_svn(file_rm_output, [],
1243
1216
'rm', '--force', newfile_path)
1244
1217
# recreate the file and add it again
1245
1218
open(newfile_path, 'w').close()
1246
svntest.actions.run_and_verify_svn(None, file_add_output, [], 'add', newfile_path)
1219
svntest.actions.run_and_verify_svn(file_add_output, [], 'add', newfile_path)
1248
1221
# Now there should be NO properties leftover...
1249
svntest.actions.run_and_verify_svn(None, [], [],
1222
svntest.actions.run_and_verify_svn([], [],
1250
1223
'proplist', '-v', newfile_path)
1252
1225
#----------------------------------------------------------------------
1450
1422
expected_stdout = (".*Attempting to delete nonexistent property "
1451
1423
"'%s'.*" % (propname,))
1452
svntest.actions.run_and_verify_svn(None, expected_stdout, [],
1424
svntest.actions.run_and_verify_svn(expected_stdout, [],
1453
1425
'propdel', propname)
1454
1426
expected_stderr = (".*'%s' is not a valid Subversion"
1455
1427
' property name' % (propname,))
1456
svntest.actions.run_and_verify_svn(None, None, expected_stderr,
1428
svntest.actions.run_and_verify_svn(None, expected_stderr,
1457
1429
'propedit', propname)
1458
svntest.actions.run_and_verify_svn(None, None, expected_stderr,
1430
svntest.actions.run_and_verify_svn(None, expected_stderr,
1459
1431
'propget', propname)
1460
svntest.actions.run_and_verify_svn(None, None, expected_stderr,
1432
svntest.actions.run_and_verify_svn(None, expected_stderr,
1461
1433
'propset', propname, propval)
1463
svntest.actions.run_and_verify_svn(None, None, expected_stderr,
1435
svntest.actions.run_and_verify_svn(None, expected_stderr,
1464
1436
'commit', '--with-revprop',
1465
1437
'='.join([propname, propval]))
1466
1438
# Now swap them: --with-revprop should accept propname as a property
1467
1439
# value; no concept of validity there.
1468
svntest.actions.run_and_verify_svn(None, [], [],
1440
svntest.actions.run_and_verify_svn([], [],
1469
1441
'commit', '--with-revprop',
1470
1442
'='.join([propval, propname]))
1486
1458
saved_cwd = os.getcwd()
1487
1459
os.chdir(sbox.wc_dir)
1489
svntest.actions.run_and_verify_svn(None, None, [], 'mkdir', 'newdir')
1461
svntest.actions.run_and_verify_svn(None, [], 'mkdir', 'newdir')
1490
1462
os.symlink('newdir', 'symlink')
1491
svntest.actions.run_and_verify_svn(None, None, [], 'add', 'symlink')
1463
svntest.actions.run_and_verify_svn(None, [], 'add', 'symlink')
1492
1464
old_mode = os.stat('newdir')[stat.ST_MODE]
1493
1465
# The only property on 'symlink' is svn:special, so attempting to remove
1494
1466
# 'svn:executable' should result in an error
1495
1467
expected_stdout = (".*Attempting to delete nonexistent property "
1496
1468
"'svn:executable'.*")
1497
svntest.actions.run_and_verify_svn(None, expected_stdout, [], 'propdel',
1469
svntest.actions.run_and_verify_svn(expected_stdout, [], 'propdel',
1498
1470
'svn:executable', 'symlink')
1499
1471
new_mode = os.stat('newdir')[stat.ST_MODE]
1500
1472
if not old_mode == new_mode:
1740
1711
svntest.actions.create_failing_hook(repo_dir, 'post-revprop-change',
1743
# serf/neon/mod_dav_svn give SVN_ERR_RA_DAV_REQUEST_FAILED
1714
# serf/mod_dav_svn give SVN_ERR_RA_DAV_PROPPATCH_FAILED
1744
1715
# file/svn give SVN_ERR_REPOS_HOOK_FAILURE
1745
expected_error = 'svn: (E175002|E165001).*post-revprop-change hook failed'
1716
expected_error = 'svn: (E175008|E165001).*post-revprop-change hook failed'
1747
svntest.actions.run_and_verify_svn(None, [], expected_error,
1718
svntest.actions.run_and_verify_svn([], expected_error,
1748
1719
'ps', '--revprop', '-r0', 'p', 'v',
1751
1722
# Verify change has stuck -- at one time mod_dav_svn would rollback
1752
1723
# revprop changes on post-revprop-change hook errors
1753
svntest.actions.run_and_verify_svn(None, 'v', [],
1724
svntest.actions.run_and_verify_svn('v', [],
1754
1725
'pg', '--revprop', '-r0', 'p',
1893
1865
"Trying to delete property 'del.edit'\n"
1894
1866
"but the local property value is different.\n"
1895
1867
"<<<<<<< (local property value)\n"
1896
"local.changed=======\n"
1897
">>>>>>> (incoming property value)\n",
1868
"local.changed||||||| (incoming 'changed from' value)\n"
1870
">>>>>>> (incoming 'changed to' value)\n",
1899
1872
"Trying to change property 'edit.del'\n"
1900
1873
"but the property has been locally deleted.\n"
1901
1874
"<<<<<<< (local property value)\n"
1903
"repos.changed>>>>>>> (incoming property value)\n",
1875
"||||||| (incoming 'changed from' value)\n"
1877
"repos.changed>>>>>>> (incoming 'changed to' value)\n",
1905
1879
"Trying to change property 'edit.edit'\n"
1906
1880
"but the property has already been locally changed to a different value.\n"
1907
1881
"<<<<<<< (local property value)\n"
1908
"local.changed=======\n"
1909
"repos.changed>>>>>>> (incoming property value)\n",
1882
"local.changed||||||| (incoming 'changed from' value)\n"
1884
"repos.changed>>>>>>> (incoming 'changed to' value)\n",
1911
1886
"Trying to delete property 'del.edit2'\n"
1912
1887
"but the property has been locally modified.\n"
1913
1888
"<<<<<<< (local property value)\n"
1914
"repos.changed=======\n"
1915
">>>>>>> (incoming property value)\n",
1889
"repos.changed||||||| (incoming 'changed from' value)\n"
1891
">>>>>>> (incoming 'changed to' value)\n",
1917
1893
"Trying to delete property 'del.add'\n"
1918
1894
"but the property has been locally added.\n"
1919
1895
"<<<<<<< (local property value)\n"
1921
">>>>>>> (incoming property value)\n",
1896
"local||||||| (incoming 'changed from' value)\n"
1898
">>>>>>> (incoming 'changed to' value)\n",
1923
1900
"Trying to delete property 'del.diff'\n"
1924
1901
"but the local property value is different.\n"
1925
1902
"<<<<<<< (local property value)\n"
1927
">>>>>>> (incoming property value)\n",
1903
"local||||||| (incoming 'changed from' value)\n"
1905
">>>>>>> (incoming 'changed to' value)\n",
1929
1907
"Trying to change property 'edit.add'\n"
1930
1908
"but the property has been locally added with a different value.\n"
1931
1909
"<<<<<<< (local property value)\n"
1933
"repos.changed>>>>>>> (incoming property value)\n",
1910
"local||||||| (incoming 'changed from' value)\n"
1912
"repos.changed>>>>>>> (incoming 'changed to' value)\n",
1935
1914
"Trying to change property 'edit.diff'\n"
1936
1915
"but the local property value conflicts with the incoming change.\n"
1937
1916
"<<<<<<< (local property value)\n"
1939
"repos.changed>>>>>>> (incoming property value)\n",
1917
"local||||||| (incoming 'changed from' value)\n"
1919
"repos.changed>>>>>>> (incoming 'changed to' value)\n",
1941
1921
"Trying to add new property 'add.add'\n"
1942
1922
"but the property already exists.\n"
1943
1923
"<<<<<<< (local property value)\n"
1945
"repos>>>>>>> (incoming property value)\n",
1924
"local||||||| (incoming 'changed from' value)\n"
1926
"repos>>>>>>> (incoming 'changed to' value)\n",
1947
1928
"Trying to add new property 'add.diff'\n"
1948
1929
"but the property already exists.\n"
1949
"Local property value:\n"
1930
"<<<<<<< (local property value)\n"
1931
"local||||||| (incoming 'changed from' value)\n"
1933
"repos>>>>>>> (incoming 'changed to' value)\n",
1935
"Trying to add new property 'add.del'\n"
1936
"but the property has been locally deleted.\n"
1951
1937
"Incoming property value:\n"
1954
"Trying to add new property 'add.del'\n"
1955
"but the property has been locally deleted.\n"
1956
"<<<<<<< (local property value)\n"
1958
"repos>>>>>>> (incoming property value)\n",
1960
1940
"Trying to add new property 'add.edit'\n"
1961
1941
"but the property already exists.\n"
1962
1942
"<<<<<<< (local property value)\n"
1963
"local.changed=======\n"
1964
"repos>>>>>>> (incoming property value)\n",
1943
"local.changed||||||| (incoming 'changed from' value)\n"
1945
"repos>>>>>>> (incoming 'changed to' value)\n",
1967
1948
# Get the contents of mu.prej. The error messages are in the prej file
2247
2228
# Set the 'big' mergeinfo prop on A/B, A/C, and A/D.
2248
2229
svntest.main.file_write(prop_val_file, big_prop_val)
2250
svntest.actions.run_and_verify_svn(None, None, [], 'propset',
2231
svntest.actions.run_and_verify_svn(None, [], 'propset',
2251
2232
SVN_PROP_MERGEINFO, '-F', prop_val_file,
2253
svntest.actions.run_and_verify_svn(None, None, [], 'propset',
2234
svntest.actions.run_and_verify_svn(None, [], 'propset',
2254
2235
SVN_PROP_MERGEINFO, '-F', prop_val_file,
2256
svntest.actions.run_and_verify_svn(None, None, [], 'propset',
2237
svntest.actions.run_and_verify_svn(None, [], 'propset',
2257
2238
SVN_PROP_MERGEINFO, '-F', prop_val_file,
2259
svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m',
2240
svntest.actions.run_and_verify_svn(None, [], 'ci', '-m',
2260
2241
'ps some large svn:mergeinfos', wc_dir)
2262
2243
# Run propget -vR svn:mergeinfo, redirecting the stdout to a file.
2344
2325
expected_status.tweak(wc_rev=2)
2345
2326
expected_status.tweak('A', 'A/dir_conflicts', status=' C')
2328
# Conflict: BASE=val2 WORKING=val3 INCOMING_OLD=val2 INCOMING_NEW=val1
2347
2329
extra_files = ['dir_conflicts.prej', 'dir_conflicts.2.prej']
2348
2330
svntest.actions.run_and_verify_update(wc_dir,
2349
2331
expected_output,
2351
2333
expected_status,
2353
svntest.tree.detect_conflict_files,
2355
None, None, True, '-r', '2', wc_dir)
2356
if len(extra_files) != 0:
2357
logger.warn("didn't get expected conflict files")
2358
raise svntest.verify.SVNUnexpectedOutput
2336
extra_files=extra_files)
2360
2338
# Revert and update to check that conflict files are removed
2361
svntest.actions.run_and_verify_svn(None, None, [], 'revert', '-R', wc_dir)
2339
svntest.actions.run_and_verify_svn(None, [], 'revert', '-R', wc_dir)
2362
2340
expected_status.tweak('A', 'A/dir_conflicts', status=' ')
2363
2341
svntest.actions.run_and_verify_status(wc_dir, expected_status)
2608
2585
svntest.actions.set_prop('ordinal', 'ninth\n', sbox.ospath('iota'))
2609
2586
sbox.simple_commit(message='r2')
2610
2587
svntest.actions.set_prop('cardinal', 'nine\n', sbox.ospath('iota'))
2611
svntest.actions.run_and_verify_svn(None, ['ninth\n'], [],
2612
'propget', '--strict', 'ordinal',
2588
svntest.actions.run_and_verify_svn(['ninth\n'], [],
2589
'propget', '--no-newline', 'ordinal',
2613
2590
sbox.ospath('iota') + '@BASE')
2593
def xml_unsafe_author(sbox):
2594
"svn:author with XML unsafe chars"
2597
wc_dir = sbox.wc_dir
2599
svntest.actions.enable_revprop_changes(sbox.repo_dir)
2601
# client sends svn:author (via PROPPATCH for DAV)
2602
svntest.actions.run_and_verify_svn(None, [],
2603
'propset', '--revprop', '-r', '1',
2604
'svn:author', 'foo\bbar', wc_dir)
2606
# mod_dav_svn sends svn:author (via REPORT for DAV)
2607
sbox.simple_update(revision=0)
2608
sbox.simple_update(revision=1)
2610
'Path' : re.escape(wc_dir),
2611
'Repository Root' : sbox.repo_url,
2612
'Repository UUID' : svntest.actions.get_wc_uuid(wc_dir),
2613
'Last Changed Author' : 'foo\bbar',
2615
svntest.actions.run_and_verify_info(expected_info, wc_dir)
2617
# mod_dav_svn sends svn:author (via PROPFIND for DAV)
2618
# Since r1553367 this works correctly on ra_serf, since we now request
2619
# a single property value which skips creating the creator-displayname property
2620
svntest.actions.run_and_verify_svn(['foo\bbar'], [],
2621
'propget', '--revprop', '-r', '1',
2622
'svn:author', '--no-newline', wc_dir)
2624
# Ensure a stable date
2625
svntest.actions.run_and_verify_svn(None, [],
2626
'propset', '--revprop', '-r', '1',
2627
'svn:date', '2015-01-01T00:00:00.0Z', wc_dir)
2629
# But a proplist of this property value still fails via DAV.
2630
expected_output = svntest.verify.UnorderedOutput([
2631
'Unversioned properties on revision 1:\n',
2635
' 2015-01-01T00:00:00.0Z\n',
2637
' Log message for revision 1.\n'
2639
svntest.actions.run_and_verify_svn(expected_output, [],
2640
'proplist', '--revprop', '-r', '1', '-v',
2644
def xml_unsafe_author2(sbox):
2645
"svn:author with XML unsafe chars 2"
2647
sbox.build(create_wc = False)
2648
repo_url = sbox.repo_url
2650
svntest.actions.enable_revprop_changes(sbox.repo_dir)
2652
# client sends svn:author (via PROPPATCH for DAV)
2653
svntest.actions.run_and_verify_svn(None, [],
2654
'propset', '--revprop', '-r', '1',
2655
'svn:author', 'foo\bbar', repo_url)
2657
# Ensure a stable date
2658
svntest.actions.run_and_verify_svn(None, [],
2659
'propset', '--revprop', '-r', '1',
2660
'svn:date', '2000-01-01T12:00:00.0Z',
2663
if svntest.main.is_ra_type_dav():
2664
# This receives the filtered author (but that is better than an Xml fail)
2665
expected_author = 'foobar'
2667
expected_author = 'foo\bbar'
2669
# Use svn ls in --xml mode to test locale independent output.
2671
'<?xml version="1.0" encoding="UTF-8"?>\n',
2674
' path="%s">\n' % sbox.repo_url,
2680
'<author>%s</author>\n' % expected_author,
2681
'<date>2000-01-01T12:00:00.000000Z</date>\n',
2686
'<name>iota</name>\n',
2687
'<size>25</size>\n',
2690
'<author>%s</author>\n' % expected_author,
2691
'<date>2000-01-01T12:00:00.000000Z</date>\n',
2698
svntest.actions.run_and_verify_svn(expected_output, [],
2699
'ls', '--xml', repo_url)
2702
'Repository Root' : sbox.repo_url,
2703
'Last Changed Author' : expected_author,
2705
svntest.actions.run_and_verify_info(expected_info, repo_url)
2707
def dir_prop_conflict_details(sbox):
2708
"verify dir property conflict details"
2711
wc_dir = sbox.wc_dir
2713
# Apply some changes
2714
sbox.simple_propset('svn:mergeinfo', '/B:1', 'A')
2715
sbox.simple_propset('my-prop', 'my-val', 'A')
2716
sbox.simple_commit()
2719
sbox.simple_update('', revision=1)
2721
# Apply some incompatible changes
2722
sbox.simple_propset('svn:mergeinfo', '/C:1', 'A')
2723
sbox.simple_propset('my-prop', 'other-val', 'A')
2725
# This should report out of date because there are incompatible property
2726
# changes that can't be merged on the server
2727
svntest.actions.run_and_verify_commit(wc_dir,
2730
'.*[Oo]ut of date.*')
2732
expected_output = svntest.wc.State(wc_dir, {
2733
'A' : Item(status=' C'),
2735
expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
2736
expected_status.tweak('A', status=' C')
2738
svntest.actions.run_and_verify_update(wc_dir,
2744
# The conflict properties file line was shown for previous versions, but the
2745
# conflict source urls are new since 1.8.
2747
'Conflict Properties File' : re.escape(sbox.ospath('A/dir_conflicts.prej')),
2748
'Conflict Details': re.escape('incoming dir edit upon update'
2749
+ ' Source left: (dir) ^/A@1'
2750
+ ' Source right: (dir) ^/A@2')
2752
svntest.actions.run_and_verify_info([expected_info], sbox.path('A'))
2615
2755
def iprops_list_abspath(sbox):
2616
2756
"test listing iprops via abspath"
2660
2800
sbox.build(create_wc = False)
2662
svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
2802
svntest.actions.run_and_verify_svn(None, '.*E195000:.*path',
2663
2803
'pl', '-r', 'PREV',
2666
svntest.actions.run_and_verify_svn(None, None, '.*E195000:.*path',
2806
svntest.actions.run_and_verify_svn(None, '.*E195000:.*path',
2667
2807
'pg', 'my:Q', '-r', 'PREV',
2810
def prop_conflict_root(sbox):
2811
"""property conflict on wc root"""
2814
wc_dir = sbox.wc_dir
2816
sbox.simple_propset('propname', 'propval1', '')
2817
sbox.simple_commit()
2818
sbox.simple_propset('propname', 'propval2', '')
2819
sbox.simple_commit()
2820
sbox.simple_update(revision=2)
2821
sbox.simple_propset('propname', 'propvalconflict', '')
2823
expected_output = svntest.wc.State(wc_dir, {
2824
'' : Item(status=' C'),
2826
expected_disk = svntest.main.greek_state.copy()
2827
expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
2828
expected_status.tweak('', status=' C')
2829
extra_files = ['dir_conflicts.prej']
2830
svntest.actions.run_and_verify_update(wc_dir,
2834
extra_files=extra_files)
2671
2836
########################################################################
2672
2837
# Run the tests