Page MenuHomePhabricator

Upgrading: New Repository UI, APIs, and URI management
Closed, ResolvedPublic

Assigned To
Authored By
epriestley
May 4 2016, 10:18 PM
Referenced Files
F1661463: step4.png
May 26 2016, 1:14 PM
F1661458: step2.png
May 26 2016, 1:14 PM
F1661456: step1.png
May 26 2016, 1:14 PM
F1661460: step3.png
May 26 2016, 1:14 PM
F1258212: Screen Shot 2016-05-04 at 3.10.56 PM.png
May 4 2016, 10:18 PM
F1258202: Screen Shot 2016-05-04 at 3.00.56 PM.png
May 4 2016, 10:18 PM
Tokens
"Like" token, awarded by d.maznekov.

Description

Repositories in Diffusion have received some substantial changes around the editing/management UI, the APIs, and how URIs are configured.

These changes generally do not require any action unless you use the old APIs (see below), but they are fairly sweeping, so you should be aware of them and keep an eye out for possible issues even if you are not directly impacted.

See T10923 for known errata.

Editing and Management UIs

The old create flow and edit page have been updated. The new create flow has fewer steps and the new edit page is divided more clearly into sections:

Screen Shot 2016-05-04 at 3.00.56 PM.png (986×1 px, 164 KB)

Functionally, the new UIs are fairly similar the old UIs. The only major change here is that any user who can view the repository can now view the "Manage" UI to review edit history, check policies, etc (they can't actually edit anything, of course).

For an overview of the new management UI, see:

API Changes

The repository APIs have changed substantially. See T10748 for the primary task. In particular:

  • repository.create, which barely worked, has been removed.
    • diffusion.repository.edit replaces it. This endpoint can create and modify repositories.
    • diffusion.uri.edit supplements diffusion.repository.edit, and allows you to create and modify repository URIs via the API.
  • repository.query is now on its last legs and will be deprecated soon.
    • diffusion.repository.search replaces it.

The new API endpoints are full-power modern endpoints. For an introduction to endpoints of these kinds, see:

For a general overview of creating repositories with the new API, see:

Additionally, bin/repository edit has been removed. Since introduction, this was slated for removal once Conduit supported its features.

If you make use of the old APIs, particularly repository.create, you should update your code to use diffusion.repository.edit instead.

URI Changes

Repository URI management has been reworked to be more flexible. See T10366 for the primary task. Broadly, repositories now have a list of associated URIs and you can configure fetch, push, serve, and display behaviors for each URI independently:

Screen Shot 2016-05-04 at 3.10.56 PM.png (807×1 px, 139 KB)

This supports various new use cases like proxying reads through Phabricator so you can apply permissions or cloning from one location but showing users a different clone URI, generally makes URI management more explicit, and simplifies internal URI management.

This document walks through use cases and configuration:

Event Timeline

epriestley edited projects, added Diffusion (v3); removed Diffusion.

Good time of day palls.
How to add tag (respectively connect repo to project) in that new style ?
I'm asking because till now all our commits to HG repo was referenced to task with keywords like "ref" or "closes" etc.
All our repos is organized and setup like that. Today I must create new repo attached to new project and the problem....
Can't reference or act to any task/project with commits?
Or I miss something but can't find even add tag command.
Please advice, thanks in advance !

To edit project tags for a repository, navigate to the repository main page, then click Manage RepositoryEdit Basic Information and add project tags to the "Tags" field.

Start here, on the repository main page, and click Manage Repository on the right:

step1.png (993×1 px, 124 KB)

On the "Manage" screen, make sure you're in the "Basics" section (on the left), then click "Edit Basic Information" (on the right):

step2.png (993×1 px, 153 KB)

Here, you can add or remove project tags using the "Tags" control. After making changes, click Save Changes.

step3.png (993×1 px, 105 KB)

Your changes will appear in the UI on the repository's main screen:

step4.png (848×1 px, 98 KB)

There don't appear to be any major outstanding issues here.