~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-24 18:26:21 UTC
  • mfrom: (4567 +trunk)
  • mto: This revision was merged to the branch mainline in revision 4568.
  • Revision ID: john@arbash-meinel.com-20090724182621-68s2jhoqf3pn72n7
Merge bzr.dev 4567 to resolve NEWS

Show diffs side-by-side

added added

removed removed

Lines of Context:
1476
1476
        from_tail = splitpath(from_rel)[-1]
1477
1477
        from_id = inv.path2id(from_rel)
1478
1478
        if from_id is None:
1479
 
            raise errors.BzrRenameFailedError(from_rel,to_rel,
1480
 
                errors.NotVersionedError(path=str(from_rel)))
1481
 
        from_entry = inv[from_id]
 
1479
            # if file is missing in the inventory maybe it's in the basis_tree
 
1480
            basis_tree = self.branch.basis_tree()
 
1481
            from_id = basis_tree.path2id(from_rel)
 
1482
            if from_id is None:
 
1483
                raise errors.BzrRenameFailedError(from_rel,to_rel,
 
1484
                    errors.NotVersionedError(path=str(from_rel)))
 
1485
            # put entry back in the inventory so we can rename it
 
1486
            from_entry = basis_tree.inventory[from_id].copy()
 
1487
            inv.add(from_entry)
 
1488
        else:
 
1489
            from_entry = inv[from_id]
1482
1490
        from_parent_id = from_entry.parent_id
1483
1491
        to_dir, to_tail = os.path.split(to_rel)
1484
1492
        to_dir_id = inv.path2id(to_dir)