~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/merge.py

  • Committer: Robert Collins
  • Date: 2009-08-20 03:06:50 UTC
  • mto: This revision was merged to the branch mainline in revision 4635.
  • Revision ID: robertc@robertcollins.net-20090820030650-00gim570vd6nra16
Lock the output tree for write in merge.transform_tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
 
65
65
 
66
66
def transform_tree(from_tree, to_tree, interesting_ids=None):
67
 
    merge_inner(from_tree.branch, to_tree, from_tree, ignore_zero=True,
68
 
                interesting_ids=interesting_ids, this_tree=from_tree)
 
67
    from_tree.lock_tree_write()
 
68
    try:
 
69
        merge_inner(from_tree.branch, to_tree, from_tree, ignore_zero=True,
 
70
                    interesting_ids=interesting_ids, this_tree=from_tree)
 
71
    finally:
 
72
        from_tree.unlock()
69
73
 
70
74
 
71
75
class Merger(object):