[MERGE] Change FileNames allocation strategy
John Arbash Meinel
john at arbash-meinel.com
Wed Aug 8 15:32:54 BST 2007
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Robert Collins wrote:
> Robert Collins has voted approve.
> Status is now: Resubmit
> Comment:
> Oh, I didn't mean to leave the keyword there. So this should be
> + def allocate(self):
^- I think you mean "def allocate(self, name):"
John
=:->
> + """Allocate name in the names collection.
> +
> + :param name: The name to allocate.
> + :raises: bzrlib.errors.DuplicateKey if the name is
> already allocated.
> + """
> + if len(self._names) >= self._cap:
> + raise errors.BzrError('too many files')
> + if name in self._names:
> + raise errors.DuplicateKey(name)
> + self._names.add(name)
> + return name
>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGudQVJdeBCYSNAAMRAmzyAJ9Z4cBMYp4kIZBe2V5Lu3WHDGrY2QCgq6K1
uC1zT6mBveMJYaVOODGtLpA=
=na1M
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list