Organizing repositories

Currently, we use gitolite the configure repository access permissions.
There it is possible to create hierarchies of repos.
We use products/* for actual products, components/* for shared submodules,
doc/, internal/, etc.
This is pretty handy when you need to deal with >100 repos.

Is there something comparable in Phabricator?
I could not find a way to organize repos, except maybe use a string prefix,
but this more a workaround.

There’s no concept of “repository hierarchy”, but there are some building blocks that can give you most of the capabilities:

  • Each repo has Access Controls for read and write; I don’t think there’s a bulk-update or automated feature for that, but you can use APIs to automate your workflow (You’ll probably be using APIs for creating the repos anyway).
  • Repos can be Tagged with Projects - that’s for organizing. Projects support a Hierarchy (sub-projects).
  • You can use Herald Commit Hook rules to prevent write actions, based on repo project tags, user projects (tags), commit content, modified file names, and modified refs - you can create complex rules there.
  • You can customize repositories URI (to some extent), so you can have all your products repos have products/ in their clone path.

Thanks for your help and tips.

Regarding the URIs I’ve one more question.
When creating a repo it always create two default URIs:
…/diffusion/4/testing.git
…/diffusion/TESTING/testing.git

What is the purpose of having these two URLs?

What is the purpose of having these two URLs?

The first URI is completely stable and will never change. The second URI is more human-readable, but will change if you change the repository callsign.

You may want to use the first URI in contexts where stability is important (e.g., scripts or automation) and the second URI (or the third /source/xyz/ variant) in contexts where human-readability is important.

1 Like

sounds reasonable
thanks