/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

Switched to build_tree instead of revert

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
                           NotBranchError,
62
62
                           NoSuchFile,
63
63
                           NotVersionedError)
64
 
from bzrlib.inventory import InventoryEntry
 
64
from bzrlib.inventory import InventoryEntry, Inventory
65
65
from bzrlib.lockable_files import LockableFiles
66
66
from bzrlib.merge import merge_inner, transform_tree
67
67
from bzrlib.osutils import (appendpath,
86
86
from bzrlib.textui import show_status
87
87
import bzrlib.tree
88
88
from bzrlib.trace import mutter
 
89
from bzrlib.transform import build_tree
89
90
from bzrlib.transport import get_transport
90
91
from bzrlib.transport.local import LocalTransport
91
92
import bzrlib.xml5
1309
1310
            finally:
1310
1311
                branch.unlock()
1311
1312
        revision = branch.last_revision()
1312
 
        basis_tree = branch.repository.revision_tree(revision)
1313
 
        inv = basis_tree.inventory
 
1313
        inv = Inventory() 
1314
1314
        wt = WorkingTree(a_bzrdir.root_transport.base,
1315
1315
                         branch,
1316
1316
                         inv,
1321
1321
        wt.set_root_id(inv.root.file_id)
1322
1322
        wt.set_last_revision(revision)
1323
1323
        wt.set_pending_merges([])
1324
 
        wt.revert([])
 
1324
        build_tree(wt.basis_tree(), wt)
1325
1325
        return wt
1326
1326
 
1327
1327
    def __init__(self):
1369
1369
        branch = a_bzrdir.open_branch()
1370
1370
        if revision_id is None:
1371
1371
            revision_id = branch.last_revision()
1372
 
        new_basis_tree = branch.repository.revision_tree(revision_id)
1373
 
        inv = new_basis_tree.inventory
 
1372
        inv = Inventory() 
1374
1373
        wt = WorkingTree3(a_bzrdir.root_transport.base,
1375
1374
                         branch,
1376
1375
                         inv,
1381
1380
        wt.set_root_id(inv.root.file_id)
1382
1381
        wt.set_last_revision(revision_id)
1383
1382
        wt.set_pending_merges([])
1384
 
        wt.revert([])
 
1383
        build_tree(wt.basis_tree(), wt)
1385
1384
        return wt
1386
1385
 
1387
1386
    def __init__(self):