sftp url format (was: sftp bugs)

Robey Pointer robey at lag.net
Thu Dec 1 02:24:54 GMT 2005


On 30 Nov 2005, at 17:10, John A Meinel wrote:

> Robert Collins wrote:
>> On Thu, 2005-12-01 at 11:25 +1100, Martin Pool wrote:
>>> On 30 Nov 2005, Jan Hudec <bulb at ucw.cz> wrote:
>>> lftp uses sftp://host/path for absolute, and sftp://host/~/path for
>>> relative, which also seems reasonable.  I'd prefer this but I  
>>> don't have
>>> a strong opinion.
>>
>> I prefer the lftp one *personally*. But the sftp url draft is AFAICT
>> stf66 conformant: urls are allowed to do pretty much anything they  
>> want,
>> because they dont have to be predictable, rather they have to  
>> round trip
>> perfectly, *and* allow manipulation based on documents delivered from
>> the same producer.
>
> What if we do this:
> sftp://host//absolute/path
> and
> sftp://host/~/relative/path
>
> and then we fight over what this means:
> sftp://host/path
>
> I think the first 2 are obvious what you mean. The last one is open to
> interpretation, so we provide the first to so that we can always be  
> sure
> to have an exact specification.


My opinion: if we're going to break from the draft standard, we  
should have a compelling reason for doing so.  Aesthetics (how pretty  
it looks) wouldn't make that cut for me.

We're already breaking from arch's format (all sftp urls are  
absolute), which I think will surprise most users who switch -- but  
being able to use relative paths and following a standard give a good  
justification for that.

Aside from the things already mentioned (like "~" is a perfectly  
valid posix path component), it might be useful to note that there's  
no requirement that an sftp "relative" path be relative to your home  
folder.  It can be relative to whatever the server wants.

robey





More information about the bazaar mailing list