make alias for svn repository

馋奶兔 提交于 2019-12-09 18:23:38

问题


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

回答1:


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




回答2:


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.




回答3:


Not sure, but maybe externals is what you're after.



来源:https://stackoverflow.com/questions/3819343/make-alias-for-svn-repository

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!