@SkipUnless(svntest.main.is_threaded_python)
@Issue(4129)
def mergeinfo_race(sbox):
    'concurrent mergeinfo commits invalidate pred-count'
    sbox.build()
    wc_dir = sbox.wc_dir
    wc2_dir = sbox.add_wc_path('2')
    svntest.main.run_svn(None, 'checkout', '-q', sbox.repo_url, wc2_dir)
    svntest.main.run_svn(None, 'mkdir', sbox.ospath('d1', wc_dir))
    svntest.main.run_svn(None, 'mkdir', sbox.ospath('d2', wc2_dir))
    svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/P:42', sbox.ospath('A', wc_dir))
    svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/Q:42', sbox.ospath('iota', wc2_dir))

    def makethread(some_wc_dir):

        def worker():
            svntest.main.run_svn(None, 'commit', '-mm', some_wc_dir)
        return worker
    t1 = threading.Thread(None, makethread(wc_dir))
    t2 = threading.Thread(None, makethread(wc2_dir))
    t1.start()
    t2.start()
    t1.join()
    t2.join()
    if (svntest.actions.run_and_parse_info(sbox.repo_url)[0]['Revision'] != '3'):
        raise svntest.Failure('one or both commits failed')
concurrent mergeinfo commits invalidate pred-count
@SkipUnless(svntest.main.is_threaded_python)
@Issue(4129)
def mergeinfo_race(sbox):
    
    sbox.build()
    wc_dir = sbox.wc_dir
    wc2_dir = sbox.add_wc_path('2')
    svntest.main.run_svn(None, 'checkout', '-q', sbox.repo_url, wc2_dir)
    svntest.main.run_svn(None, 'mkdir', sbox.ospath('d1', wc_dir))
    svntest.main.run_svn(None, 'mkdir', sbox.ospath('d2', wc2_dir))
    svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/P:42', sbox.ospath('A', wc_dir))
    svntest.main.run_svn(None, 'ps', 'svn:mergeinfo', '/Q:42', sbox.ospath('iota', wc2_dir))

    def makethread(some_wc_dir):

        def worker():
            svntest.main.run_svn(None, 'commit', '-mm', some_wc_dir)
        return worker
    t1 = threading.Thread(None, makethread(wc_dir))
    t2 = threading.Thread(None, makethread(wc2_dir))
    t1.start()
    t2.start()
    t1.join()
    t2.join()
    if (svntest.actions.run_and_parse_info(sbox.repo_url)[0]['Revision'] != '3'):
        raise svntest.Failure('one or both commits failed')