You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Greg Stein <gs...@lyra.org> on 2002/08/01 21:24:32 UTC

relative URLs (was: rapidsvn feedback)

On Thu, Aug 01, 2002 at 08:05:02AM -0700, Peter Davis wrote:
> On Thursday 01 August 2002 06:17, brane@xbc.nu wrote:
>...
> > Becasue many commands accept either an URL or a working copy path, so there
> > must be a way to distinguish the two. It would be slightly horrible if "svn
> > cp" required the %%, but "svn switch" didn't. Consistency is always good.
> 
> I understand that %% would have to be required for the command line.  But in 
> RapidSVN, it should be easy enough for you to label a field as a "URL", which 
> could imply that if you give an absolute path, the "%%" is implied (but not 
> disallowed, for consistency).  RapidSVN should be able to be "smart" when it 
> can, whereas a "smart" command line client is just annoying.

IMO, we shouldn't use "%%" in any situation (although I could bend for the
cmdline). That form just isn't a standard URL.

When you have a GUI, where there is no ambiguity about what was typed in,
then you allow users to enter a relative URL, and use the standard URL
composition guidelines to establish the absolute URL. The only tricky part
is decided what the "base" is for the relative URL to be useful. The RFC
actually covers some of how to defined a base URL.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: relative URLs (was: rapidsvn feedback)

Posted by cm...@collab.net.
Dave Cridland <da...@cridland.net> writes:

> On Thu, 2002-08-01 at 22:24, Greg Stein wrote:
> > IMO, we shouldn't use "%%" in any situation (although I could bend for the
> > cmdline). That form just isn't a standard URL.
> > 
> > When you have a GUI, where there is no ambiguity about what was typed in,
> > then you allow users to enter a relative URL, and use the standard URL
> > composition guidelines to establish the absolute URL. The only tricky part
> > is decided what the "base" is for the relative URL to be useful. The RFC
> > actually covers some of how to defined a base URL.
> 
> This thread is now officially confusing me. Admittedly this doesn't
> usually take much - a piece of paper with "Please Turn Over" written on
> both sides usually does the trick.
> 
> What's the difference between...
> 
> (base URL of directory: http://svn.somewhere.tld/repos/dir)
> 
> [user@host dir]$ svn cp file1.c file2.c

This will copy file1.c to file2.c locally in your working copy, and
schedule file2.c for addition as a copy of file1.c.  No commit here,
and the copy is revertable.

> 
> ...and...
> 
> [user@host dir]$ svn cp http://svn.somewhere.tld/repos/dir/file1.c
> http://svn.somewhere.tld/repos/dir/file2.c

This will actually commit a new file2.c as a copy of the file at the
first URL!  This is not revertable.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: relative URLs (was: rapidsvn feedback)

Posted by Dave Cridland <da...@cridland.net>.
On Thu, 2002-08-01 at 22:24, Greg Stein wrote:
> IMO, we shouldn't use "%%" in any situation (although I could bend for the
> cmdline). That form just isn't a standard URL.
> 
> When you have a GUI, where there is no ambiguity about what was typed in,
> then you allow users to enter a relative URL, and use the standard URL
> composition guidelines to establish the absolute URL. The only tricky part
> is decided what the "base" is for the relative URL to be useful. The RFC
> actually covers some of how to defined a base URL.

This thread is now officially confusing me. Admittedly this doesn't
usually take much - a piece of paper with "Please Turn Over" written on
both sides usually does the trick.

What's the difference between...

(base URL of directory: http://svn.somewhere.tld/repos/dir)

[user@host dir]$ svn cp file1.c file2.c

...and...

[user@host dir]$ svn cp http://svn.somewhere.tld/repos/dir/file1.c
http://svn.somewhere.tld/repos/dir/file2.c

...and other combinations of URL and file.

I'm unclear what difference there is, if any. Similarly with other
commands. The sole difference I can see is that for some commands, there
is no need to touch the repository when all arguments are a local file,
but surely this is largely a matter of being slightly smarter?

I can also see that things get more complex in terms of figuring out the
base URL of mixed working dirs, done with, say, `svn switch' (which
isn't in the man page, in case nobody's noticed.).

Perhaps a --base-url-from=<dir> switch could be used to clear up
ambiguity?

I appreciate I'm probably missing something fairly crucial here, so feel
free to treat me like an idiot. :-)

Dave.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org