[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: SVNROOT suggestion - expand '//'

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2002-10-06 18:55:12 CEST

On Sunday, October 6, 2002, at 12:46 PM, Branko Èibej wrote:

> Nuutti Kotivuori wrote:
>
>> Sometimes it would indeed be nice to be able to get the same behaviour
>> as CVSROOT is for CVS in Subversion as well. Mostly adding this
>> functionality has run into problems with Subversion not separating
>> between the root of the repository and the latter part - and also the
>> necessity of distinguishing URL operations from local working copy
>> operations.
>>
>> Now, Dave Gilbert on IRC gave a suggestion which seems to be worth
>> considering - if not as such, atleast as a basis for further
>> discussion.
>>
>> What if we said that '//' at the start of a path is expanded to the
>> contents of the environment variable SVNROOT? For example:
>>
>> $ export SVNROOT=http://svn.collab.net/repos/svn
>> $ svn co //trunk svn
>> $ svn cp //trunk //tags/0.14.4
>>
>> Now that looks exceedingly clean. There may be horrible problems with
>> this idea and atleast it's not standard by any means that I know of,
>> but I thought it could be a nice start for a discussion.
>>
>> Would this syntax work? Are there better choices? Or is the whole
>> feature deemed too obscure to implement?
>>
>
> We've had that discussion before. Last time, I proposed %% instead of
> //, but anyway. The net result was that we had "svn url" for a short
> time, then that was supplanted by "svn info" + a sed hack, and the
> rationale was that "anyone can write `svn info bla | sed qux`/foo".
> Windows users, and those that don't want to type gunk instead of a
> simple prefix, were ignored.

well, the 'svn url' thing was just a patch, it never went in (at least
not the version i posted, and i can't recall any other version...)

> FWIW; +1 for the proposal, but I doubt it'll survive. :-)

this proposal seems to indicate that you'd have to set the SVNROOT env
variable first... if that's the case, then all we're gaining is a few
keystrokes, since you could just as easily do:

export SR=http://svn.collab.net/repos/svn
svn co $SR/trunk
svn cp $SR/trunk $R/tags/0.14.0

so what's the point? we've saved a few characters. in windows i
imagine it's also possible within their shell, right?

now by comparing it to the svn url stuff and so forth, you seem to be
indicating that the // would take on some kind of special meaning
inside a working copy... i'm failing to see how that could be
implemented usefully... does it mean "the url of the directory i'm
running this command in" or what? if so, that doesn't really seem very
useful to me, but maybe i'm missing something.

-garrett

-- 
garrett rooney                    Remember, any design flaw you're
rooneg@electricjellyfish.net      sufficiently snide about becomes
http://electricjellyfish.net/     a feature.       -- Dan Sugalski
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 6 18:55:48 2002

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.