~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_parents.py

  • Committer: Patch Queue Manager
  • Date: 2012-09-19 08:27:25 UTC
  • mfrom: (6562.1.1 2.6-merge-up-2.5)
  • Revision ID: pqm@pqm.ubuntu.com-20120919082725-dzvmca37zj5xx2hh
(jam) Merge bzr-2.5.2-dev into bzr trunk to get the ConnectionReset
        fixes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
from bzrlib import (
23
23
    errors,
24
 
    osutils,
25
24
    revision as _mod_revision,
26
 
    tests,
27
25
    )
28
26
from bzrlib.inventory import (
29
27
    Inventory,
475
473
        # large hammer, this is a particularly sensitive area of code, so the
476
474
        # extra assurance is well worth it.
477
475
        tree._validate()
478
 
        osutils.rmtree('tree')
 
476
        # If tree.branch is remote
 
477
        if tree.user_url != tree.branch.user_url:
 
478
            # We have a lightweight checkout, delete both locations
 
479
            tree.branch.bzrdir.root_transport.delete_tree('.')
 
480
        tree.bzrdir.root_transport.delete_tree('.')
479
481
 
480
482
    def test_no_parents_just_root(self):
481
483
        """Test doing an empty commit - no parent, set a root only."""