0

私のMercurialプロジェクトには、リポジトリを複製できるユーザーが何人かいますが、一部のブランチしか表示できない必要があります。

たとえば、彼らは「安定した」ブランチしか見ることができないので、不安定なコードを試すことは決してないと確信できます。または、顧客 X は、カスタマイズされたブランチのみを表示できます。

リリースのソース コードを抽出して提供できることはわかっています。しかし、「技術的でない」理由から、彼らはリポジトリへのアクセスを望んでいます。

出来ますか?

ありがとう、マリオ

4

1 に答える 1

3

およびを定義するACL 拡張を使用できます。[acl.deny.branches][acl.allow.branches]

次のサンプル構成は、ACL のドキュメント ページから取得したものです。

  [hooks]

  # Use this if you want to check access restrictions at commit time
  pretxncommit.acl = python:hgext.acl.hook

  # Use this if you want to check access restrictions for pull, push,
  # bundle and serve.
  pretxnchangegroup.acl = python:hgext.acl.hook

  [acl]
  # Check whether the source of incoming changes is in this list where
  # "serve" == ssh or http, and "push", "pull" and "bundle" are the
  # corresponding hg commands.
  sources = serve

  [acl.groups]
  # If a group name is not defined here, and Mercurial is running under
  # a Unix-like system, the list of users will be taken from the OS.
  # Otherwise, an exception will be raised.
  designers = user1, user2

  [acl.deny.branches] 

  # Everyone is denied to the frozen branch: 
  frozen-branch = * 

  # A bad user is denied on all branches: 
  * = bad-user 

  [acl.allow.branches] 

  # A few users are allowed on branch-a: 
  branch-a = user-1, user-2, user-3 

  # Only one user is allowed on branch-b: 
  branch-b = user-1 

  # The super user is allowed on any branch: 
  * = super-user 

  # Everyone is allowed on branch-for-tests: 
  branch-for-tests = * 
于 2013-10-02T10:36:26.943 に答える