Kirinya
Kirinya

Reputation: 245

How to rewrite Mercurial pull URL to not point to HOME

I have a Linux server that will be hosting multiple mercurial repositories over SSH. All the repositories lie in the folder HG_HOME/repos, where HG_HOME ist the home directory of the hg user.

The following command for pull works:

ssh://[email protected]/repos/REPO_NAME

For ease of use, I would however like to use:

ssh://[email protected]/REPO_NAME

Is this possible? If yes, where do I configure it?

The version used is 4.0

Upvotes: 0

Views: 75

Answers (1)

Reimer Behrends
Reimer Behrends

Reputation: 8730

The following is not an exact solution, but the schemes extension (which comes with Mercurial) may be a usable alternative. It allows you to create your own URL schemes, for example:

[extensions]
schemes=
[schemes]
my = ssh://[email protected]/repos/

This allows you to then use the my URL scheme, e.g.:

hg pull my://REPO_NAME

Upvotes: 1

Related Questions