[MERGE] Fix test run from non-branch in repo

James Westby jw+debian at jameswestby.net
Tue Jan 16 19:58:20 GMT 2007


Hi all,

I tracked down the reason that the tests were failing from within
builddeb. Before it runs the build it exports to avoid .bzr/ being in
the source. I however use repositories and so it was still beneath one.
This confused the check whether it was running in a branch and so an
exception was raised.

The attached bundle merely adds the NoWorkingTree exception to list of
errors that indicate we are not in a branch.

For completeness the traceback:

ERROR: test_selftest.TestRunner.test_bench_history
    No WorkingTree exists for file:///home/jw2328/devel/bzr/.bzr/checkout/.


======================================================================
ERROR: test_bench_history (bzrlib.tests.test_selftest.TestRunner)

vvvv[log from bzrlib.tests.test_selftest.TestRunner.test_bench_history]-------

^^^^[log from bzrlib.tests.test_selftest.TestRunner.test_bench_history]-------
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/jw2328/devel/bzr/daily/build-area/bzr-0.13+20070116auto-1/bzrlib/tests/test_selftest.py", line 726, in test_bench_history
    workingtree = _get_bzr_source_tree()
  File "/home/jw2328/devel/bzr/daily/build-area/bzr-0.13+20070116auto-1/bzrlib/version.py", line 65, in _get_bzr_source_tree
    return WorkingTree.open_containing(__file__)[0]
  File "/home/jw2328/devel/bzr/daily/build-area/bzr-0.13+20070116auto-1/bzrlib/workingtree.py", line 350, in open_containing
    return control.open_workingtree(), relpath
  File "/home/jw2328/devel/bzr/daily/build-area/bzr-0.13+20070116auto-1/bzrlib/bzrdir.py", line 1015, in open_workingtree
    format = WorkingTreeFormat.find_format(self)
  File "/home/jw2328/devel/bzr/daily/build-area/bzr-0.13+20070116auto-1/bzrlib/workingtree.py", line 1912, in find_format
    raise errors.NoWorkingTree(base=transport.base)
NoWorkingTree: No WorkingTree exists for file:///home/jw2328/devel/bzr/.bzr/checkout/.

Thanks,

James

-- 
  James Westby   --    GPG Key ID: B577FE13    --     http://jameswestby.net/
  seccure key - (3+)k7|M*edCX/.A:n*N!>|&7U.L#9E)Tu)T0>AM - secp256r1/nistp256




More information about the bazaar mailing list