~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Robert Collins
  • Date: 2007-03-01 03:20:19 UTC
  • mto: (2255.11.3 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070301032019-s9lbs2lv8xa6zqxk
Fix WorkingTree4.move to return the moved paths, and update the tree implementation tests for move to check them.

Show diffs side-by-side

added added

removed removed

Lines of Context:
443
443
    @needs_tree_write_lock
444
444
    def move(self, from_paths, to_dir, after=False):
445
445
        """See WorkingTree.move()."""
 
446
        result = []
446
447
        if not from_paths:
447
 
            return ()
 
448
            return result
448
449
 
449
450
        state = self.current_dirstate()
450
451
 
652
653
            except:
653
654
                rollback_rename()
654
655
                raise
 
656
            result.append((from_rel, to_rel))
655
657
            state._dirblock_state = dirstate.DirState.IN_MEMORY_MODIFIED
656
658
            self._dirty = True
657
659
 
658
 
        return #rename_tuples
 
660
        return result
659
661
 
660
662
    def _new_tree(self):
661
663
        """Initialize the state in this tree to be a new tree."""