~ubuntu-branches/debian/sid/subversion/sid

« back to all changes in this revision

Viewing changes to subversion/tests/cmdline/lock_tests.py

  • Committer: Package Import Robot
  • Author(s): James McCoy, Peter Samuelson, James McCoy
  • Date: 2014-01-12 19:48:33 UTC
  • mfrom: (0.2.10)
  • Revision ID: package-import@ubuntu.com-20140112194833-w3axfwksn296jn5x
Tags: 1.8.5-1
[ Peter Samuelson ]
* New upstream release.  (Closes: #725787) Rediff patches:
  - Remove apr-abi1 (applied upstream), rename apr-abi2 to apr-abi
  - Remove loosen-sqlite-version-check (shouldn't be needed)
  - Remove java-osgi-metadata (applied upstream)
  - svnmucc prompts for a changelog if none is provided. (Closes: #507430)
  - Remove fix-bdb-version-detection, upstream uses "apu-config --dbm-libs"
  - Remove ruby-test-wc (applied upstream)
  - Fix “svn diff -r N file” when file has svn:mime-type set.
    (Closes: #734163)
  - Support specifying an encoding for mod_dav_svn's environment in which
    hooks are run.  (Closes: #601544)
  - Fix ordering of “svnadmin dump” paths with certain APR versions.
    (Closes: #687291)
  - Provide a better error message when authentication fails with an
    svn+ssh:// URL.  (Closes: #273874)
  - Updated Polish translations.  (Closes: #690815)

[ James McCoy ]
* Remove all traces of libneon, replaced by libserf.
* patches/sqlite_3.8.x_workaround: Upstream fix for wc-queries-test test
  failurse.
* Run configure with --with-apache-libexecdir, which allows removing part of
  patches/rpath.
* Re-enable auth-test as upstream has fixed the problem of picking up
  libraries from the environment rather than the build tree.
  (Closes: #654172)
* Point LD_LIBRARY_PATH at the built auth libraries when running the svn
  command during the build.  (Closes: #678224)
* Add a NEWS entry describing how to configure mod_dav_svn to understand
  UTF-8.  (Closes: #566148)
* Remove ancient transitional package, libsvn-ruby.
* Enable compatibility with Sqlite3 versions back to Wheezy.
* Enable hardening flags.  (Closes: #734918)
* patches/build-fixes: Enable verbose build logs.
* Build against the default ruby version.  (Closes: #722393)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
######################################################################
27
27
 
28
28
# General modules
29
 
import re, os, stat
 
29
import re, os, stat, logging
 
30
 
 
31
logger = logging.getLogger()
30
32
 
31
33
# Our testing module
32
34
import svntest
79
81
  svntest.actions.duplicate_dir(wc_dir, wc_b)
80
82
 
81
83
  # lock a file as wc_author
82
 
  fname = 'iota'
83
 
  file_path = os.path.join(sbox.wc_dir, fname)
84
 
  file_path_b = os.path.join(wc_b, fname)
 
84
  file_path = sbox.ospath('iota')
 
85
  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
85
86
 
86
87
  svntest.main.file_append(file_path, "This represents a binary file\n")
87
88
  svntest.main.run_svn(None, 'commit',
133
134
  sbox.build()
134
135
  wc_dir = sbox.wc_dir
135
136
 
136
 
  fname = 'A/mu'
137
 
  file_path = os.path.join(sbox.wc_dir, fname)
138
 
 
139
 
  # lock fname as wc_author
 
137
  # lock 'A/mu' as wc_author
140
138
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
141
 
                                     '-m', 'some lock comment', file_path)
 
139
                                     '-m', 'some lock comment',
 
140
                                     sbox.ospath('A/mu'))
142
141
 
143
142
  # make a change and commit it, holding lock
144
 
  svntest.main.file_append(file_path, "Tweak!\n")
 
143
  sbox.simple_append('A/mu', 'Tweak!\n')
145
144
  svntest.main.run_svn(None, 'commit', '-m', '', '--no-unlock',
146
 
                       file_path)
 
145
                       sbox.ospath('A/mu'))
147
146
 
148
147
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
149
 
  expected_status.tweak(fname, wc_rev=2)
150
 
  expected_status.tweak(fname, writelocked='K')
 
148
  expected_status.tweak('A/mu', wc_rev=2, writelocked='K')
151
149
 
152
150
  # Make sure the file is still locked
153
151
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
154
152
 
 
153
 
155
154
def commit_file_unlock(sbox):
156
155
  "commit a file and release lock"
157
156
 
158
157
  sbox.build()
159
158
  wc_dir = sbox.wc_dir
160
159
 
161
 
  fname = 'A/mu'
162
 
  file_path = os.path.join(sbox.wc_dir, fname)
163
 
 
164
 
  # lock fname as wc_author
 
160
  # lock A/mu and iota as wc_author
165
161
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
166
 
                                     '-m', 'some lock comment', file_path)
 
162
                                     '-m', 'some lock comment',
 
163
                                     sbox.ospath('A/mu'),
 
164
                                     sbox.ospath('iota'))
167
165
 
168
166
  # make a change and commit it, allowing lock to be released
169
 
  svntest.main.file_append(file_path, "Tweak!\n")
170
 
  svntest.main.run_svn(None, 'commit', '-m', '',
171
 
                       file_path)
 
167
  sbox.simple_append('A/mu', 'Tweak!\n')
 
168
  sbox.simple_commit()
172
169
 
173
170
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
174
 
  expected_status.tweak(fname, wc_rev=2)
 
171
  expected_status.tweak('A/mu', wc_rev=2)
 
172
  expected_status.tweak('iota', wc_rev=2)
175
173
 
176
174
  # Make sure the file is unlocked
177
175
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
183
181
  sbox.build()
184
182
  wc_dir = sbox.wc_dir
185
183
 
186
 
  fname = 'A/mu'
187
 
  file_path = os.path.join(sbox.wc_dir, fname)
188
 
 
189
 
  # lock fname as wc_author
 
184
  # lock A/mu as wc_author
190
185
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
191
 
                                     '-m', 'some lock comment', file_path)
 
186
                                     '-m', 'some lock comment',
 
187
                                     sbox.ospath('A/mu'))
192
188
 
193
189
  # make a property change and commit it, allowing lock to be released
194
 
  svntest.main.run_svn(None, 'propset', 'blue', 'azul', file_path)
195
 
  svntest.main.run_svn(None, 'commit',
196
 
                             '-m', '', file_path)
 
190
  sbox.simple_propset('blue', 'azul', 'A/mu')
 
191
  sbox.simple_commit('A/mu')
197
192
 
198
193
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
199
 
  expected_status.tweak(fname, wc_rev=2)
 
194
  expected_status.tweak('A/mu', wc_rev=2)
200
195
 
201
196
  # Make sure the file is unlocked
202
197
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
222
217
  svntest.actions.duplicate_dir(wc_dir, wc_b)
223
218
 
224
219
  # lock a file as wc_author
225
 
  fname = 'iota'
226
 
  file_path = os.path.join(sbox.wc_dir, fname)
227
 
  file_path_b = os.path.join(wc_b, fname)
 
220
  file_path = sbox.ospath('iota')
 
221
  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
228
222
 
229
223
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
230
224
                                     '-m', '', file_path)
265
259
  svntest.actions.duplicate_dir(wc_dir, wc_b)
266
260
 
267
261
  # lock a file as wc_author
268
 
  fname = 'iota'
269
 
  file_path = os.path.join(sbox.wc_dir, fname)
270
 
  file_path_b = os.path.join(wc_b, fname)
 
262
  file_path = sbox.ospath('iota')
 
263
  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
271
264
 
272
265
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
273
266
                                     '-m', '', file_path)
295
288
  "examine the fields of a lockfile for correctness"
296
289
 
297
290
  sbox.build()
298
 
  wc_dir = sbox.wc_dir
299
 
 
300
 
  fname = 'iota'
301
 
  comment = 'This is a lock test.'
302
 
  file_path = os.path.join(sbox.wc_dir, fname)
303
291
 
304
292
  # lock a file as wc_author
305
 
  svntest.actions.run_and_validate_lock(file_path,
 
293
  svntest.actions.run_and_validate_lock(sbox.ospath('iota'),
306
294
                                        svntest.main.wc_author)
307
295
 
308
296
#----------------------------------------------------------------------
315
303
  sbox.build()
316
304
  wc_dir = sbox.wc_dir
317
305
 
318
 
 
319
 
  fname = 'iota'
320
 
  file_path = os.path.join(sbox.wc_dir, fname)
321
 
 
322
306
  # set up our expected status
323
307
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
324
308
 
325
309
  # lock the file
326
310
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
327
 
                                     '-m', '', file_path)
 
311
                                     '-m', '', sbox.ospath('iota'))
328
312
 
329
313
  # Make a second copy of the working copy
330
314
  wc_b = sbox.add_wc_path('_b')
331
315
  svntest.actions.duplicate_dir(wc_dir, wc_b)
332
 
  file_path_b = os.path.join(wc_b, fname)
 
316
  file_path_b = sbox.ospath('iota', wc_dir=wc_b)
333
317
 
334
318
  # --- Meanwhile, in our other working copy... ---
335
319
 
339
323
 
340
324
 
341
325
  # update the 1st wc, which should clear the lock there
342
 
  svntest.main.run_svn(None, 'update', wc_dir)
 
326
  sbox.simple_update()
343
327
 
344
328
  # Make sure the file is unlocked
345
329
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
357
341
  sbox.build()
358
342
  wc_dir = sbox.wc_dir
359
343
 
360
 
  iota_path = os.path.join(wc_dir, 'iota')
361
 
  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
362
 
  mu_path = os.path.join(wc_dir, 'A', 'mu')
 
344
  iota_path = sbox.ospath('iota')
 
345
  lambda_path = sbox.ospath('A/B/lambda')
 
346
  mu_path = sbox.ospath('A/mu')
363
347
 
364
348
  # svn:needs-lock value should be forced to a '*'
365
349
  svntest.actions.set_prop('svn:needs-lock', 'foo', iota_path)
381
365
    if ((os.stat(iota_path)[0] & mode)
382
366
        or (os.stat(lambda_path)[0] & mode)
383
367
        or (os.stat(mu_path)[0] & mode)):
384
 
      print("Setting 'svn:needs-lock' property on a file failed to set")
385
 
      print("file mode to read-only.")
 
368
      logger.warn("Setting 'svn:needs-lock' property on a file failed to set")
 
369
      logger.warn("file mode to read-only.")
386
370
      raise svntest.Failure
387
371
 
388
372
    # obtain a lock on one of these files...
391
375
 
392
376
    # ...and verify that the write bit gets set...
393
377
    if not (os.stat(iota_path)[0] & mode):
394
 
      print("Locking a file with 'svn:needs-lock' failed to set write bit.")
 
378
      logger.warn("Locking a file with 'svn:needs-lock' failed to set write bit.")
395
379
      raise svntest.Failure
396
380
 
397
381
    # ...and unlock it...
400
384
 
401
385
    # ...and verify that the write bit gets unset
402
386
    if (os.stat(iota_path)[0] & mode):
403
 
      print("Unlocking a file with 'svn:needs-lock' failed to unset write bit.")
 
387
      logger.warn("Unlocking a file with 'svn:needs-lock' failed to unset write bit.")
404
388
      raise svntest.Failure
405
389
 
406
390
    # Verify that removing the property restores the file to read-write
407
391
    svntest.main.run_svn(None, 'propdel', 'svn:needs-lock', iota_path)
408
392
    if not (os.stat(iota_path)[0] & mode):
409
 
      print("Deleting 'svn:needs-lock' failed to set write bit.")
 
393
      logger.warn("Deleting 'svn:needs-lock' failed to set write bit.")
410
394
      raise svntest.Failure
411
395
 
412
396
#----------------------------------------------------------------------
418
402
  "update handles svn:needs-lock correctly"
419
403
 
420
404
  sbox.build()
421
 
  wc_dir = sbox.wc_dir
422
405
 
423
 
  iota_path = os.path.join(wc_dir, 'iota')
424
 
  svntest.main.run_svn(None,
425
 
                       'propset', 'svn:needs-lock', 'foo', iota_path)
426
 
  svntest.main.run_svn(None,
427
 
                       'commit', '-m', 'log msg', iota_path)
428
 
  svntest.main.run_svn(None,
429
 
                       'up', wc_dir)
 
406
  sbox.simple_propset('svn:needs-lock', 'foo', 'iota')
 
407
  sbox.simple_commit('iota')
 
408
  sbox.simple_update()
430
409
 
431
410
  # Lock, modify, commit, unlock, to create r3.
432
411
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
433
 
                                     '-m', '', iota_path)
434
 
  svntest.main.file_append(iota_path, "This line added in r2.\n")
435
 
  svntest.main.run_svn(None, 'commit',
436
 
                       '-m', '', iota_path) # auto-unlocks
 
412
                                     '-m', '', sbox.ospath('iota'))
 
413
  sbox.simple_append('iota', 'This line added in r2.\n')
 
414
  sbox.simple_commit('iota') # auto-unlocks
437
415
 
438
416
  # Backdate to r2.
439
 
  svntest.main.run_svn(None,
440
 
                       'update', '-r2', iota_path)
 
417
  sbox.simple_update(revision=2)
441
418
 
442
419
  # Try updating forward to r3 again.  This is where the bug happened.
443
 
  svntest.main.run_svn(None,
444
 
                       'update', '-r3', iota_path)
 
420
  sbox.simple_update(revision=3)
445
421
 
446
422
 
447
423
#----------------------------------------------------------------------
456
432
  wc_b = sbox.add_wc_path('_b')
457
433
  svntest.actions.duplicate_dir(wc_dir, wc_b)
458
434
 
459
 
  iota_path = os.path.join(wc_dir, 'iota')
460
 
  iota_path_b = os.path.join(wc_b, 'iota')
 
435
  iota_path = sbox.ospath('iota')
 
436
  iota_path_b = sbox.ospath('iota', wc_dir=wc_b)
461
437
 
462
438
  mode = stat.S_IWGRP | stat.S_IWOTH | stat.S_IWRITE
463
439
 
464
440
# Set the prop in wc a
465
 
  svntest.main.run_svn(None, 'propset', 'svn:needs-lock', 'foo', iota_path)
 
441
  sbox.simple_propset('svn:needs-lock', 'foo', 'iota')
466
442
 
467
443
  # commit r2
468
 
  svntest.main.run_svn(None, 'commit',
469
 
                       '-m', '', iota_path)
 
444
  sbox.simple_commit('iota')
470
445
 
471
446
  # update wc_b
472
447
  svntest.main.run_svn(None, 'update', wc_b)
484
459
 
485
460
  # make sure that iota got set to read-only
486
461
  if (os.stat(iota_path_b)[0] & mode):
487
 
    print("Upon removal of a defunct lock, a file with 'svn:needs-lock'")
488
 
    print("was not set back to read-only")
 
462
    logger.warn("Upon removal of a defunct lock, a file with 'svn:needs-lock'")
 
463
    logger.warn("was not set back to read-only")
489
464
    raise svntest.Failure
490
465
 
491
466
 
498
473
  sbox.build()
499
474
  wc_dir = sbox.wc_dir
500
475
 
501
 
  iota_path = os.path.join(wc_dir, 'iota')
 
476
  iota_path = sbox.ospath('iota')
502
477
  iota_url = sbox.repo_url + '/iota'
503
478
 
504
479
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
505
480
                                     '-m', '', iota_path)
506
481
 
507
 
  svntest.actions.run_and_verify_svn(None, None, [], 'delete', iota_path)
508
 
 
 
482
  sbox.simple_rm('iota')
509
483
  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
510
484
                                     '--no-unlock',
511
485
                                     '-m', '', iota_path)
524
498
  sbox.build()
525
499
  wc_dir = sbox.wc_dir
526
500
 
527
 
  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
528
 
  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
529
 
  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
 
501
  pi_path = sbox.ospath('A/D/G/pi')
 
502
  rho_path = sbox.ospath('A/D/G/rho')
 
503
  tau_path = sbox.ospath('A/D/G/tau')
530
504
 
531
505
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
532
506
  expected_status.tweak('A/D/G/pi', 'A/D/G/rho', 'A/D/G/tau', writelocked='K')
551
525
  sbox.build()
552
526
  wc_dir = sbox.wc_dir
553
527
 
554
 
  parent_dir = os.path.join(wc_dir, 'A', 'D', 'G')
555
 
  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
556
 
  rho_path = os.path.join(wc_dir, 'A', 'D', 'G', 'rho')
557
 
  tau_path = os.path.join(wc_dir, 'A', 'D', 'G', 'tau')
 
528
  pi_path = sbox.ospath('A/D/G/pi')
 
529
  rho_path = sbox.ospath('A/D/G/rho')
 
530
  tau_path = sbox.ospath('A/D/G/tau')
558
531
 
559
532
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
560
533
                                     '-m', '', pi_path, rho_path, tau_path)
561
534
 
562
 
  svntest.actions.run_and_verify_svn(None, None, [], 'delete', parent_dir)
563
 
 
 
535
  sbox.simple_rm('A/D/G')  # the parent directory
564
536
  svntest.actions.run_and_verify_svn(None, None, [], 'commit',
565
537
                                     '--no-unlock',
566
 
                                     '-m', '', parent_dir)
 
538
                                     '-m', '', sbox.ospath('A/D/G'))
567
539
 
568
540
#----------------------------------------------------------------------
569
541
# III.c : Lock a file and check the output of 'svn stat' from the same
581
553
  fname = 'iota'
582
554
  file_path = os.path.join(sbox.wc_dir, fname)
583
555
 
584
 
  svntest.main.file_append(file_path, "This is a spreadsheet\n")
585
 
  svntest.main.run_svn(None, 'commit',
586
 
                       '-m', '', file_path)
 
556
  sbox.simple_append('iota', "This is a spreadsheet\n")
 
557
  sbox.simple_commit('iota')
587
558
 
588
 
  svntest.main.run_svn(None, 'lock',
589
 
                       '-m', '', file_path)
 
559
  svntest.main.run_svn(None, 'lock', '-m', '', sbox.ospath('iota'))
590
560
 
591
561
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
592
 
  expected_status.tweak(fname, wc_rev=2)
593
 
  expected_status.tweak(fname, writelocked='K')
 
562
  expected_status.tweak('iota', wc_rev=2, writelocked='K')
594
563
 
595
564
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
596
565
 
597
566
  # Verify status again after modifying the file
598
 
  svntest.main.file_append(file_path, "check stat output after mod")
 
567
  sbox.simple_append('iota', 'check stat output after mod')
599
568
 
600
 
  expected_status.tweak(fname, status='M ')
 
569
  expected_status.tweak('iota', status='M ')
601
570
 
602
571
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
603
572
 
604
573
  # Verify status of lock from another working copy
605
574
  svntest.main.run_svn(None, 'update', wc_b)
606
575
  expected_status = svntest.actions.get_virginal_state(wc_b, 2)
607
 
  expected_status.tweak(fname, writelocked='O')
 
576
  expected_status.tweak('iota', writelocked='O')
608
577
 
609
578
  svntest.actions.run_and_verify_status(wc_b, expected_status)
610
579
 
705
674
    if line.find(error_msg) != -1:
706
675
      break
707
676
  else:
708
 
    print("Error: %s : not found in: %s" % (error_msg, error))
 
677
    logger.warn("Error: %s : not found in: %s" % (error_msg, error))
709
678
    raise svntest.Failure
710
679
 
711
680
#----------------------------------------------------------------------
744
713
  sbox.build()
745
714
  wc_dir = sbox.wc_dir
746
715
 
747
 
  iota_path = os.path.join(wc_dir, 'iota')
 
716
  iota_path = sbox.ospath('iota')
748
717
 
749
718
  mode = stat.S_IWGRP | stat.S_IWOTH | stat.S_IWRITE
750
719
 
758
727
 
759
728
  # make sure that iota got set to read-only
760
729
  if (os.stat(iota_path)[0] & mode):
761
 
    print("Committing a file with 'svn:needs-lock'")
762
 
    print("did not set the file to read-only")
 
730
    logger.warn("Committing a file with 'svn:needs-lock'")
 
731
    logger.warn("did not set the file to read-only")
763
732
    raise svntest.Failure
764
733
 
765
734
  # verify status is as we expect
773
742
 
774
743
  # make sure that iota got read-only-ness removed
775
744
  if (os.stat(iota_path)[0] & mode == 0):
776
 
    print("Deleting the 'svn:needs-lock' property ")
777
 
    print("did not remove read-only-ness")
 
745
    logger.warn("Deleting the 'svn:needs-lock' property ")
 
746
    logger.warn("did not remove read-only-ness")
778
747
    raise svntest.Failure
779
748
 
780
749
  # revert the change
782
751
 
783
752
  # make sure that iota got set back to read-only
784
753
  if (os.stat(iota_path)[0] & mode):
785
 
    print("Reverting a file with 'svn:needs-lock'")
786
 
    print("did not set the file back to read-only")
 
754
    logger.warn("Reverting a file with 'svn:needs-lock'")
 
755
    logger.warn("did not set the file back to read-only")
787
756
    raise svntest.Failure
788
757
 
789
758
  # try propdel and revert from a different directory so
807
776
 
808
777
  # make sure it is still writable since we have the lock
809
778
  if (os.stat(iota_path)[0] & mode == 0):
810
 
    print("Reverting a 'svn:needs-lock' file (with lock in wc) ")
811
 
    print("did not leave the file writable")
 
779
    logger.warn("Reverting a 'svn:needs-lock' file (with lock in wc) ")
 
780
    logger.warn("did not leave the file writable")
812
781
    raise svntest.Failure
813
782
 
814
783
 
863
832
  sbox.build()
864
833
  wc_dir = sbox.wc_dir
865
834
 
866
 
  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
867
 
  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
 
835
  gamma_path = sbox.ospath('A/D/gamma')
 
836
  lambda_path = sbox.ospath('A/B/lambda')
868
837
  iota_URL = sbox.repo_url + '/iota'
869
838
  alpha_URL = sbox.repo_url + '/A/B/E/alpha'
870
839
 
886
855
  expected_status.tweak('A/D/gamma', 'A/B/lambda', writelocked='K')
887
856
 
888
857
  # In WC-NG locks are kept per working copy, not per file
889
 
  if svntest.main.wc_is_singledb(wc_dir):
890
 
    # In single-db you see these files are locked locally
891
 
    expected_status.tweak('A/B/E/alpha', 'iota', writelocked='K')
892
 
  else:
893
 
    # In multi-db you see these files are not locked in the right dir
894
 
    expected_status.tweak('A/B/E/alpha', 'iota', writelocked='O')
 
858
  expected_status.tweak('A/B/E/alpha', 'iota', writelocked='K')
895
859
 
896
860
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
897
861
 
910
874
 
911
875
  # lock a file as wc_author
912
876
  fname = 'amazing space'
913
 
  file_path = os.path.join(wc_dir, fname)
 
877
  file_path = sbox.ospath(fname)
914
878
 
915
879
  svntest.main.file_append(file_path, "This represents a binary file\n")
916
880
  svntest.actions.run_and_verify_svn(None, None, [], "add", file_path)
974
938
  sbox.build()
975
939
  wc_dir = sbox.wc_dir
976
940
 
977
 
  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
 
941
  gamma_path = sbox.ospath('A/D/gamma')
978
942
 
979
943
  expected_err = ".*svn: warning: W125005: To turn off the svn:needs-lock property,.*"
980
944
  svntest.actions.run_and_verify_svn2(None, None, expected_err, 0,
992
956
  if (not gamma_stat & mode_r
993
957
      or gamma_stat & mode_w
994
958
      or not gamma_stat & mode_x):
995
 
    print("Committing a file with 'svn:needs-lock, svn:executable'")
996
 
    print("did not set the file to read-only, executable")
 
959
    logger.warn("Committing a file with 'svn:needs-lock, svn:executable'")
 
960
    logger.warn("did not set the file to read-only, executable")
997
961
    raise svntest.Failure
998
962
 
999
963
  # lock
1004
968
  if (not gamma_stat & mode_r
1005
969
      or not gamma_stat & mode_w
1006
970
      or not gamma_stat & mode_x):
1007
 
    print("Locking a file with 'svn:needs-lock, svn:executable'")
1008
 
    print("did not set the file to read-write, executable")
 
971
    logger.warn("Locking a file with 'svn:needs-lock, svn:executable'")
 
972
    logger.warn("did not set the file to read-write, executable")
1009
973
    raise svntest.Failure
1010
974
 
1011
975
  # modify
1020
984
  if (not gamma_stat & mode_r
1021
985
      or gamma_stat & mode_w
1022
986
      or not gamma_stat & mode_x):
1023
 
    print("Unlocking a file with 'svn:needs-lock, svn:executable'")
1024
 
    print("did not set the file to read-only, executable")
 
987
    logger.warn("Unlocking a file with 'svn:needs-lock, svn:executable'")
 
988
    logger.warn("did not set the file to read-only, executable")
1025
989
    raise svntest.Failure
1026
990
 
1027
991
  # ci
1033
997
  if (not gamma_stat & mode_r
1034
998
      or gamma_stat & mode_w
1035
999
      or not gamma_stat & mode_x):
1036
 
    print("Commiting a file with 'svn:needs-lock, svn:executable'")
1037
 
    print("after unlocking modified file's permissions")
 
1000
    logger.warn("Commiting a file with 'svn:needs-lock, svn:executable'")
 
1001
    logger.warn("after unlocking modified file's permissions")
1038
1002
    raise svntest.Failure
1039
1003
 
1040
1004
 
1051
1015
  sbox.build()
1052
1016
  wc_dir = sbox.wc_dir
1053
1017
 
1054
 
  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
 
1018
  gamma_path = sbox.ospath('A/D/gamma')
1055
1019
 
1056
1020
  expected_err = ".*svn: warning: W125005: To turn off the svn:needs-lock property,.*"
1057
1021
  svntest.actions.run_and_verify_svn2(None, None, expected_err, 0,
1069
1033
  if (not gamma_stat & mode_r
1070
1034
      or gamma_stat & mode_w
1071
1035
      or not gamma_stat & mode_x):
1072
 
    print("Committing a file with 'svn:needs-lock, svn:executable'")
1073
 
    print("did not set the file to read-only, executable")
 
1036
    logger.warn("Committing a file with 'svn:needs-lock, svn:executable'")
 
1037
    logger.warn("did not set the file to read-only, executable")
1074
1038
    raise svntest.Failure
1075
1039
 
1076
1040
  # lock
1081
1045
  if (not gamma_stat & mode_r
1082
1046
      or not gamma_stat & mode_w
1083
1047
      or not gamma_stat & mode_x):
1084
 
    print("Locking a file with 'svn:needs-lock, svn:executable'")
1085
 
    print("did not set the file to read-write, executable")
 
1048
    logger.warn("Locking a file with 'svn:needs-lock, svn:executable'")
 
1049
    logger.warn("did not set the file to read-write, executable")
1086
1050
    raise svntest.Failure
1087
1051
 
1088
1052
  # modify
1097
1061
  if (not gamma_stat & mode_r
1098
1062
      or gamma_stat & mode_w
1099
1063
      or not gamma_stat & mode_x):
1100
 
    print("Commiting a file with 'svn:needs-lock, svn:executable'")
1101
 
    print("did not set the file to read-only, executable")
 
1064
    logger.warn("Commiting a file with 'svn:needs-lock, svn:executable'")
 
1065
    logger.warn("did not set the file to read-only, executable")
1102
1066
    raise svntest.Failure
1103
1067
 
1104
1068
def commit_xml_unsafe_file_unlock(sbox):
1173
1137
 
1174
1138
#----------------------------------------------------------------------
1175
1139
@Issue(4126)
1176
 
@Skip(svntest.main.is_ra_type_dav_serf) # Issue 4126 unpredictable result
1177
1140
def unlock_already_unlocked_files(sbox):
1178
1141
  "(un)lock set of files, one already (un)locked"
1179
1142
 
1181
1144
  wc_dir = sbox.wc_dir
1182
1145
 
1183
1146
  # Deliberately have no direct child of A as a target
1184
 
  iota_path = os.path.join(wc_dir, 'iota')
1185
 
  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
1186
 
  alpha_path = os.path.join(wc_dir, 'A', 'B', 'E', 'alpha')
1187
 
  gamma_path = os.path.join(wc_dir, 'A', 'D', 'gamma')
 
1147
  iota_path = sbox.ospath('iota')
 
1148
  lambda_path = sbox.ospath('A/B/lambda')
 
1149
  alpha_path = sbox.ospath('A/B/E/alpha')
 
1150
  gamma_path = sbox.ospath('A/D/gamma')
1188
1151
 
1189
1152
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
1190
1153
                                     '--username', svntest.main.wc_author2,
1229
1192
 
1230
1193
  sbox.build()
1231
1194
  wc_dir = sbox.wc_dir
1232
 
  fname = os.path.join(wc_dir, "iota")
1233
 
  fname2 = os.path.join(wc_dir, "iota2")
 
1195
  fname = sbox.ospath("iota")
 
1196
  fname2 = sbox.ospath("iota2")
1234
1197
 
1235
1198
  # Move iota, creating r2.
1236
1199
  svntest.actions.run_and_verify_svn(None, None, [],
1285
1248
 
1286
1249
  sbox.build()
1287
1250
  wc_dir = sbox.wc_dir
1288
 
  dirname = os.path.join(wc_dir, "space dir")
 
1251
  dirname = sbox.ospath("space dir")
1289
1252
  fname = os.path.join(dirname, "f")
1290
1253
 
1291
1254
  # Create a dir with a space in its name and a file therein.
1337
1300
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
1338
1301
                                     file_path)
1339
1302
 
1340
 
  # Steal the lock as the same author, but using an URL to keep the old token
 
1303
  # Steal the lock as the same author, but using a URL to keep the old token
1341
1304
  # in the WC.
1342
1305
  svntest.actions.run_and_verify_svn(None, ".*locked by user", [], 'lock',
1343
1306
                                    "--force", file_url)
1391
1354
  wc_dir = sbox.wc_dir
1392
1355
 
1393
1356
  # lock a file with user jrandom
1394
 
  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
 
1357
  pi_path = sbox.ospath('A/D/G/pi')
1395
1358
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
1396
1359
  expected_status.tweak('A/D/G/pi', writelocked='K')
1397
1360
 
1439
1402
  sbox.build()
1440
1403
  wc_dir = sbox.wc_dir
1441
1404
 
1442
 
  mu_path = os.path.join(wc_dir, 'A', 'mu')
1443
 
  mu2_path = os.path.join(wc_dir, 'A', 'B', 'mu')
 
1405
  mu_path = sbox.ospath('A/mu')
 
1406
  mu2_path = sbox.ospath('A/B/mu')
1444
1407
 
1445
1408
  # Create a needs-lock file
1446
1409
  svntest.actions.set_prop('svn:needs-lock', '*', mu_path)
1454
1417
  # Switch a second location for the same file in the same working copy
1455
1418
  svntest.actions.run_and_verify_svn(None, None, [],
1456
1419
                                     'switch', sbox.repo_url + '/A',
1457
 
                                     os.path.join(wc_dir, 'A', 'B'),
 
1420
                                     sbox.ospath('A/B'),
1458
1421
                                     '--ignore-ancestry')
1459
1422
 
1460
1423
  # Lock location 1
1469
1432
  os.chmod(mu2_path, 0700)
1470
1433
  svntest.main.file_append(mu2_path, "Updated text")
1471
1434
 
1472
 
  if svntest.main.wc_is_singledb(wc_dir):
1473
 
    # Commit will just succeed as the DB owns the lock. It's a user decision
1474
 
    # to commit the other target instead of the one originally locked
1475
 
    expected_err = []
1476
 
  else:
1477
 
    # Commit should fail because it is locked in the other location
1478
 
    expected_err = '.*(([Nn]o)|(Server)).*[lL]ock.*'
 
1435
  # Commit will just succeed as the DB owns the lock. It's a user decision
 
1436
  # to commit the other target instead of the one originally locked
1479
1437
 
1480
 
  svntest.actions.run_and_verify_svn(None, None, expected_err,
 
1438
  svntest.actions.run_and_verify_svn(None, None, [],
1481
1439
                                     'commit', mu2_path, '-m', '')
1482
1440
 
1483
1441
#----------------------------------------------------------------------
1490
1448
  sbox.build()
1491
1449
  wc_dir = sbox.wc_dir
1492
1450
 
1493
 
  D_path      = os.path.join(wc_dir, 'A', 'D')
1494
 
  lambda_path = os.path.join(wc_dir, 'A', 'B', 'lambda')
 
1451
  D_path      = sbox.ospath('A/D')
 
1452
  lambda_path = sbox.ospath('A/B/lambda')
1495
1453
 
1496
1454
  # Commit deletion of A/D and A/B/lambda as r2, then update the WC
1497
1455
  # back to r1.  Then attempt to lock some paths that no longer exist
1516
1474
  # svn: In file '..\..\..\subversion\libsvn_ra_serf\util.c' line 1120:
1517
1475
  #  assertion failed (ctx->status_code)
1518
1476
  svntest.actions.run_and_verify_svn2(None, None, expected_lock_fail_err_re,
1519
 
                                      0, 'lock', D_path)
1520
 
  svntest.actions.run_and_verify_svn2(None, None, expected_lock_fail_err_re,
1521
1477
                                      0, 'lock', lambda_path)
1522
1478
 
 
1479
  expected_err = 'svn: E155008: The node \'.*D\' is not a file'
 
1480
  svntest.actions.run_and_verify_svn(None, None, expected_err,
 
1481
                                     'lock', D_path)
 
1482
 
 
1483
 
1523
1484
#----------------------------------------------------------------------
1524
1485
def verify_path_escaping(sbox):
1525
1486
  "verify escaping of lock paths"
1529
1490
 
1530
1491
  # Add test paths using two characters that need escaping in a url, but
1531
1492
  # are within the normal ascii range
1532
 
  file1 = os.path.join(wc_dir, 'file #1')
1533
 
  file2 = os.path.join(wc_dir, 'file #2')
1534
 
  file3 = os.path.join(wc_dir, 'file #3')
 
1493
  file1 = sbox.ospath('file #1')
 
1494
  file2 = sbox.ospath('file #2')
 
1495
  file3 = sbox.ospath('file #3')
1535
1496
 
1536
1497
  svntest.main.file_write(file1, 'File 1')
1537
1498
  svntest.main.file_write(file2, 'File 2')
1552
1513
      'file #1'           : Item(status='  ', writelocked='K', wc_rev='2'),
1553
1514
      'file #2'           : Item(status='  ', writelocked='O', wc_rev='2'),
1554
1515
      'file #3'           : Item(status='  ', writelocked='B', wc_rev='2')
1555
 
    });
 
1516
    })
1556
1517
 
1557
1518
  # Make sure the file locking is reported correctly
1558
1519
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
1568
1529
  sbox.build()
1569
1530
  wc_dir = sbox.wc_dir
1570
1531
 
1571
 
  mu_path = os.path.join(wc_dir, 'A', 'mu')
1572
 
  G_path = os.path.join(wc_dir, 'A', 'D', 'G')
1573
 
  rho_path = os.path.join(G_path, 'rho')
 
1532
  mu_path = sbox.ospath('A/mu')
 
1533
  G_path = sbox.ospath('A/D/G')
 
1534
  rho_path = sbox.ospath('A/D/G/rho')
1574
1535
 
1575
1536
  # Lock mu and A/D/G/rho.
1576
1537
  svntest.actions.run_and_verify_svn(None, None, [],
1617
1578
  wc_dir = sbox.wc_dir
1618
1579
 
1619
1580
  mu_URL = sbox.repo_url + '/A/mu'
1620
 
  mu_path = os.path.join(wc_dir, 'A', 'mu')
1621
 
  mu2_path = os.path.join(wc_dir, 'A', 'mu2')
1622
 
  mu3_path = os.path.join(wc_dir, 'A', 'mu3')
1623
 
  kappa_path = os.path.join(wc_dir, 'kappa')
 
1581
  mu_path = sbox.ospath('A/mu')
 
1582
  mu2_path = sbox.ospath('A/mu2')
 
1583
  mu3_path = sbox.ospath('A/mu3')
 
1584
  kappa_path = sbox.ospath('kappa')
1624
1585
  open(kappa_path, 'w').write("This is the file 'kappa'.\n")
1625
1586
 
1626
1587
  ## added file
1694
1655
                        status='D ', writelocked='O')
1695
1656
 
1696
1657
  expected_output = svntest.wc.State(wc_dir, {
1697
 
    'A/mu'              : Item(status='  '),
1698
 
    'A/B/E/alpha'       : Item(status='  '),
1699
 
    'iota'              : Item(status='  '),
 
1658
    'A/mu'              : Item(status='B '),
 
1659
    'A/B/E/alpha'       : Item(status='B '),
 
1660
    'iota'              : Item(status='B '),
1700
1661
  })
1701
1662
 
1702
1663
  svntest.actions.run_and_verify_update(wc_dir, expected_output,
1714
1675
  svntest.actions.create_failing_hook(repo_dir, "pre-unlock", "error text")
1715
1676
 
1716
1677
  # lock a file.
1717
 
  pi_path = os.path.join(wc_dir, 'A', 'D', 'G', 'pi')
 
1678
  pi_path = sbox.ospath('A/D/G/pi')
1718
1679
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
1719
1680
  expected_status.tweak('A/D/G/pi', writelocked='K')
1720
1681
 
1750
1711
                                      ".*scheme.*'opaquelocktoken'", 0,
1751
1712
                                      'lock', '-m', '', file_path)
1752
1713
 
1753
 
 
 
1714
@Issue(3105)
 
1715
def lock_multi_wc(sbox):
 
1716
  "obtain locks in multiple working copies in one go"
 
1717
 
 
1718
  sbox.build()
 
1719
 
 
1720
  sbox2 = sbox.clone_dependent(copy_wc=True)
 
1721
 
 
1722
  wc_name = os.path.basename(sbox.wc_dir)
 
1723
  wc2_name = os.path.basename(sbox2.wc_dir)
 
1724
 
 
1725
  expected_output = svntest.verify.UnorderedOutput([
 
1726
    '\'%s\' locked by user \'jrandom\'.\n' % os.path.join(wc_name, 'iota'),
 
1727
    '\'%s\' locked by user \'jrandom\'.\n' % os.path.join(wc2_name, 'A', 'mu'),
 
1728
  ])
 
1729
 
 
1730
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1731
                                     'lock', sbox.ospath('iota'),
 
1732
                                             sbox2.ospath('A/mu'))
 
1733
 
 
1734
  expected_output = svntest.verify.UnorderedOutput([
 
1735
    '\'%s\' unlocked.\n' % os.path.join(wc_name, 'iota'),
 
1736
    '\'%s\' unlocked.\n' % os.path.join(wc2_name, 'A', 'mu'),
 
1737
  ])
 
1738
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1739
                                     'unlock', sbox.ospath('iota'),
 
1740
                                               sbox2.ospath('A/mu'))
 
1741
 
 
1742
@Issue(3378)
 
1743
def locks_stick_over_switch(sbox):
 
1744
  "locks are kept alive over switching"
 
1745
 
 
1746
  sbox.build()
 
1747
  wc_dir = sbox.wc_dir
 
1748
  repo_url = sbox.repo_url
 
1749
 
 
1750
  svntest.actions.run_and_verify_svn(None, None, [],
 
1751
                                     'cp', sbox.ospath('A'), repo_url + '/AA',
 
1752
                                     '-m', '')
 
1753
 
 
1754
  expected_output = svntest.verify.UnorderedOutput([
 
1755
    '\'iota\' locked by user \'jrandom\'.\n',
 
1756
    '\'%s\' locked by user \'jrandom\'.\n' % os.path.join('A', 'D', 'H', 'chi'),
 
1757
    '\'%s\' locked by user \'jrandom\'.\n' % os.path.join('A', 'mu'),
 
1758
  ])
 
1759
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1760
                                     'lock', sbox.ospath('A/D/H/chi'),
 
1761
                                             sbox.ospath('A/mu'),
 
1762
                                             sbox.ospath('iota'))
 
1763
 
 
1764
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
1765
  expected_status.tweak('A/D/H/chi', 'A/mu', 'iota', writelocked='K')
 
1766
 
 
1767
  # Make sure the file is still locked
 
1768
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
1769
 
 
1770
  expected_output = svntest.wc.State(wc_dir, {
 
1771
  })
 
1772
 
 
1773
  expected_status.tweak(wc_rev=2)
 
1774
  expected_status.tweak('', wc_rev=1)
 
1775
  expected_status.tweak('iota', writelocked='K', wc_rev=1)
 
1776
 
 
1777
  switched_status = expected_status.copy()
 
1778
  switched_status.tweak(writelocked=None)
 
1779
  switched_status.tweak('iota', writelocked='K')
 
1780
  switched_status.tweak('A', switched='S')
 
1781
 
 
1782
  svntest.actions.run_and_verify_switch(wc_dir, sbox.ospath('A'),
 
1783
                                        repo_url + '/AA',
 
1784
                                        expected_output, None, switched_status)
 
1785
 
 
1786
  # And now switch back to verify that the locks reappear
 
1787
  expected_output = svntest.wc.State(wc_dir, {
 
1788
  })
 
1789
  svntest.actions.run_and_verify_switch(wc_dir, sbox.ospath('A'),
 
1790
                                        repo_url + '/A',
 
1791
                                        expected_output, None, expected_status)
 
1792
 
 
1793
@Issue(4304)
 
1794
def lock_unlock_deleted(sbox):
 
1795
  "lock/unlock a deleted file"
 
1796
 
 
1797
  sbox.build()
 
1798
  wc_dir = sbox.wc_dir
 
1799
  svntest.actions.run_and_verify_svn(None, None, [],
 
1800
                                     'rm', sbox.ospath('A/mu'))
 
1801
 
 
1802
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
1803
  expected_status.tweak('A/mu', status='D ')
 
1804
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
1805
 
 
1806
  expected_output = '\'mu\' locked by user \'jrandom\'.'
 
1807
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1808
                                     'lock', sbox.ospath('A/mu'))
 
1809
  expected_status.tweak('A/mu', writelocked='K')
 
1810
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
1811
 
 
1812
  expected_output = '\'mu\' unlocked.'
 
1813
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1814
                                     'unlock', sbox.ospath('A/mu'))
 
1815
  expected_status.tweak('A/mu', writelocked=None)
 
1816
  svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
1817
 
 
1818
@Issue(4369)
 
1819
def commit_stolen_lock(sbox):
 
1820
  "commit with a stolen lock"
 
1821
 
 
1822
  sbox.build()
 
1823
  wc_dir = sbox.wc_dir
 
1824
 
 
1825
  sbox.simple_append('A/mu', 'zig-zag')
 
1826
  sbox.simple_lock('A/mu')
 
1827
 
 
1828
  expected_output = '\'mu\' locked by user \'jrandom\'.'
 
1829
  svntest.actions.run_and_verify_svn(None, expected_output, [],
 
1830
                                     'lock', '--force',
 
1831
                                     sbox.repo_url + '/A/mu')
 
1832
 
 
1833
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
1834
  expected_status.tweak('A/mu', status='M ', writelocked='T')
 
1835
  err_re = "(.*E160037: Cannot verify lock on path '/A/mu')|" + \
 
1836
           "(.*E160038: '/.*/A/mu': no lock token available)"
 
1837
  svntest.actions.run_and_verify_commit(wc_dir,
 
1838
                                        [],
 
1839
                                        expected_status,
 
1840
                                        err_re,
 
1841
                                        wc_dir)
 
1842
 
 
1843
# When removing directories, the locks of contained files were not 
 
1844
# correctly removed from the working copy database, thus they later 
 
1845
# magically reappeared when new files or directories with the same
 
1846
# pathes were added.
 
1847
@Issue(4364)
 
1848
def drop_locks_on_parent_deletion(sbox):
 
1849
  "drop locks when the parent is deleted"
 
1850
 
 
1851
  sbox.build()
 
1852
  wc_dir = sbox.wc_dir
 
1853
 
 
1854
  # lock some files, and remove them.
 
1855
  sbox.simple_lock('A/B/lambda')
 
1856
  sbox.simple_lock('A/B/E/alpha')
 
1857
  sbox.simple_lock('A/B/E/beta')
 
1858
  sbox.simple_rm('A/B')
 
1859
  
 
1860
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
1861
  expected_status.remove_subtree('A/B')
 
1862
  
 
1863
  svntest.actions.run_and_verify_commit(wc_dir,
 
1864
                                        [],
 
1865
                                        expected_status,
 
1866
                                        None,
 
1867
                                        wc_dir)
 
1868
 
 
1869
  # now re-add entities to the deleted pathes.
 
1870
  sbox.simple_mkdir('A/B')
 
1871
  sbox.simple_add_text('new file replacing old file', 'A/B/lambda')
 
1872
  sbox.simple_add_text('file replacing former dir', 'A/B/F')
 
1873
  # The bug also resurrected locks on directories when their path
 
1874
  # matched a former file.
 
1875
  sbox.simple_mkdir('A/B/E', 'A/B/E/alpha')
 
1876
    
 
1877
  expected_status = svntest.actions.get_virginal_state(wc_dir, 1)
 
1878
  expected_status.tweak('A/B',
 
1879
                                                'A/B/E',
 
1880
                                                'A/B/E/alpha',
 
1881
                                                'A/B/F',
 
1882
                                                'A/B/lambda',
 
1883
                                                wc_rev='3')
 
1884
  expected_status.remove('A/B/E/beta')
 
1885
   
 
1886
  svntest.actions.run_and_verify_commit(wc_dir,
 
1887
                                        [],
 
1888
                                        expected_status,
 
1889
                                        None,
 
1890
                                        wc_dir)
 
1891
        
 
1892
                                                                                
1754
1893
########################################################################
1755
1894
# Run the tests
1756
1895
 
1799
1938
              update_locked_deleted,
1800
1939
              block_unlock_if_pre_unlock_hook_fails,
1801
1940
              lock_invalid_token,
 
1941
              lock_multi_wc,
 
1942
              locks_stick_over_switch,
 
1943
              lock_unlock_deleted,
 
1944
              commit_stolen_lock,
 
1945
              drop_locks_on_parent_deletion,
1802
1946
            ]
1803
1947
 
1804
1948
if __name__ == '__main__':