post 0.8 development
Jan Hudec
bulb at ucw.cz
Thu May 11 19:57:31 BST 2006
On Thu, May 11, 2006 at 06:36:50 -0700, John A Meinel wrote:
> Jan Hudec wrote:
> > On Wed, May 10, 2006 at 17:20:10 -0700, John A Meinel wrote:
> >> Jan Hudec wrote:
> >>> On Wed, May 10, 2006 at 08:27:33 -0700, John A Meinel wrote:
> >>>> At one point we started using /@, meaning path/to/branch/@1
> >>>> I don't remember the official reasons, but we decided to get rid of that
> >>>> syntax.
> >>>> I'm fine with the comma. I think we should support escaping it, (as in
> >>>> http://path/with\,comma/,1..2) But I'm not settled on that.
> >>> It's an *URL* -- so http://path/with%2ccomma/,1..2
> >> [...]
> >> Except I am frequently testing bzr inside these temporary directories.
> >> And it is a little bit difficult to always write the full file:// url
> >> specifier, just because I have a comma in the path.
> >>
> >> But it isn't terrible.
> >
> > I'd say relative path in this case is a relative resource pointer as per URL
> > definition and therefore can be partially URL-escaped. Thus it'd be:
> > ../relative/path/with%2ccomma/,1..2
> > It has the disadvantage that completion won't help you with this, but the
> > escape character and special character would have that problem no matter what
> > escaping you choose.
> >
> > The problem would be a little smaller if escaping was done by doubling the
> > character, since that would only be one special character instead of two.
> >
>
> Except for the fact that it would imply you have to always type the
> escape characters. So instead of typing:
> bzr status "My Bågfors, %file.txt"
>
> Which you could (potentially) do with a simple My<TAB>, you now have to
> type:
> bzr status My%20B%C3%A5gfors%2C%20%25file.txt
Not really. You'd only have to escape , and % -- *NOTHING* else. So the above
file would be:
bzr status "My Bågfors%2c %25file.txt"
Yes, that still needs to be modified after the completion, but not so much.
Further as long as '%' is not followed by 2 valid hex digits, bzr could
probably understand it and similarly it could understand ',' literally if not
followed by 'revno', 'revid', 'branch', 'tag' and maybe few other keywords.
Therefore actually:
bzr status "My Bågfors, %file.txt"
could just work.
That is actually the *SAME* rules as I hope we agreed upon
> I really want to be able to enter relative paths as plain unicode strings.
> I realize I wrote up a semi-worst case. Much worse is real unicode
> files, like:
>
> bzr status 日本人
> versus
> bzr status %E6%97%A5%E6%9C%AC%E4%BA%BA
bzr status 日本人
would work just that way under my proposal.
> Nobody is going to know what the correct byte sequences are.
> Now, you can argue that we only encode certain characters. But how (at
> this point) do you enter a literal '%' character?
You will have the very same problem with ANY escaping scheme. You always have
to escape the escape character. The best you can get is using the special
character to escape itself, ie. ',,' would mean ','.
--
Jan 'Bulb' Hudec <bulb at ucw.cz>
-------------- 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/20060511/dfca2e65/attachment.pgp
More information about the bazaar
mailing list