confusion in transform.py
Robert Collins
robertc at robertcollins.net
Fri Feb 6 03:38:31 GMT 2009
Errata in my mail:
On Fri, 2009-02-06 at 14:34 +1100, Robert Collins wrote:
> There seems to be some confusion in transform.py between file ids and
> transaction ids.
>
> For instance,
>
> # Set of file_ids that will be removed
> self._removed_id = set()
> ...
> ... - as trans_id
> def unversion_file(self, trans_id):
> """Schedule a path entry to become unversioned"""
> self._removed_id.add(trans_id)
> ...
> ... - and these two examples as file_ids; I think that these are bugs
> and will just fix. I'm wondering if there is some slightly different
> hungarian approach we could use to prevent authors making the same
> mistake. e.g. suffixing with _tid rather than _id.
The first of the two examples below is fine; there is only one buggy
line.
> tree_ids.difference_update(self._transform.tree_file_id(t)
> for t in self._transform._removed_id)
> ...
> elif file_id in self._transform._removed_id:
>
>
> I think the the latter two are the only cases of this confusion in
> transform.py; I haven't done a full code audit though.
>
> I'd appreciate it Aaron, if you could confirm that this actually is
> confusion and not deliberate - I'll have a patch up soon.
>
> -Rob
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090206/a0aa496c/attachment.pgp
More information about the bazaar
mailing list