~ubuntu-branches/ubuntu/saucy/bzr/saucy

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-12-13 17:46:53 UTC
  • mfrom: (3815.3552.5 upstream)
  • Revision ID: jelmer@samba.org-20121213174653-hy4ie5wue839uyq3
Merging shared upstream rev into target branch.

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."""