~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Robey Pointer
  • Date: 2006-07-01 19:03:33 UTC
  • mfrom: (1829 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1830.
  • Revision ID: robey@lag.net-20060701190333-f58465aec4bd3412
merge from bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Copyright (C) 2005, 2006 Canonical Ltd
2
 
 
 
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
5
5
# the Free Software Foundation; either version 2 of the License, or
6
6
# (at your option) any later version.
7
 
 
 
7
#
8
8
# This program is distributed in the hope that it will be useful,
9
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
10
10
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
11
# GNU General Public License for more details.
12
 
 
 
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
import os
19
19
import errno
20
20
from tempfile import mkdtemp
 
21
import warnings
21
22
 
22
 
import bzrlib
23
23
from bzrlib.branch import Branch
24
24
from bzrlib.conflicts import ConflictList, Conflict
25
25
from bzrlib.delta import compare_trees
41
41
from bzrlib.osutils import rename, pathjoin, rmtree
42
42
from progress import DummyProgress, ProgressPhase
43
43
from bzrlib.revision import common_ancestor, is_ancestor, NULL_REVISION
44
 
from bzrlib.symbol_versioning import *
45
44
from bzrlib.textfile import check_text_lines
46
45
from bzrlib.trace import mutter, warning, note
47
46
from bzrlib.transform import (TreeTransform, resolve_conflicts, cook_conflicts,
48
47
                              FinalPaths, create_by_entry, unique_add)
49
48
from bzrlib.versionedfile import WeaveMerge
50
 
import bzrlib.ui
 
49
from bzrlib import ui
51
50
 
52
51
# TODO: Report back as changes are merged in
53
52
 
120
119
            changes = compare_trees(self.other_tree, other_basis_tree)
121
120
            if changes.has_changed():
122
121
                raise WorkingTreeNotRevision(self.this_tree)
123
 
            other_rev_id = other_basis
 
122
            other_rev_id = self.other_basis
124
123
            self.other_tree = other_basis_tree
125
124
 
126
125
    def file_revisions(self, file_id):
368
367
        self.tt = TreeTransform(working_tree, self.pb)
369
368
        try:
370
369
            self.pp.next_phase()
371
 
            child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
370
            child_pb = ui.ui_factory.nested_progress_bar()
372
371
            try:
373
372
                for num, file_id in enumerate(all_ids):
374
373
                    child_pb.update('Preparing file merge', num, len(all_ids))
379
378
                child_pb.finished()
380
379
                
381
380
            self.pp.next_phase()
382
 
            child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
 
381
            child_pb = ui.ui_factory.nested_progress_bar()
383
382
            try:
384
383
                fs_conflicts = resolve_conflicts(self.tt, child_pb)
385
384
            finally:
694
693
        if winner == "conflict":
695
694
        # There must be a None in here, if we have a conflict, but we
696
695
        # need executability since file status was not deleted.
697
 
            if self.other_tree.is_executable(file_id) is None:
 
696
            if self.executable(self.other_tree, file_id) is None:
698
697
                winner = "this"
699
698
            else:
700
699
                winner = "other"
896
895
                     branch.get_revision_tree(base_revision))'
897
896
        """
898
897
    if this_tree is None:
899
 
        warn("bzrlib.merge.merge_inner requires a this_tree parameter as of "
 
898
        warnings.warn("bzrlib.merge.merge_inner requires a this_tree parameter as of "
900
899
             "bzrlib version 0.8.",
901
900
             DeprecationWarning,
902
901
             stacklevel=2)