You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dave Camp <da...@thinbits.com> on 2006/05/18 00:10:02 UTC

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

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.

Thanks,
Dave


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

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

Posted by Steve Williams <st...@kromestudios.com>.
Dave Camp 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.
>  
>

Shell environment variables will help here.

In Windows, for example:

set URL=svn_ssh://foo.domain.com/svn/project
svn ls %URL%/trunk
svn co %URL%/trunk bar

-- 
Sly



This message and its attachments may contain legally privileged or confidential information. This message is intended for the use of the individual or entity to which it is addressed. If you are not the addressee indicated in this message, or the employee or agent responsible for delivering the message to the intended recipient, you may not copy or deliver this message or its attachments to anyone. Rather, you should permanently delete this message and its attachments and kindly notify the sender by reply e-mail. Any content of this message and its attachments, which does not relate to the official business of the sending company must be taken not to have been sent or endorsed by the sending company or any of its related entities. No warranty is made that the e-mail or attachment(s) are free from computer virus or other defect.

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

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

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 5/17/06, Dave Camp <da...@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