~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transform.py

  • Committer: Robert Collins
  • Date: 2007-06-04 00:51:54 UTC
  • mfrom: (2504 +trunk)
  • mto: (2507.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2505.
  • Revision ID: robertc@robertcollins.net-20070604005154-yvx2q8jnwiprw6du
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1420
1420
        pp.next_phase()
1421
1421
        child_pb = bzrlib.ui.ui_factory.nested_progress_bar()
1422
1422
        try:
1423
 
            _alter_files(working_tree, target_tree, tt, child_pb,
1424
 
                         filenames, backups)
 
1423
            merge_modified = _alter_files(working_tree, target_tree, tt,
 
1424
                                          child_pb, filenames, backups)
1425
1425
        finally:
1426
1426
            child_pb.finished()
1427
1427
        pp.next_phase()
1439
1439
            warning(conflict)
1440
1440
        pp.next_phase()
1441
1441
        tt.apply()
1442
 
        working_tree.set_merge_modified({})
 
1442
        working_tree.set_merge_modified(merge_modified)
1443
1443
    finally:
1444
1444
        target_tree.unlock()
1445
1445
        tt.finalize()
1505
1505
                elif kind[1] == 'file':
1506
1506
                    tt.create_file(target_tree.get_file_lines(file_id),
1507
1507
                                   trans_id, mode_id)
 
1508
                    if basis_tree is None:
 
1509
                        basis_tree = working_tree.basis_tree()
 
1510
                        basis_tree.lock_read()
 
1511
                    new_sha1 = target_tree.get_file_sha1(file_id)
 
1512
                    if (file_id in basis_tree and new_sha1 ==
 
1513
                        basis_tree.get_file_sha1(file_id)):
 
1514
                        if file_id in merge_modified:
 
1515
                            del merge_modified[file_id]
 
1516
                    else:
 
1517
                        merge_modified[file_id] = new_sha1
 
1518
 
1508
1519
                    # preserve the execute bit when backing up
1509
1520
                    if keep_content and executable[0] == executable[1]:
1510
1521
                        tt.set_executability(executable[1], trans_id)
1523
1534
    finally:
1524
1535
        if basis_tree is not None:
1525
1536
            basis_tree.unlock()
 
1537
    return merge_modified
1526
1538
 
1527
1539
 
1528
1540
def resolve_conflicts(tt, pb=DummyProgress(), pass_func=None):