sftp urls

John Arbash Meinel john at arbash-meinel.com
Fri Dec 9 14:46:19 GMT 2005


Robert Collins wrote:
> On Thu, 2005-12-08 at 23:38 +1100, Martin Pool wrote:
>> There has been some unfortunate flux in how sftp urls are interpreted as
>> various patches and fixes have come in.
>>
>> The proposal from robertc is that 
>>
>>   sftp://host/path       is absolute
>>   sftp://host/~/path     is homedir-relative
>>
>> Apparently the current behaviour where you must have //path for absolute
>> is hurting/confusing people.
>>
>> This is consistent with lftp and baz, amongst other programs, and seems
>> to be consistent with the most recent sftp rfcs.  I will probably merge
>> something from Robert to fix this in the next couple of days.  If you
>> have been running bzr.dev or snapshots this may change the behaviour --
>> sorry, but it goes with the territory.
>  
> I was going to just revert back to this for two reasons:
>  * Theres still a thread on the wiki debating the merits of the draft
> rfc vs the lftp/baz etc behaviour (which the older rfc drafts had).
>  * We appeared to have huge stability problems with the new scheme.
> 
> Now, I'm fairly comfortable with the new scheme now there there are some
> tests in place - new bugs reports can be tested accurately and squashed
> forever.
> 
> So, I'm not going to revert the scheme behaviour, instead I think we
> should wait for the wiki thread to settle and then decide.
> 
> 
> One important thing to note:
> The RFC says that "sftp://host//path/here" is NOT equal to "/path/here"
> on the host, it is instead equal to "~//path/here" on the host. To get
> "/path/here" on the host one must use "sftp://host/%2fpath/here" - which
> is not as friendly as one might like. This is due to the way that the
> authors of the spec have wedged in the concept of 'home dir' in the back
> door of std66.

That is a shame. It was really the only way that I liked the
sftp://host/relative vs sftp://host//absolute.
So if the spec actually forbids it, than I recast my vote to switch to:
sftp://host/~/relative and  sftp://host/absolute

Do you have a specific link to the RFC, I suppose it might be on the wiki.

> 
> Also, "sftp://host/../otheruser/path" is NOT equal to
> "~/../otheruser/path" on the host, instead it is equal to (IIRC, I need
> to lookup the exact behaviour of .. at the root in urls)
> "~/otheruser/path" on the host. This is because in urls ".." is meant to
> be resolved *on the client*. Passing .. along the wire is verboten.
> 
> I'm adding some notes to this effect to the wiki page too, FWIW.
> 
> Rob
> 

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051209/134fb4d8/attachment.pgp 


More information about the bazaar mailing list