view tests/test-convert-bzr-treeroot.t @ 22104:70bdf59d27b6

run-tests: attempt to fix iolock handling Ideally, when using -j and -i together, when a prompt comes up, we'd like all other output to wait (but testing to continue!). This gets other output to wait by adding back a bunch of the locking that formerly existed. We switch to a recursive lock to deal with the restructuring due to unittest compatibility. Running tests continue to run, but now the scheduler doesn't schedule any new tasks while waiting at a prompt because no task slots become available due to result output happening in the thread and blocking on the iolock.
author Matt Mackall <mpm@selenic.com>
date Mon, 11 Aug 2014 17:45:50 -0500
parents f2719b387380
children 89872688893f
line wrap: on
line source


  $ . "$TESTDIR/bzr-definitions"
  $ cat > treeset.py <<EOF
  > import sys
  > from bzrlib import workingtree
  > wt = workingtree.WorkingTree.open('.')
  > 
  > message, rootid = sys.argv[1:]
  > wt.set_root_id('tree_root-%s' % rootid)
  > wt.commit(message)
  > EOF

change the id of the tree root

  $ mkdir test-change-treeroot-id
  $ cd test-change-treeroot-id
  $ bzr init -q source
  $ cd source
  $ echo content > file
  $ bzr add -q file
  $ bzr commit -q -m 'Initial add'
  $ python ../../treeset.py 'Changed root' new
  $ cd ..
  $ hg convert source source-hg
  initializing destination source-hg repository
  scanning source...
  sorting...
  converting...
  1 Initial add
  0 Changed root
  $ manifest source-hg tip
  % manifest of tip
  644   file

  $ cd ..