~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-12 06:32:29 UTC
  • mfrom: (4123.1.4 bzr.ab.integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090312063229-ucuyuhmuc7ya8e54
(bpierre, abentley) Fix cleanup when unversioned files specified.

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
        """
44
44
        self.work_tree = work_tree
45
45
        self.work_transform = transform.TreeTransform(work_tree)
46
 
        self.target_tree = target_tree
47
 
        self.shelf_transform = transform.TransformPreview(self.target_tree)
48
 
        self.renames = {}
49
 
        self.creation = {}
50
 
        self.deletion = {}
51
 
        self.iter_changes = work_tree.iter_changes(self.target_tree,
52
 
                                                   specific_files=file_list)
 
46
        try:
 
47
            self.target_tree = target_tree
 
48
            self.shelf_transform = transform.TransformPreview(self.target_tree)
 
49
            try:
 
50
                self.renames = {}
 
51
                self.creation = {}
 
52
                self.deletion = {}
 
53
                self.iter_changes = work_tree.iter_changes(
 
54
                    self.target_tree, specific_files=file_list)
 
55
            except:
 
56
                self.shelf_transform.finalize()
 
57
                raise
 
58
        except:
 
59
            self.work_transform.finalize()
 
60
            raise
53
61
 
54
62
    def iter_shelvable(self):
55
63
        """Iterable of tuples describing shelvable changes.