~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/commit.py

Stop accepting non-existant files in commit (#50793)

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
 
72
72
from cStringIO import StringIO
73
73
 
 
74
from bzrlib import tree
74
75
import bzrlib.config
75
76
import bzrlib.errors as errors
76
77
from bzrlib.errors import (BzrError, PointlessCommit,
277
278
            self.work_inv = self.work_tree.inventory
278
279
            self.basis_tree = self.work_tree.basis_tree()
279
280
            self.basis_inv = self.basis_tree.inventory
 
281
            if specific_files is not None:
 
282
                # Ensure specified files are versioned
 
283
                # (We don't actually need the ids here)
 
284
                tree.find_ids_across_trees(specific_files, 
 
285
                                           [self.basis_tree, self.work_tree])
280
286
            # one to finish, one for rev and inventory, and one for each
281
287
            # inventory entry, and the same for the new inventory.
282
288
            # note that this estimate is too long when we do a partial tree