~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree_4.py

  • Committer: John Arbash Meinel
  • Date: 2011-01-25 22:54:08 UTC
  • mto: This revision was merged to the branch mainline in revision 5636.
  • Revision ID: john@arbash-meinel.com-20110125225408-w5b5mmh117q4jjz1
Implement a reset-to-known-state ability for DirState.

Use this in reset_state(). Allow it to use header information if it can
be parsed, otherwise allow us to pass in the information.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1307
1307
                _mod_revision.NULL_REVISION)
1308
1308
            trees = []
1309
1309
        else:
1310
 
            trees = self.branch.repository.revision_trees(revision_ids)
1311
 
            base_tree = trees[0]
 
1310
            trees = zip(revision_ids,
 
1311
                        self.branch.repository.revision_trees(revision_ids))
 
1312
            base_tree = trees.pop(0)[1]
1312
1313
        state = self.current_dirstate()
1313
 
        self.set_par
1314
 
        self._write_inventory(rt.inventory)
1315
 
        self.set_parent_ids(revision_ids)
 
1314
        # We don't support ghosts yet
 
1315
        state.set_state_from_scratch(base_tree.inventory, trees, [])
1316
1316
 
1317
1317
 
1318
1318
class ContentFilterAwareSHA1Provider(dirstate.SHA1Provider):