Multi-user access for Mercurial sub-repositories

85 Views Asked by At

What is the right way to organize ssh access to sub-repositories in mercurial? Consider the following situation:

master
|--.hgsub
|--slave1
|--slave2 

And .hgsub:

slave1 = ssh://user@host://var/local/repos/slave1
slave1 = ssh://user@host://var/local/repos/slave2

The problem is that .hgsub is the part of the repository thus it is not possible (or is it?) to store various usernames in the ssh addresses of the repos. And I really want to avoid using a "global" user to access the repositories just because of this.

1

There are 1 best solutions below

1
On BEST ANSWER

You have basically two choices:

  1. If your subrepositories live in the same server as the container, use relative paths. This is the most convenient solution.
  2. Otherwise, you can have each user define a subpath rule. Look for the subpath word in this document.