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

Re: Can I define lables for URLs in my local config file?

From: Garrett Rooney <rooneg_at_electricjellyfish.net>
Date: 2006-05-18 02:18:09 CEST

On 5/17/06, Dave Camp <dave@thinbits.com> wrote:
> I'm constantly performing server operations with long URLs like
> svn_ssh://foo.domain.com/svn/project/trunk and it's getting annoying
> to type that over and over.
>
> Is there some way I can define that in my local config such that I
> can type 'svn log myShortcut' and have it internally expand
> myShortcut to the full URL?
>
> I just reviewed the config file section of the online 1.3 book and
> don't see anything quite like this.

Nope. One common workaround is defining very short environment
variables, for example:

export R=https://svn.collab.net/repos/svn

svn ls $R/tags

One problem with your 'svn log myShortcut' idea is how that behavior
interacts with a working copy. What if you have a file named
myShortcut? There needs to be some disambiguation someplace, either
by saying the shortcut wins, and you have to do ./myShortcut to get
the file, or by providing some sort of syntax that means "intepret
this as a shortcut". If you provide that sort of syntax, you need to
make sure it works in the majority of shells, which is kind of a
pain... This has come up several times on the dev list over the
years.

There are also other proposals floating around for solving part of the
problem. For example, you usually have a working copy lying around,
so what you might actually want is a syntax for saying "relative to
this project's root", so you can say 'svn ls $ROOT/branches' (with
some better syntax for $ROOT, of course). The problem there becomes
"how do you define a root", and there are various ways that could
work, none of which have been implemented yet.

Anyway, the short answer is "No, but the short env var thing works
reasonably well".

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu May 18 02:19:18 2006

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

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