~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: Alexander Belchenko
  • Date: 2007-11-19 22:54:30 UTC
  • mfrom: (3006 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3008.
  • Revision ID: bialix@ukr.net-20071119225430-x0ewosrsagis0yno
merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
720
720
                if from_missing: # implicitly just update our path mapping
721
721
                    move_file = False
722
722
                elif not after:
723
 
                    raise errors.RenameFailedFilesExist(from_rel, to_rel,
724
 
                        extra="(Use --after to update the Bazaar id)")
 
723
                    raise errors.RenameFailedFilesExist(from_rel, to_rel)
725
724
 
726
725
            rollbacks = []
727
726
            def rollback_rename():
1256
1255
        """See WorkingTreeFormat.get_format_description()."""
1257
1256
        return "Working tree format 4"
1258
1257
 
1259
 
    def initialize(self, a_bzrdir, revision_id=None):
 
1258
    def initialize(self, a_bzrdir, revision_id=None, from_branch=None):
1260
1259
        """See WorkingTreeFormat.initialize().
1261
1260
 
1262
1261
        :param revision_id: allows creating a working tree at a different
1272
1271
        control_files.create_lock()
1273
1272
        control_files.lock_write()
1274
1273
        control_files.put_utf8('format', self.get_format_string())
1275
 
        branch = a_bzrdir.open_branch()
 
1274
        if from_branch is not None:
 
1275
            branch = from_branch
 
1276
        else:
 
1277
            branch = a_bzrdir.open_branch()
1276
1278
        if revision_id is None:
1277
1279
            revision_id = branch.last_revision()
1278
1280
        local_path = transport.local_abspath('dirstate')