[MERGE] don't accept unversioned files for commit (#50793)
John Arbash Meinel
john at arbash-meinel.com
Fri Sep 22 20:22:30 BST 2006
Aaron Bentley wrote:
> Hi all,
>
> This patch fixes commit so it doesn't accept unversioned files. The
> file must be versioned in either basis tree or the working tree.
>
> This fixes one aspect of #50793 (which is rather generic).
> https://launchpad.net/products/bzr/+bug/50793
>
> Aaron
v-- I would fix the import lines to read:
from bzrlib import (
errors,
tree,
)
And then get rid of the import bzrlib.errors as errors. (And if there
are other imports like this, do that as well.
+from bzrlib import tree
import bzrlib.config
import bzrlib.errors as errors
from bzrlib.errors import (BzrError, PointlessCommit,
@@ -277,6 +278,11 @@
self.work_inv = self.work_tree.inventory
self.basis_tree = self.work_tree.basis_tree()
self.basis_inv = self.basis_tree.inventory
+ if specific_files is not None:
+ # Ensure specified files are versioned
+ # (We don't actually need the ids here)
+ tree.find_ids_across_trees(specific_files,
+ [self.basis_tree,
self.work_tree])
# one to finish, one for rev and inventory, and one for each
# inventory entry, and the same for the new inventory.
# note that this estimate is too long when we do a partial tree
^- This feels a little bit like we are doing some work, and then
throwing it away. But I think it covers up our mistake, which is
probably sufficient for now.
So you have my +1 for 0.11.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060922/a657bc5e/attachment.pgp
More information about the bazaar
mailing list