~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/workingtree.py

  • Committer: Aaron Bentley
  • Date: 2012-07-13 17:23:12 UTC
  • mto: This revision was merged to the branch mainline in revision 6540.
  • Revision ID: aaron@aaronbentley.com-20120713172312-0qsmwmef3pvmleoq
ImplementĀ WorkingTree.get_uncommitted_data

Show diffs side-by-side

added added

removed removed

Lines of Context:
1368
1368
            self.unlock()
1369
1369
        note('Uncommitted changes stored in branch "%s".', self.branch.nick)
1370
1370
 
 
1371
    def get_uncommitted_data(self):
 
1372
        base_revision_id, records = self.branch.get_uncommitted_data()
 
1373
        if base_revision_id is None:
 
1374
            return None, None
 
1375
        try:
 
1376
            base_tree = self.revision_tree(base_revision_id)
 
1377
        except errors.NoSuchRevisionInTree:
 
1378
            repo = self.branch.repository
 
1379
            base_tree = repo.revision_tree(base_revision_id)
 
1380
        tt = transform.TransformPreview(base_tree)
 
1381
        tt.deserialize(records)
 
1382
        return base_tree, tt
 
1383
 
1371
1384
    def revision_tree(self, revision_id):
1372
1385
        """See Tree.revision_tree.
1373
1386