~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_merge_core.py

Made the merge internals private

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
import os.path
2
2
 
3
 
import changeset
4
 
from changeset import Inventory, apply_changeset, invert_dict
 
3
from bzrlib import _changeset
 
4
from _changeset import Inventory, apply_changeset, invert_dict
5
5
from bzrlib.osutils import backup_file, rename, pathjoin
6
6
from bzrlib.merge3 import Merge3
7
7
import bzrlib
8
8
from bzrlib.atomicfile import AtomicFile
9
 
from changeset import get_contents
 
9
from _changeset import get_contents
10
10
 
11
11
 
12
12
class ApplyMerge3:
168
168
 
169
169
def make_merge_changeset(cset, this, base, other, 
170
170
                         conflict_handler, merge_factory):
171
 
    new_cset = changeset.Changeset()
 
171
    new_cset = _changeset.Changeset()
172
172
 
173
173
    for entry in cset.entries.itervalues():
174
174
        if entry.is_boring():
252
252
 
253
253
    old_path = get_path(old_name, old_parent)
254
254
        
255
 
    new_entry = changeset.ChangesetEntry(entry.id, old_parent, old_path)
 
255
    new_entry = _changeset.ChangesetEntry(entry.id, old_parent, old_path)
256
256
    new_entry.new_path = get_path(new_name, new_parent)
257
257
    new_entry.new_parent = new_parent
258
258
    mutter(repr(new_entry))
274
274
                                                      other.id2path(entry.id))
275
275
        return merge_factory(entry.id, base, other)
276
276
 
277
 
    if isinstance(contents, changeset.ReplaceContents):
 
277
    if isinstance(contents, _changeset.ReplaceContents):
278
278
        base_contents = contents.old_contents
279
279
        other_contents = contents.new_contents
280
280
        if base_contents is None and other_contents is None:
298
298
                else:
299
299
                    conflict_handler.new_contents_conflict(this_path, 
300
300
                        other_contents)
301
 
        elif isinstance(base_contents, changeset.TreeFileCreate) and \
302
 
            isinstance(other_contents, changeset.TreeFileCreate):
 
301
        elif isinstance(base_contents, _changeset.TreeFileCreate) and \
 
302
            isinstance(other_contents, _changeset.TreeFileCreate):
303
303
            return make_merge()
304
304
        else:
305
305
            this_contents = get_contents(this, entry.id)
320
320
    metadata = entry.metadata_change
321
321
    if metadata is None:
322
322
        return None
323
 
    assert isinstance(metadata, changeset.ChangeExecFlag)
 
323
    assert isinstance(metadata, _changeset.ChangeExecFlag)
324
324
    if metadata.new_exec_flag is None:
325
325
        return None
326
326
    elif metadata.old_exec_flag is None: