Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

make alias for svn repository

Tags:

alias

svn

I am working with multiply repositories.
Is it possible to create an alias for repositories. So I can use them instead of raw urls?

Namely instead of:

svn ls https://mysvnrepos.abs/trunk

I could use:

svn ls myrepo
like image 399
Gadolin Avatar asked Sep 29 '10 06:09

Gadolin


2 Answers

If you use Linux or Mac OS, you can define a global variable for your shell.

export myrepo="https://mysvnrepos.abs/trunk"

Then you can call

svn ls $myrepo

If you want to keep this variable, add the line above to your ~/.bashrc file (create it, if it does not exist).

like image 159
Björn Marschollek Avatar answered Sep 19 '22 20:09

Björn Marschollek


No, I don't believe there is. In a standard Subversion workflow, it's quite rare to need to type the full URL -- most operations are on an already-checked-out working copy -- and in any case, if you're working with branches and tags, the URL would change between invocations.

That's not to say that the idea isn't any use, just that it's not useful enough for the developers to have added it.

If, like me, you have difficulty remembering what the URL was for a working copy you want to work with, svn info will give it to you.

like image 41
Andrew Aylett Avatar answered Sep 16 '22 20:09

Andrew Aylett