~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Robert Collins
  • Date: 2007-03-05 01:15:25 UTC
  • mto: (2255.11.4 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070305011525-fakb9irlbxyxaukb
Change _iter_changes interface to yield both old and new paths.

Show diffs side-by-side

added added

removed removed

Lines of Context:
607
607
 
608
608
        old_rh = branch_to.revision_history()
609
609
        if tree_to is not None:
610
 
            # lock the tree we are pulling too, so that its inventory is
611
 
            # stable. This is a hack to workaround the _iter_changes interface
612
 
            # not exposing the old path, which will be fixed soon. RBC 20070301
613
 
            tree_to.lock_write()
614
 
            try:
615
 
                count = tree_to.pull(branch_from, overwrite, rev_id,
616
 
                    delta.ChangeReporter(tree_to.inventory))
617
 
            finally:
618
 
                tree_to.unlock()
 
610
            count = tree_to.pull(branch_from, overwrite, rev_id,
 
611
                delta.ChangeReporter())
619
612
        else:
620
613
            count = branch_to.pull(branch_from, overwrite, rev_id)
621
614
        note('%d revision(s) pulled.' % (count,))
2484
2477
        #      However, cmd_merge open's its own tree in _merge_helper, which
2485
2478
        #      means if we lock here, the later lock_write() will always block.
2486
2479
        #      Either the merge helper code should be updated to take a tree,
2487
 
        #      or the ChangeReporter should be updated to not require an
2488
 
        #      inventory. (What about tree.merge_from_branch?)
 
2480
        #      (What about tree.merge_from_branch?)
2489
2481
        tree = WorkingTree.open_containing(directory)[0]
2490
 
        tree.lock_read()
2491
 
        try:
2492
 
            change_reporter = delta.ChangeReporter(tree.inventory)
2493
 
        finally:
2494
 
            tree.unlock()
 
2482
        change_reporter = delta.ChangeReporter()
2495
2483
 
2496
2484
        if branch is not None:
2497
2485
            try: