Danek Duvall wrote:
> On Fri, Sep 26, 2008 at 03:01:20PM +0200, Vladimir Kotal wrote:
> 
>> - rsync user with remote host
>>    webrev -r -U -h some_host.org
>>
>> - rsync user with custom directory
>>    (local file-system copy, just for demonstration)
>>    webrev -r -U -d /foo/bar/fix.webrev
> 
> Please don't use -r to indicate rsync; I want to reserve that for
> "revision", to enable the ability to create a webrev based on one or more
> revisions in a tree.  I have working code for this, but it was rejected
> some time ago (didn't take care of some unusual corner cases, I think) and
> I haven't had time to make those fixes.

ok, I won't.

> I think that given that cr.os.o uses rsync, webrev should use rsync by
> default.  In fact, it should probably try rsync, then fall back to scp if
> rsync failed.

Good idea. Truth is, I kind of ignored the rsync functionality on 
cr.opensolaris.org until I tried to actually use it.

> I also think that you should just use user at host:directory notation like
> rsync and scp, rather than littering webrev with a bunch of options that
> only have to do with this rather minor functionality.

okay, let's use URI as remote target specifier then.

generic SSH case:
   webrev -U -t ssh://user at remote_host:remote_dir

generic rsync case:
   webrev -U -t rsync://user at remote_host:remote_dir

The defaults are now the following:
   - transport: rsync (w/ fallback to SSH)
   - host: cr.opensolaris.org
   - remote directory: $WNAME

Also, I did some reshuffling of the options to make them alphabetically 
ordered in webrev.sh (no impact). I might do it for the man page as well.

The man page has been extended with section about uploads.

As for internals, upload_webrev() was split into ssh_upload() and 
rsync_upload(). ssh_upload() is not very nice (but probably cannot be 
done in any other way for the time being) because it emulates 'mkdir -p' 
functionality etc.

The webrev has been updated to include code which implements the above:
   http://cr.opensolaris.org/~vkotal/webrev_upload.onnv/


v.

Reply via email to