patch feedback - unicode in store names
Martin Pool
mbp at sourcefrog.net
Thu Dec 8 07:11:54 GMT 2005
On 7 Dec 2005, Robert Collins <robertc at robertcollins.net> wrote:
> I dont recall whose patch this was ...
>
> @@ -585,17 +585,17 @@ class BzrBranch(Branch):
> return ws
>
> if self._branch_format == 4:
> - self.inventory_store = get_store('inventory-store')
> - self.text_store = get_store('text-store')
> - self.revision_store = get_store('revision-store')
> + self.inventory_store = get_store(u'inventory-store')
> + self.text_store = get_store(u'text-store')
> + self.revision_store = get_store(u'revision-store')
>
>
>
> But I'd like to note that this does not *prevent* the bug recurring, it
> only *solves the current one*.
>
> A better patch would be:
>
>
> def get_store(name, compressed=True, prefixed=False):
> # FIXME: This approach of assuming stores are all entirely compressed
> # or entirely uncompressed is tidy, but breaks upgrade from
> # some existing branches where there's a mixture; we probably
> # still want the option to look for both.
> + name = unicode(name)
> relpath = self.control_files._rel_controlfilename(name)
>
>
> This will ensure that all stores are accessed via unicode versions of
> the name, and also happens to be a smaller diff ;).
Alexander Belchenko's, I think. I'll change it as you suggest.
--
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051208/d9f551fb/attachment.pgp
More information about the bazaar
mailing list