为 svn 存储库创建别名

发布于 2024-09-25 01:17:44 字数 186 浏览 0 评论 0原文

我正在使用多个存储库。
是否可以为存储库创建别名。 那么我可以使用它们代替原始网址吗?

即代替:

svn ls https://mysvnrepos.abs/trunk

我可以使用:

svn ls myrepo

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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

相思碎 2024-10-02 01:17:44

如果您使用 Linux 或 Mac OS,则可以为 shell 定义全局变量。

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

然后你可以调用

svn ls $myrepo

If you 想保留这个变量,将上面的行添加到你的 ~/.bashrc 文件中(创建它,如果它不存在)。

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

若有似无的小暗淡 2024-10-02 01:17:44

不,我不相信有。在标准 Subversion 工作流程中,很少需要输入完整的 URL —— 大多数操作都是在已经签出的工作副本上进行的 —— 无论如何,如果您正在使用分支和标签,则 URL 会调用之间的变化。

这并不是说这个想法没有任何用处,只是说它对于开发人员添加它来说还不够有用。

如果像我一样,您很难记住要使用的工作副本的 URL,svn info 会将其提供给您。

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.

望她远 2024-10-02 01:17:44

不确定,但也许 externals 就是你想要的。

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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文