[PLUGIN] bzr changeset, time to pull again

John A Meinel john at arbash-meinel.com
Thu Jul 7 09:20:22 BST 2005


Robey Pointer wrote:

>
> On 4 Jul 2005, at 16:42, John A Meinel wrote:
>
>> Robey Pointer wrote:
>>
>>
>>> If you normalize the path, then "//" would be an unambiguous
>>> terminator (and you could follow with spaces for readability):
>>>
>> You actually bring up a potentially better solution. Make the  separator
>> ' // ' Then things look like
>> landing/on/the moon.txt // file-id:the
>> moon.txt-12389127-123871223784 //
>> text-id:the moon.txt-123123123
>>
>> You can also detect files that end in a space, because they will have
>> too many spaces.
>> So you would have:
>>
>> myfile  // file-id:myfile -1231231235-134134 // text-id:myfile
>> -12312312-123123
>>
>> And parsing becomes a simple:
>> parts = txt.split(' // ')
>
>
> Actually if you did something like this
>
> def quote_path(s):
>     s = s.encode('unicode_escape')
>     if s[0] == ' ':
>         s = '\\u0020' + s[1:]
>     if s[-1] == ' ':
>         s = s[:-1] + '\\u0020'
>     return s
>
> then the path would be guaranteed not to start or end with a space,
> and you could do split('//') and strip() the elements.
>
> I'm probably overthinking this. :)

I would generally like to avoid escaped characters (especially an
escaped space).
These are meant to be human readable changesets, and I think seeing
"my\u0020file.txt" is pretty ugly.

>
> robey
>
>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 253 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050707/7338fef6/attachment.pgp 


More information about the bazaar mailing list