/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/transform.py

MergeĀ lp:bzr.

Show diffs side-by-side

added added

removed removed

Lines of Context:
40
40
    revision as _mod_revision,
41
41
    trace,
42
42
    ui,
 
43
    urlutils,
43
44
    )
44
45
""")
45
46
from bzrlib.errors import (DuplicateKey, MalformedTransform, NoSuchFile,
64
65
    deprecated_method,
65
66
    )
66
67
from bzrlib.trace import warning
67
 
import bzrlib.ui
68
 
import bzrlib.urlutils as urlutils
69
68
 
70
69
 
71
70
ROOT_PARENT = "root-parent"
1677
1676
        """
1678
1677
        if not no_conflicts:
1679
1678
            self._check_malformed()
1680
 
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1679
        child_pb = ui.ui_factory.nested_progress_bar()
1681
1680
        try:
1682
1681
            if precomputed_delta is None:
1683
1682
                child_pb.update('Apply phase', 0, 2)
1710
1709
    def _generate_inventory_delta(self):
1711
1710
        """Generate an inventory delta for the current transform."""
1712
1711
        inventory_delta = []
1713
 
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1712
        child_pb = ui.ui_factory.nested_progress_bar()
1714
1713
        new_paths = self._inventory_altered()
1715
1714
        total_entries = len(new_paths) + len(self._removed_id)
1716
1715
        try:
1778
1777
        """
1779
1778
        tree_paths = list(self._tree_path_ids.iteritems())
1780
1779
        tree_paths.sort(reverse=True)
1781
 
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1780
        child_pb = ui.ui_factory.nested_progress_bar()
1782
1781
        try:
1783
1782
            for num, data in enumerate(tree_paths):
1784
1783
                path, trans_id = data
1813
1812
        modified_paths = []
1814
1813
        new_path_file_ids = dict((t, self.final_file_id(t)) for p, t in
1815
1814
                                 new_paths)
1816
 
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
1815
        child_pb = ui.ui_factory.nested_progress_bar()
1817
1816
        try:
1818
1817
            for num, (path, trans_id) in enumerate(new_paths):
1819
1818
                if (num % 10) == 0:
2431
2430
        if num > 0:  # more than just a root
2432
2431
            raise errors.WorkingTreeAlreadyPopulated(base=wt.basedir)
2433
2432
    file_trans_id = {}
2434
 
    top_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
2433
    top_pb = ui.ui_factory.nested_progress_bar()
2435
2434
    pp = ProgressPhase("Build phase", 2, top_pb)
2436
2435
    if tree.inventory.root is not None:
2437
2436
        # This is kind of a hack: we should be altering the root
2450
2449
        pp.next_phase()
2451
2450
        file_trans_id[wt.get_root_id()] = \
2452
2451
            tt.trans_id_tree_file_id(wt.get_root_id())
2453
 
        pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
2452
        pb = ui.ui_factory.nested_progress_bar()
2454
2453
        try:
2455
2454
            deferred_contents = []
2456
2455
            num = 0
2780
2779
def _prepare_revert_transform(working_tree, target_tree, tt, filenames,
2781
2780
                              backups, pp, basis_tree=None,
2782
2781
                              merge_modified=None):
2783
 
    child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
2782
    child_pb = ui.ui_factory.nested_progress_bar()
2784
2783
    try:
2785
2784
        if merge_modified is None:
2786
2785
            merge_modified = working_tree.merge_modified()
2789
2788
                                      merge_modified, basis_tree)
2790
2789
    finally:
2791
2790
        child_pb.finished()
2792
 
    child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
2791
    child_pb = ui.ui_factory.nested_progress_bar()
2793
2792
    try:
2794
2793
        raw_conflicts = resolve_conflicts(tt, child_pb,
2795
2794
            lambda t, c: conflict_pass(t, c, target_tree))