sftp oddities

Jeff Rose rosejn at gmail.com
Tue Dec 20 13:29:08 GMT 2005


On Tue, 2005-12-20 at 12:27 +0100, Jan Hudec wrote:
> On Tue, Dec 20, 2005 at 11:54:22 +0100, Jeff Rose wrote:
> > Hello again,
> >   I was thinking it could be helpful to bring up issues as we jump into
> > bazaar, but if this isn't the right forum let me know.  Both of my
> > roommates and I are grad students in CS with years of cvs/svn under our
> > belts, and we probably represent the type of people you hope to bring to
> > bazaar as time goes on.  Hopefully our perspectives can be
> > constructive...
> > 
> > 1. Why does pushing and branching with sftp use an odd url that doesn't
> > correspond with what people already know about sftp?  Why not use a
> > colon after the hostname, and then if you have a slash it goes to the
> 
> Because it does not work for URL. Colon after hostname is followed by port
> there (It's not mandatory anywhere, so it /could/ be done -- but it would not
> be more expectable).

I don't know about official URL syntax, but I just wanted to let you
know what someone "from the outside" thinks when they first use the
tool.  If you are going to be using url's (er, addresses) that are
different from tools people are familiar with then it is especially
important to have really informative error messages and examples in
help.  Since bzr supports pluggable transports maybe they could
implement a method that spits out an example using their transport or
something like that...?

> > root of the fs, like the normal utils?
> > 
> > sftp://foo.com:/home/myfriend/code/project
> 
> Because things like:
> sftp://foo.com:443/home/myfriend/code/project
> need to be possible too.

Well, sftp should be running on the correct port.  Otherwise in the very
rare case where its on a non-standard port something like this could
work:

bzr branch -p 443 sftp://foo.com:/home/myfriend/code/project

> > otherwise you have to do this, which seems pretty weird:
> > 
> > sftp://foo.com/../myfriend/code/project
> 
> That's invalid URL! It's forbidden to have . and .. components in URL.
> 
> Well, there is the issue with latest sftp url draft that says:
> sftp://host/path/relative/to/users/home
> sftp://host/%2Fabsolute/path
> The draft is expired now. AFAIK it's only followed by mercurial and bzr now.
> There was talk about switching to:
> sftp://host/absolute/path
> sftp://host/~/path/relative/to/users/home
> but I don't know whether it's already implemented.

Currently the forbidden url works:
-------------------------------------
rosejn at jive:~/tmp$ bzr branch
sftp://research.inf.unisi.ch/../mesnage/Projects/iBib/development
ibib.dev
Branched 1 revision(s).
-----------------------------------


> >   Pushing a fresh tree (at least with sftp) prints a warning that makes
> > you think it has failed:
> > 
> > --------------------------------------------
> > rosejn at jive:~/code/icalendar$ bzr push
> > sftp://research.inf.unisi.ch/code/icalendar
> > bzr: WARNING: Unable to update the working tree of:
> > sftp://research.inf.unisi.ch/code/icalendar
> > 7 revision(s) pushed.
> > --------------------------------------------
> > 
> > Then checking the remote branch to see if it did indeed work, we find an
> > empty project directory.  Branching seems to work fine though, so I
> > guess it rebuilds the working tree when you pull it down?
> 
> It does not build the working directory on the server - just as it says.
> Never. But it builds it locally when you branch from it.

Hmmm.  It says "WARNING", which doesn't sound like behavior that is
supposed to occur.  If that is incorrect then maybe it can be my first
patch :-)

Peace,
Jeff





More information about the bazaar mailing list