You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Eric Sammer <er...@ineoconcepts.com> on 2003/11/04 11:53:57 UTC

Repository URL defaulting?

Maybe it's not the most exciting thing in the world, but what is the 
general feeling on defaulting to the repository from whence the checkout 
came when working with commands that take repository URLs? I find that 
when doing relatively common things like diffs, updates, or merges, I 
wind up typing a rather verbose repository URL way too many times. Even 
if the URI scheme and host were defaulted, forcing only the 
specification of the path component of hate URI, a lot of time (for me 
at least) would be saved. One of my current projects has the repository 
of...

"svn+ssh://hostname.internal.domain.com/export/svn/RepositoryName/(trunk|branch/version_0_01)"

Now, I'm sure I could do things like drop a symlink in / (root) on the 
svn box, but I'd rather not "pollute" in that manner. Typing this every 
time I need to / want to diff, update, or merge is taking its toll on 
me. Again, I suppose I could pack it into an environment variable... 
call this curiosity about the dev's point of view...

(A quick google search of the svn book didn't reveal anything about 
respecting an environment variable ala CVSROOT, but feel free to correct 
my lack of google-fu.)

Thanks in advance.
-- 
Eric Sammer
eric@ineoconcepts.com

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

Re: Repository URL defaulting?

Posted by Ben Collins-Sussman <su...@collab.net>.
On Tue, 2003-11-04 at 05:53, Eric Sammer wrote:
> Maybe it's not the most exciting thing in the world, but what is the 
> general feeling on defaulting to the repository from whence the checkout 
> came when working with commands that take repository URLs? 

This has been discussed before... people have suggested that post-1.0
svn have this feature.  It's tricky, because it means the working copy
area (.svn) will need to store the 'URL root' of the repository
separately from the repos-path, which it's not yet doing.  We're getting
closer now that we have RA->get_repos_root, but there's still work to do
in libsvn_wc.   For now, some folks just set environment variables by
hand for convenience:  

 $ export SVNROOT=http://host/path/to/repos
 $ svn checkout $SVNROOT/project wc
 $ svn merge $SVNROOT/branch -r10:20 wc

etc.




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

Re: Repository URL defaulting?

Posted by Joey Hess <jo...@kitenet.net>.
Eric Sammer wrote:
> Maybe it's not the most exciting thing in the world, but what is the 
> general feeling on defaulting to the repository from whence the checkout 
> came when working with commands that take repository URLs? I find that 
> when doing relatively common things like diffs, updates, or merges, I 
> wind up typing a rather verbose repository URL way too many times. Even 
> if the URI scheme and host were defaulted, forcing only the 
> specification of the path component of hate URI, a lot of time (for me 
> at least) would be saved.

I use the attached script, as follows:

joey@dragon:~>svnpath
svn+ssh://kitenet.net/home/svn/joey/trunk/home-full

svn cp `svnpath` `svnpath branches`/new_branch
svn cp `svnpath` `svnpath tags`/new_tag
svn cat `svnpath`/foo

It does a very simple substitution of the optional first argument to get
to tags or branches, so should work with nearly any repository layout.

-- 
see shy jo