Occasional AttributeError from Tree.get_file_by_path
John Arbash Meinel
john at arbash-meinel.com
Tue Oct 26 14:04:23 BST 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
...
> OK, I'll report it and submit a fix. Tree does have path2id, however I'm
> getting lost here as all it does is:
>
> return self._inventory.path2id(path)
>
> the only difference is that path2id is decorated with @needs_read_lock
>
> Still, if you agree this is right, I'll just do that.
It is correct. WorkingTree.path2id has a custom implementation. (If not
WT, then WT4 does.)
>
>> Also, WT.get_file_by_path should really be special cased, because it
>> easily thinks in terms of path. The only question is whether the command
>> should fail if the file isn't versioned...
>
> ATM it will fail as path2id will return None and get_file(None) throws an
> error. Do you mean in case of a WorkingTree it shouldn't fail?
>
>
It is an open question about what it *should* do. :)
John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkzG0dcACgkQJdeBCYSNAAMRoQCgvuG1Mvetzm1JEctQylIKqlRm
sbwAnRuC3OXs41tpiQ9C1fl/I3wfFdbm
=2t7d
-----END PGP SIGNATURE-----
More information about the bazaar
mailing list