confusion in transform.py

Robert Collins robertc at robertcollins.net
Fri Feb 6 03:34:13 GMT 2009


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.

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/c86f5c6d/attachment-0001.pgp 


More information about the bazaar mailing list