You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Nuutti Kotivuori <na...@iki.fi> on 2002/10/06 13:57:09 UTC

SVNROOT suggestion - expand '//'

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?

-- Naked

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

Re: SVNROOT suggestion - expand '//'

Posted by Nuutti Kotivuori <na...@iki.fi>.
brane@xbc.nu wrote:
> Nuutti Kotivuori wrote:
>> 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.

Hmm, OK.

> 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.

Err? I didn't quite catch how we arrived to 'svn url' from SVNROOT? 
Maybe I should read back on what was the real issue.

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

Ooh, goodie goodie :-)

-- Naked

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

Re: SVNROOT suggestion - expand '//'

Posted by Nuutti Kotivuori <na...@iki.fi>.
Karl Fogel wrote:
> Nuutti Kotivuori <na...@iki.fi> writes:
>> Anyway, should I just file the issue separately and then let you
>> guys hook it in with the other issues?
> 
> Yeah, could you do that?  It's an independent change that will
> happen to contribute to some other change.  When we find the other
> issue, we'll link the two together.

Issue 926 posted.

-- Naked

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

Re: SVNROOT suggestion - expand '//'

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Nuutti Kotivuori <na...@iki.fi> writes:
> Anyway, should I just file the issue separately and then let you guys
> hook it in with the other issues?

Yeah, could you do that?  It's an independent change that will happen
to contribute to some other change.  When we find the other issue,
we'll link the two together.

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

Re: SVNROOT suggestion - expand '//'

Posted by Nuutti Kotivuori <na...@iki.fi>.
Karl Fogel wrote:
> cmpilato@collab.net writes:
>>>> Is there an issue filed on separating storage of the repo URL
>>>> and the current directory? And what about all the various
>>>> SVNROOT suggestions?
>>> 
>>> I don't think there's an issue yet.  But wasn't that change just
>>> a prerequisite for some other change, which itself may have an
>>> issue filed?  CMike, do you remember the details?
>> 
>> We want to be able to easily tell what files/dirs go with what
>> repos in the presence of commits and updates of mixed-repos working
>> copies.  Am I thinking of the right thing?
> 
> Yes, I think so.  Nuutti, does this help in finding/filing an issue?

Actually - no. I tried finding the issue or issues, but I'm not too
good with the issue system. Didn't find anything relating to
mixed-repos working copies - can I somehow search the added comments
too?

Anyway, should I just file the issue separately and then let you guys
hook it in with the other issues?

-- Naked


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

Re: SVNROOT suggestion - expand '//'

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
cmpilato@collab.net writes:
> > > Is there an issue filed on separating storage of the repo URL and the
> > > current directory? And what about all the various SVNROOT suggestions?
> > 
> > I don't think there's an issue yet.  But wasn't that change just a
> > prerequisite for some other change, which itself may have an issue
> > filed?  CMike, do you remember the details?
> 
> We want to be able to easily tell what files/dirs go with what repos
> in the presence of commits and updates of mixed-repos working copies.
> Am I thinking of the right thing?

Yes, I think so.  Nuutti, does this help in finding/filing an issue?

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

Re: SVNROOT suggestion - expand '//'

Posted by cm...@collab.net.
Karl Fogel <kf...@newton.ch.collab.net> writes:

> Nuutti Kotivuori <na...@iki.fi> writes:
> > Is there an issue filed on separating storage of the repo URL and the
> > current directory? And what about all the various SVNROOT suggestions?
> 
> I don't think there's an issue yet.  But wasn't that change just a
> prerequisite for some other change, which itself may have an issue
> filed?  CMike, do you remember the details?

We want to be able to easily tell what files/dirs go with what repos
in the presence of commits and updates of mixed-repos working copies.
Am I thinking of the right thing?

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

Re: SVNROOT suggestion - expand '//'

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Nuutti Kotivuori <na...@iki.fi> writes:
> Is there an issue filed on separating storage of the repo URL and the
> current directory? And what about all the various SVNROOT suggestions?

I don't think there's an issue yet.  But wasn't that change just a
prerequisite for some other change, which itself may have an issue
filed?  CMike, do you remember the details?

(I think my memory is worse than it used to be, but how can I be
sure?)

-K

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

Re: SVNROOT suggestion - expand '//'

Posted by Nuutti Kotivuori <na...@iki.fi>.
Karl Fogel wrote:
> Branko Čibej <br...@xbc.nu> writes:
>> No. The proposal, as I understand it, is that the magic prefix
>> would be internally interpreted to mean the URL of the repo that
>> the current directory belongs to. There are plans to store the repo
>> URL and relative path separately, so this would indeed be trivial
>> to implement.
> 
> Can we revisit this after that separated storage is implemented?  It
> feels funny to me to be designing an interface before the foundation
> on which it will rest even exists.  At the very least, we'll just
> end up revisiting the question again later, when it's possible to
> implement it, so why not skip the first iteration... :-)

Agreed. Sanity prevails, yet again.

Is there an issue filed on separating storage of the repo URL and the
current directory? And what about all the various SVNROOT suggestions?

Although, I think we can be pretty sure that somebody will mention
about this anyway :-)

-- Naked


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

Re: SVNROOT suggestion - expand '//'

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Branko Čibej <br...@xbc.nu> writes:
> No. The proposal, as I understand it, is that the magic prefix would
> be internally interpreted to mean the URL of the repo that the current
> directory belongs to. There are plans to store the repo URL and
> relative path separately, so this would indeed be trivial to implement.

Can we revisit this after that separated storage is implemented?  It
feels funny to me to be designing an interface before the foundation
on which it will rest even exists.  At the very least, we'll just end
up revisiting the question again later, when it's possible to
implement it, so why not skip the first iteration... :-)

-Karl

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

Re: SVNROOT suggestion - expand '//'

Posted by Branko Čibej <br...@xbc.nu>.
Garrett Rooney wrote:

> 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.


No. The proposal, as I understand it, is that the magic prefix would be 
internally interpreted to mean the URL of the repo that the current 
directory belongs to. There are plans to store the repo URL and relative 
path separately, so this would indeed be trivial to implement.


-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: SVNROOT suggestion - expand '//'

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
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

Re: SVNROOT suggestion - expand '//'

Posted by Branko Čibej <br...@xbc.nu>.
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.

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

-- 
Brane Čibej   <br...@xbc.nu>   http://www.xbc.nu/brane/


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

Re: SVNROOT suggestion - expand '//'

Posted by Matthias Urlichs <sm...@noris.de>.
Hi,

Nuutti Kotivuori:
> What if we said that '//' at the start of a path is expanded to the
> contents of the environment variable SVNROOT? For example:
> 
Please pick something which has no chance of appearing acidentally in a
"normal" Unix shell statement. Setting "PREFIX=/" for installation of
software in the root directory would, for instance, qualify.

I'd recommend a leading ++ or %%, or something like that.
(Assuming that the result can't be reached some other way entirely.)

-- 
Matthias Urlichs     |     noris network AG     |     http://smurf.noris.de/

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