0

Is there a way to get users and groups for mercurial repository from remote? I am a newbie to mercurial world and not being able to get much details on this.

I wish to get and set the groups and users on a repository from remote (application).

The mercurial server is using acl extension.

Kangkan
  • 15,267
  • 10
  • 70
  • 113
  • And what are 'users and groups' in terms of a VCS? Access rights to a ressource (here the VCS) are a local configuration which are not exactly related to the VCS itself. What information are made public about that is a question about the interfaces offered (ssh, web interfaces like kallithea, redmine...). Mercurial itself has no access control (though there's one plug-in, the aclextension) – planetmaker Jul 20 '16 at 12:48
  • @planetmaker, the server in question is using acl extension. – Kangkan Jul 20 '16 at 17:17
  • There is nothing to "set". You're doing it wrong. – DanMan Jul 23 '16 at 09:57
  • @DanMan, I know there is something wrong. But, how should I do if I wish to set up the authorization from remote (as automation might be)? – Kangkan Jul 23 '16 at 11:12

2 Answers2

1

You can fetch the users that have worked on the current repo with

hg log --template "{author}\n"

However, this will return many duplicates, so you may want to pipe to uniq:

hg log --template "{author}\n" | uniq
danielmhanover
  • 3,094
  • 4
  • 35
  • 51
1

Any type of access restrictions like group permissions would have to be installed outside of Mercurial, like setting up a password-protected network share on which you put the main repository or something.

For ACL look here: Fine Grained ACLs For Mercurial On Own Server or here https://stackoverflow.com/search?q=mercurial+acl

And then there's the manual: https://www.mercurial-scm.org/wiki/PublishingRepositories and https://www.mercurial-scm.org/wiki/AuthorizingUsers

Community
  • 1
  • 1
DanMan
  • 11,323
  • 4
  • 40
  • 61