~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

Remerge doesn't clear unrelated conflicts

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    repository, log)
29
29
from bzrlib.bundle import read_bundle_from_url
30
30
from bzrlib.bundle.apply_bundle import install_bundle, merge_bundle
 
31
from bzrlib.conflicts import ConflictList
31
32
from bzrlib.commands import Command, display_command
32
33
from bzrlib.errors import (BzrError, BzrCheckError, BzrCommandError, 
33
34
                           NotBranchError, DivergedBranches, NotConflicted,
2186
2187
            base_tree = repository.revision_tree(base_revision)
2187
2188
            other_tree = repository.revision_tree(pending_merges[0])
2188
2189
            interesting_ids = None
 
2190
            new_conflicts = []
 
2191
            conflicts = tree.conflicts()
2189
2192
            if file_list is not None:
2190
2193
                interesting_ids = set()
2191
2194
                for filename in file_list:
2198
2201
                    
2199
2202
                    for name, ie in tree.inventory.iter_entries(file_id):
2200
2203
                        interesting_ids.add(ie.file_id)
 
2204
                new_conflicts = conflicts.select_conflicts(tree, file_list)[0]
2201
2205
            transform_tree(tree, tree.basis_tree(), interesting_ids)
 
2206
            tree.set_conflicts(ConflictList(new_conflicts))
2202
2207
            if file_list is None:
2203
2208
                restore_files = list(tree.iter_conflicts())
2204
2209
            else:
2208
2213
                    restore(tree.abspath(filename))
2209
2214
                except NotConflicted:
2210
2215
                    pass
2211
 
            conflicts =  merge_inner(tree.branch, other_tree, base_tree,
2212
 
                                     this_tree=tree,
2213
 
                                     interesting_ids = interesting_ids, 
2214
 
                                     other_rev_id=pending_merges[0], 
2215
 
                                     merge_type=merge_type, 
2216
 
                                     show_base=show_base,
2217
 
                                     reprocess=reprocess)
 
2216
            conflicts = merge_inner(tree.branch, other_tree, base_tree,
 
2217
                                    this_tree=tree,
 
2218
                                    interesting_ids = interesting_ids, 
 
2219
                                    other_rev_id=pending_merges[0], 
 
2220
                                    merge_type=merge_type, 
 
2221
                                    show_base=show_base,
 
2222
                                    reprocess=reprocess)
2218
2223
        finally:
2219
2224
            tree.unlock()
2220
2225
        if conflicts > 0: