linux - 如何重写 Mercurial 拉取 URL 以使其不指向 HOME

标签 linux installation mercurial

我有一个 Linux 服务器,它将通过 SSH 托管多个 Mercurial 存储库。 所有存储库都位于文件夹 HG_HOME/repos 中,其中 HG_HOME 是 hg 用户的主目录。

以下拉动命令:

ssh://hg@my.server/repos/REPO_NAME

为了便于使用,我想使用:

ssh://hg@my.server/REPO_NAME

这可能吗?如果是,我在哪里配置它?

使用的版本是4.0

最佳答案

以下不是一个确切的解决方案,但 schemes 扩展(Mercurial 附带)可能是一个可用的替代方案。它允许您创建自己的 URL 方案,例如:

[extensions]
schemes=
[schemes]
my = ssh://hg@my.server/repos/

这允许您使用 my URL 方案,例如:

hg pull my://REPO_NAME

关于linux - 如何重写 Mercurial 拉取 URL 以使其不指向 HOME,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/40638510/

相关文章:

C++链接器设计问题

linux - 如何在不知道当前设备的情况下即时更改 ip

r - 安装 Tabulizer 时出错

mercurial - Mercurial 日志 : how to get latest commit by a particular user?

mercurial - 符合 MSSCCI 标准的 Mercurial 客户端

linux - ;& 和 ;; 之间的区别在 bash 脚本中

python - 如何在 Linux 中使用 Shell 或 Python 创建目录的哈希值?

build - 在 Cygwin 上编译 node.js

c - MinGW 64 位安装问题

Mercurial:如何从存储库中仅导入部分变更集?