sftp urls

Robert Collins robertc at robertcollins.net
Fri Dec 9 06:19:54 GMT 2005


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.

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

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051209/c9ba6c45/attachment.pgp 


More information about the bazaar mailing list