Solution for baz2bzr revision ids on windows
John Arbash Meinel
john at arbash-meinel.com
Thu Jan 12 16:35:53 GMT 2006
Aaron Bentley wrote:
> John Arbash Meinel wrote:
>
>>>I would have preferred to have bzr handle some of this internally. But
>>>depending on how we do it, bzr might end up doing the same thing, so we
>>>can just stop translating in baz2bzr if we know that bzr is going to
>>>translate itself.
>
>
> Because these ids will be stored in revision and inventory files
> directly, I believe that would require another namespace upgrade.
>
>
>>>So if I'm understanding you correctly, you are willing to create
>>>'Arch-2' which is a namespace which passes
>>>urllib.quote(x.encode('utf-8')) as the revision-id.
>
>
> Right.
>
>
>>>We have to use a slightly custom quoter, since urllib.quote doesn't
>>>default to escaping '/' => '%2F'.
>
>
> No, see other mail.
>
>
>>>>This would permit using any character as the namespace separator, but
>>>>for the sake of aesthetics, I think we should use a different character.
>>>>Semicolon and comma are my leading candidates.
>>>
>>>
>>>I'm up for either one.
>>>But honestly, we can stick with :, it just becomes:
>>>
>>>Arch-2%3Ajohn%40arbash-meinel.com--2005%2Fmifar--dev--0.6
>>>
>>>This isn't the most aesthetically pleasing entry. But it means it would
>>>be compatible with what bzr might do in the future.
>
>
> Yeah, I guess the aesthetics are pretty much gone anyway.
>
>
>>>def quote(arch_id):
>>> return urllib.quote(arch_id).replace('/', '%2F')
>>>
>>>quote(u'Arch-2:erik at Bågfors.com/test--proj--0.6'.encode('utf-8'))
>>>'Arch-2%3Aerik%40B%C3%A5gfors.com%2Ftest--proj--0.6'
>>>
>>>I didn't think arch-ids could contain non ASCII characters. I thought
>>>that was in the plan, but arch never got that far.
>
>
> Dunno. Maybe it's second system effect, but I'd rather be paranoid.
>
>
>>>If I have to, I can make the time to do this. I need it.
>
>
> I think that would be best.
>
> Aaron
Well, I've implemented new routines for arch->bzr and bzr->arch. The
style I used meant that if you converting using one format, you can
continue converting with a different format.
See my branch here:
http://bzr.arbash-meinel.com/plugins/bzrtools-baz2bzr/
I haven't settled on it. I kind of like the converter, I don't really
like how I hacked the test suite.
I'll probably use it to convert this one time, and then won't look back
until everything else has been sorted out.
If you see any obvious 'don't do it that way' stuff, let me know. I'm
going to kick off the converter, but it takes a couple of hours to
convert everything anyway.
By the way, baz_import doesn't convert branches in archive-order. It
frequently will convert a child branch before its parent, which means it
has to convert all of those revisions multiple times.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060112/51405990/attachment.pgp
More information about the bazaar
mailing list