1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 16:30:59 +01:00
phorge-phorge/src/applications/diffusion
epriestley 4f20530856 Merge "expandshortcommitquery" and "stablecommitnamequery" into "resolverefs"
Summary:
Ref T1493. Diffusion has some garbagey behavior for things we can't resolve. Common cases are:

  - Looking at a branch that doesn't exist.
  - Looking at a repository with no branches.
  - Looking at a commit that doesn't exist.
  - Looking at an empty repository.

In these cases, we generally fatal unhelpfully. I want to untangle this mess.

This doesn't help much, but does clean things up a bit. We currently have two separate query paths, "stablecommitname" and "expandshortcommit". These are pretty much doing the same thing -- taking some ref like "master" or "default" or a tag name or part of a commit name, and turning it into a full commit name. Merge them into a single "resolverefs" method.

This simplifies the code a fair bit, and gives us better error messages. They still aren't great, but they're like this now:

  Ref "7498aec194ecf2d333e0e2baddd9d5cdf922d7f1" is ambiguous or does not exist.

...instead of just:

  ERR-INVALID-COMMIT

Test Plan: Looked at Git, Mercurial and Subversion repositories that were empty and non-empty. Looked at branches/heads. Tried to look at invalid commits. Looked at tags. All of this still works, and some behaviors are a bit better than they used to be.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1493

Differential Revision: https://secure.phabricator.com/D7484
2013-11-04 14:13:07 -08:00
..
application When creating a repository in Diffusion, prompt for "Create" or "Import" first 2013-11-01 17:39:35 -07:00
capability Add global "push" policy to Repositories 2013-10-29 15:32:40 -07:00
conduit Merge "expandshortcommitquery" and "stablecommitnamequery" into "resolverefs" 2013-11-04 14:13:07 -08:00
config Improve repository hinting and feedback 2013-11-01 17:35:43 -07:00
controller Fix tag content display in Git 2013-11-04 12:16:53 -08:00
data Fix tag content display in Git 2013-11-04 12:16:53 -08:00
doorkeeper Remove loadMemberPHIDs from PhabricatorProject 2013-10-06 17:07:08 -07:00
events Tie application event listeners to the applications they listen for 2013-10-21 17:00:21 -07:00
exception Merge "expandshortcommitquery" and "stablecommitnamequery" into "resolverefs" 2013-11-04 14:13:07 -08:00
panel Implementation of VCS passwords against user. 2013-11-01 08:34:11 -07:00
query Merge "expandshortcommitquery" and "stablecommitnamequery" into "resolverefs" 2013-11-04 14:13:07 -08:00
remarkup Use Application PHIDs for commits 2013-07-22 12:17:34 -07:00
request Merge "expandshortcommitquery" and "stablecommitnamequery" into "resolverefs" 2013-11-04 14:13:07 -08:00
response Serve Git reads over HTTP 2013-10-29 15:32:40 -07:00
ssh Show additional status information during repository import 2013-10-31 15:46:57 -07:00
view Clean up Diffusion dedicated tag table view 2013-10-30 13:15:14 -07:00
DiffusionLintSaveRunner.php Make most repository reads policy-aware 2013-09-25 16:54:48 -07:00