~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jonathan Riddell
  • Date: 2011-10-18 13:31:13 UTC
  • mto: This revision was merged to the branch mainline in revision 6225.
  • Revision ID: jriddell@canonical.com-20111018133113-toh9d2zvjwozorwi
check all files being moved

Show diffs side-by-side

added added

removed removed

Lines of Context:
884
884
        if len(names_list) < 2:
885
885
            raise errors.BzrCommandError(gettext("missing file argument"))
886
886
        tree, rel_names = WorkingTree.open_containing_paths(names_list, canonicalize=False)
887
 
        if rel_names[0] == '':
888
 
            raise errors.BzrCommandError(gettext("can not move root of branch"))
 
887
        for file_name in rel_names[0:-1]:
 
888
            if file_name == '':
 
889
                raise errors.BzrCommandError(gettext("can not move root of branch"))
889
890
        self.add_cleanup(tree.lock_tree_write().unlock)
890
891
        self._run(tree, names_list, rel_names, after)
891
892