1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 08:52:39 +01:00
Commit graph

13646 commits

Author SHA1 Message Date
epriestley
b471f6c07a Order inline comments in Diffusion consistently with Differential
Summary:
Fixes T8739. Currently, Diffusion inline comments in the timeline are sorted arbitrarily, mostly by creation order.

Instead, sort them by line number, like Differential.

Test Plan:
Made comments in "C", "B", "A" order, saw them in line order after submit:

{F2343032}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8739

Differential Revision: https://secure.phabricator.com/D17184
2017-01-11 14:57:06 -08:00
epriestley
b5722a9963 Use EditEngine stacked comments in Diffusion
Summary: Ref T10978. Ref T8739. Fixes T10446. Converts Diffusion to modern comment/preview code, like Differential.

Test Plan: {F2342933}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978, T10446, T8739

Differential Revision: https://secure.phabricator.com/D17183
2017-01-11 14:46:48 -08:00
epriestley
82c891f586 Add modern "Accept", "Raise Concern" and "Resign" transactions to Audit
Summary:
Ref T10978. This prepares for swapping the comment UI to stacked actions.

These are only accessible via the API.

Test Plan: Used the API to accept, raise concern with, and reject commits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17182
2017-01-11 13:56:48 -08:00
epriestley
255e3fb1e4 Allow auditors to be added and removed from commits in a modern way
Summary: Ref T10978. Ref T7676. Make auditors work more like reviewers, so they can be freely added or removed.

Test Plan:
  - Interacted with auditors via "Edit Commit" and API.
  - Comment area is still oldschool and doesn't work yet.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978, T7676

Differential Revision: https://secure.phabricator.com/D17181
2017-01-11 13:56:34 -08:00
Chad Little
dfee1352e9 Basic structure for MenuItem on Home
Summary: Ref T11957, builds out `/home/menu/` as a basic structure for adding/editing the homepage menu.

Test Plan: visit `/home/menu/` and add items to global and personal. Not wired to anything.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T11957

Differential Revision: https://secure.phabricator.com/D17180
2017-01-11 12:44:56 -08:00
epriestley
2941b34acb Add "diffusion.commit.edit", a v3 edit API endpoint for commits
Summary: Ref T10978. This currently does almost nothing, but gets it in place so I can add stuff to it.

Test Plan: Made a comment on a commit using the API.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17178
2017-01-11 10:38:14 -08:00
epriestley
279273dc1c Replace old commit edit controller with new EditEngine controller
Summary: Ref T10978. The new controller now does everything the old one did, so swap 'em and nuke the old one.

Test Plan: Edited a commit, hit the new controller, things worked real good.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17177
2017-01-11 10:37:53 -08:00
epriestley
5e07358826 Preserve "Autoclose?" information on new Commit edit flow
Summary: Ref T10978. The current "Edit" flow has some autoclose info. This isn't necessarily the best place to put it in the long run, but preseve it for now since the documentation refers to it.

Test Plan: {F2340658}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17176
2017-01-11 10:31:20 -08:00
epriestley
a27c824da6 Draw project PHIDs from repositories when evaluating Herald object rules for commits
Summary:
Fixes T12097. In D16413, I simplified this code but caused us to load the //commit's// projects instead of the //repository's// projects, which is incorrect.

Normally, commits don't have any project tags when Herald evaluates, so using the commit's projects is generally meaningless.

Test Plan:
  - Tagged a repository with `#X`.
  - Created a Herald object rule for commits with `#X` as the object ("Always ... do nothing.")
  - Ran a commit from the repository.
  - Before patch: rule failed to evaluate.
  - After patch: rule evaluated and passed.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12097

Differential Revision: https://secure.phabricator.com/D17179
2017-01-11 10:29:39 -08:00
epriestley
7ff0be1bde Bring very basic EditEngine support to commits
Summary:
Ref T10978. After T11114, we have some features (like the old code for the haunted comment panel) which are only used by Diffusion. I want to modernize it so I can nuke them. T10978 also describes many bugs which are only fixable after modernizing.

This adds very basic EditEngine support for commits/audit. You can't create new commits with this workflow, just tag/update existing ones.

Test Plan: {F2340347}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10978

Differential Revision: https://secure.phabricator.com/D17175
2017-01-11 09:34:46 -08:00
Chad Little
452f5bce18 Make some defaults for Quick Create / Favorites
Summary: Add in some basic defaults, Tasks, Projects, Repositories... anything else? Also switches "manage" context if you are an admin or user. Hides link if you are not logged in.

Test Plan: Review Global/Personal in Favorites app, click on each link.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17174
2017-01-11 08:46:33 -08:00
Chad Little
1e1a0182ca Add basic diff coloring to CelerityDefaultProcessor
Summary: Moves basic colors into the processor.

Test Plan: Review a diff in sandbox with and without change.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17173
2017-01-10 17:54:24 -08:00
epriestley
52d563f8b8 Make differential.querydiffs more liberal about arguments
Summary:
Fixes T12092. D17164 made `DiffQuery` more strict about arguments using modern conventions, but `differential.querydiffs` uses bizarre ancient conventions.

Give it more modern conventions instead.

Test Plan: Made a `querydiffs` call with only revision IDs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12092

Differential Revision: https://secure.phabricator.com/D17172
2017-01-10 13:47:38 -08:00
Chad Little
63af2275ca Re-darken full width diff colors
Summary: Ref T12089. This reverts back to using "bright" colors for full width changes in green and red.

Test Plan:
Review diffs, see full width colors.

{F2333933}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12089

Differential Revision: https://secure.phabricator.com/D17171
2017-01-10 13:25:23 -08:00
epriestley
ccff47682f Provide more useful guidance if a repository is clusterized into an existing multi-device cluster
Summary:
Fixes T12087. When transitioning into a clustered configuration for the first time, the documentation recommends using a one-device cluster as a transitional step.

However, installs may not do this for whatever reason, and we aren't as clear as we could be in warning about clusterizing directly into a multi-device cluster.

Roughly, when you do this, we end up believing that working copies exist on several different devices, but have no information about which copy or copies are up to date. //Usually// they all were already synchronized and are all up to date, but we can't make this assumption safely without risking data.

Instead, we err on the side of caution, and require a human to tell us which copy we should consider to be up-to-date, using `bin/repository thaw --promote`.

Test Plan:
```
$ ./bin/repository clusterize rLOCKS --service repos001.phacility.net
Service "repos001.phacility.net" is actively bound to more than one device
(local002.local, local001.phacility.net).

If you clusterize a repository onto this service it will be unclear which
devices have up-to-date copies of the repository. This leader/follower
ambiguity will freeze the repository. You may need to manually promote a
device to unfreeze it. See "Ambiguous Leaders" in the documentation for
discussion.

    Continue anyway? [y/N]
```

Read other changes.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12087

Differential Revision: https://secure.phabricator.com/D17169
2017-01-10 12:45:55 -08:00
epriestley
00e2755eab Provide tailored strings for revision creation
Summary: See D17169. Ref T11114.

Test Plan: {F2333825}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17170
2017-01-10 12:45:36 -08:00
epriestley
11f3a8cfca Force 'changes' to a string in hunk migration
Summary: Fixes T12090. In obscure situations lost to the mists of time, the `changes` column could be `null`. Force a string cast so the migration finishes, even though these changesets are likely meaningless.

Test Plan:
I did a force-reapply as a sanity check:

```
$ ./bin/storage upgrade -f --apply phabricator:20161213.diff.01.hunks.php
```

That went cleanly; it would only have caught dramatic errors, but I didn't completely butcher things.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12090

Differential Revision: https://secure.phabricator.com/D17168
2017-01-10 12:28:09 -08:00
Chad Little
6816974d57 Basic Favorites application
Summary: Ref T5867. Rough in a Favorites application, not wired to anything.

Test Plan: tbd. currently 404s so... I messed up something. Tossing up to read.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17160
2017-01-10 11:20:44 -08:00
epriestley
7ea1bd5a5a Fix two cluster repository documentation typos
Summary: Ref T12087. Caught these while re-reading.

Test Plan: O.O

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12087

Differential Revision: https://secure.phabricator.com/D17167
2017-01-09 17:43:48 -08:00
epriestley
fda83094ac Restore missing behavior for Differential keyboard navigation
Summary: Fixes T12086. This got dropped by accident while cleaning up haunting.

Test Plan: Loaed a revision, hit "?", hit n/j/p/etc

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12086

Differential Revision: https://secure.phabricator.com/D17166
2017-01-09 12:57:49 -08:00
epriestley
0e1388340c Make profile menu /edit/ requests explicitly 404
Summary:
See D17160. Previously, the `/edit/` route was never linked, but fataled when accessed. Make it 404 instead.

Also, fix an issue where editing "Application" menu items would fail because they didn't have a viewer.

Test Plan:
  - Hit `/edit/`, got a 404.
  - Edited an "Application" item.
  - Moved, added, deleted, and edited other items.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17165
2017-01-09 12:13:57 -08:00
epriestley
2dfe79cfc7 When updating revisions in response to commits, reuse previously generated diffs
Summary:
Fixes T10968. In rare situations, we can generate a diff, then hit an error which causes this update to fail.

When it does, we tend to get stuck in a loop creating diffs, which can fill the database up with garbage. We saw this once in the Phacility cluster, and one instance hit it, too.

Instead: when we create a diff, keep track of which commit we generated it from. The next time through, reuse it if we already built it.

Test Plan:
  - Used `bin/differential attach-commit <commit> <revision>` to hit this code.
  - Simulated a filesystem write failure, saw the diff get reused.
  - Also did a normal update, which worked properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10968

Differential Revision: https://secure.phabricator.com/D17164
2017-01-09 12:13:44 -08:00
epriestley
27ecedd1d5 Use some more human-readable Conduit keys in updated API methods
Summary:
Ref T12074. This uses more consistent Conduit keys for constraint names.

This is a minor compatibility break on watchers/members but since these methods are more useful now this is probably a good time to try to get away with it, and a more consistent API is better in the long run. I need to issue compatibility guidance for the milestones thing anyway and that one isn't avoidable, so try to rip the bandage off all in one go.

Test Plan: Reviewed new constraint names from console, called methods using them.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17161
2017-01-09 08:42:23 -08:00
epriestley
b08c9b3ffa Remove extra container tag on HandleListViews rendering from ModularTransactions in text mode
Summary:
Fixes T12082. Ref T11114. When modular transaction render a handle list, they use HandleListView, which has a text mode.

However, the HandleListView is a TagView, and currently TagViews always render a tag of some kind. Allow them to return `null` to decline to render any tag.

Test Plan:
  - Added a pile of debugging stuff to `ApplicationTransactionEditor` to throw during mail generation.
  - Added a reviewer to a revision.
  - Used `bin/worker execute --id ...` to hit the mail generation repeatedly.
  - Before patch: mail generated with a <span>, even in text mode.
  - After patch: clean mail generation.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12082, T11114

Differential Revision: https://secure.phabricator.com/D17162
2017-01-09 08:41:59 -08:00
epriestley
425deeb523 Fix an issue which could prevent blocking reviewers from being removed from revisions
Summary: Ref T11114. After evaluating typeahead tokens, we could process blocking reviewer removals incorrectly: we may get structures back.

Test Plan: Removed blocking reviewers from the web UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17163
2017-01-09 08:41:46 -08:00
epriestley
aa6e788f36 Mark "v3" API methods as stable; mark obsoleted methods as "Frozen"
Summary:
Ref T12074. The "v3" API methods (`*.search`, `*.edit`) are currently marked as "unstable", but they're pretty stable and essentially all new code should be using them.

Although these methods are seeing some changes, almost all changes are additive (support for new constraints or attachemnts) and do not break backward compatibility. We have no major, compatibility-breaking changes planned.

I don't want to mark the older methods "deprecated" yet since `arc` still uses a lot of them and there are some capabilities not yet available on the v3 methods, but introduce a new "frozen" status with pointers to the new methods.

Overall, this should gently push users toward the newer methods.

Test Plan: {F2325323}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17158
2017-01-09 07:16:27 -08:00
epriestley
63bfa5ccb5 Add "project.column.search" for querying workboard column information
Summary:
Ref T12074. Provide a basic but functional v3 API endpoint for reading workboard column information.

There is no equivalent to this in the UI yet, although there may be some day (perhaps adjacent to T5024).

Test Plan:
  - Queried for all columns.
  - Queried for columns on a particular board using `projectPHIDs`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17157
2017-01-08 13:19:02 -08:00
epriestley
ad3745c801 Add a "columns" attachment to the maniphest.search API method
Summary:
Ref T12074. This allows callers to identify which columns an object appears in (currently, always tasks).

There are a few major cases:

  - Object is in a normal column: we return column information.
  - Object is in a proxy column (subproject or milestone). For example, when you look at the board for "Some Parent Project", the task might show up in a milestone column. I've chosen to not return anything in this case: you can figure out that the task is there by looking at the project structure, and this is kind of an internal artifact of the implementation and probably not useful to callers.
  - Project does not have a workboard: we return nothing.

These seem fairly reasonable, I think?

Test Plan:
  - Queried for tasks, using the "columns" attachment.
  - Dragged a task across a board, querying it repeatedly. Got expected results for normal column (the column), subprojects with no board (nothing), milestones with no board (nothing) and mielstones/subprojects with a board (the column on //that// board, only, not the proxy column on the parent).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17156
2017-01-08 13:18:01 -08:00
epriestley
9fa7355edc Support "parentPHIDs" and "ancestorPHIDs" as constraints in project.search API
Summary:
Ref T12074. Allows querying for project by direct parent (find only immediate children) or any ancestor (find all descendants) using the API.

There's no proper web UI for this since I'm not sure how useful it is, but you can `/project/?parent=PHID-PROJ-...` or `/project/?ancestor=...` for now. We can add UI later if/when use cases arise, but it's not immediately clear to me that this is useful to do from the web.

Test Plan:
 - From API, queried with `parentPHIDs` and `ancestorPHIDs`, finding direct children only and all descendants, respectively.
 - From web UI, fiddled with `?parent=...` and `?ancestor=...` to make sure they work too. This isn't intended to be a user-facing feature.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17155
2017-01-08 13:16:03 -08:00
epriestley
c0bec6c0ed Add "parent" and "ancestor" information to the project.search API
Summary:
Ref T12074.

  - Adds a new "parent" property on main results. This shows an abbreviated version of the project's parent, or `null` if the project is a root project.
  - Adds a new "ancestor" attachment to pull the entire ancestor list.
  - Adds a new "depth" property on main results.
  - You can use "parent" or "depth" to tell if a project is a subproject or not.

These attempt to balance convenience, power, and performance: the full ancestor list can be big so I made it an attachment, but the other stuff isn't too big and is cheap and seems reasonable to always include.

Test Plan:
In API results:

  - Saw null parent (root projects) and non-null parent (subprojects/milestones).
  - Used "ancestors" attchment, got full list of ancestors.
  - Saw appropriate "depth" values.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17154
2017-01-08 13:14:19 -08:00
epriestley
e03103f349 Return milestone information in project.search
Summary:
Ref T12074.

  - `project.search` now returns milestones by default.
  - A new constraint, `isMilestone`, allows filtering to milestones, non-milestones, or both (API and web UI).
  - `project.search` now returns a milestone number for milestones, or `null` for non-milestones.

NOTE: Existing custom saved queries in projects which previously did not return milestones now will. I expect this to have little-to-no impact on users, and these queries are easy to correct, but I'll note this in changelogs.

Test Plan:
  - Ran various queries with `project.search` and in the web UI, searching for milestones, non-milestones, and both.
  - Web UI default behavior (no milestones) is unchanged, but you can now get milestones if you want them.
  - Queried a milestone by ID/PHID via API.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12074

Differential Revision: https://secure.phabricator.com/D17153
2017-01-08 13:11:07 -08:00
epriestley
f16778fc18 Fix excessively strict "Can Use Application" policy filtering
Summary:
Ref T9058. The stricter filtering is over-filtering Handles. For example, in the Phacility cluster, users can not see Almanac services.

So this filtering happens:

  - The AlmanacServiceQuery filters the service beacuse they can't see the application.
  - The HandleQuery generates a "you can't see this" handle.
  - But then the HandleQuery filters that handle! It has a "service" PHID and the user can't see Almanac.

This violates the assumption that all application code makes about handles: it's OK to query handles for objects you can't see, and you'll get something back.

Instead, don't do application filtering on handles.

Test Plan:
  - Added a failing test and made it pass.
  - As a user who can not see Almanac, viewed an Instances timeline.
    - Before patch: fatal on trying to load a handle for a Service.
    - After patch: smooth sailing.

Reviewers: chad

Maniphest Tasks: T9058

Differential Revision: https://secure.phabricator.com/D17152
2017-01-08 11:01:36 -08:00
epriestley
d4248d231b Correct "Manage Password" link in Quickling in Diffusion
Summary: Fixes T12080. This was missing a "/", but stop hard-coding these URIs.

Test Plan: Clicked both links with Quickling as a logged-in and logged-out user, ended up in the right place.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12080

Differential Revision: https://secure.phabricator.com/D17151
2017-01-08 08:20:23 -08:00
Chad Little
8a85ee7c15 Add CustomPHID to PhabricatorProfileMenuEngineConfiguration
Summary: Ref T5867, adds a customPHID field, nullable, and lets you query by it... i think? Not fully able to grok all the EditEngine stuff, but I think this is the right place for the query.

Test Plan: Not wired to anything, but pulling up project menu, editing, all still works.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T5867

Differential Revision: https://secure.phabricator.com/D17149
2017-01-07 10:49:54 -08:00
epriestley
363084d4fa Fix an issue where setting a recurrence end date on a Calendar event without one could fatal
Summary: Ref T11816. The underlying format of recurrence end dates swapped around a bit and we now try to compare `null` to a valid date if you're setting it for the first time.

Test Plan:
  - On a new event, set a recurrence end date.
  - Then, removed a recurrence end date.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11816

Differential Revision: https://secure.phabricator.com/D17150
2017-01-06 16:36:09 -08:00
epriestley
5ff02058a4 Make JX.Tooltip more conservative about positioning
Summary:
Fixes T10687. Fixes T12064.

  - Primarily, adds a margin around the edge of the screen for the purposes of aligning the tooltip.
  - Also, tries to flip the tooltip if it can (e.g., if the tooltip normally goes east, try west first), then tries other positions exhastively.

Test Plan:
{F2309363}

{F2309364}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12064, T10687

Differential Revision: https://secure.phabricator.com/D17145
2017-01-05 16:03:25 -08:00
epriestley
1f2306999b Fix a case where "Accept + Comment" would ignore the "Accept"
Summary:
Ref T11114. When you comment, we try to upgrade your review status to "commented".

This can conflict with upgrading it to "accepted" or "rejected", or removing it entirely.

For now, just avoid making this update. After T10967, I expect "you commented" to be orthogonal to accepted/rejected so it should stop conflicting on its own.

Test Plan:
  - As an "added" reviewer, accepted a revision with a comment in the same transaction.
  - Before patch: accept didn't stick.
  - After patch: accept sticks.

This may be somewhat magical/order-dependent but I was able to reproduce it locally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T11114

Differential Revision: https://secure.phabricator.com/D17146
2017-01-05 11:30:20 -08:00
epriestley
68374aa264 Correct a "bin/mail" command in "Show Raw Email" help text
Summary: Fixes T12068. These are inbound messages, not outbound.

Test Plan: Read carefully.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12068

Differential Revision: https://secure.phabricator.com/D17144
2017-01-05 08:59:39 -08:00
epriestley
103b450713 Nutritious vitamin paste.
Auditors: chad
2017-01-04 19:18:14 -08:00
epriestley
4b94ae15e0 Straighten out some stacked action removal behaviors
Summary: Fixes T12065. Some of the normal behavior of these actions got juggled when I made "Accept" and "Reject" conflict.

Test Plan:
  - Added "Accept".
  - Added "Reject", saw it remove "Accept".
  - Added "Change Projects".
  - Added "Assign/Claim".
  - Removed "Assign/Claim".
  - Removed "Accept".

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12065

Differential Revision: https://secure.phabricator.com/D17143
2017-01-04 19:16:58 -08:00
Chad Little
96fbf37dcc Bring up contrast on light green / red diffs
Summary: Minor color saturation here, ideal for low quality monitors.

Test Plan:
Review new colors in various scenarios.

{F2305178}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17141
2017-01-04 15:18:24 -08:00
epriestley
2855470b31 Show an info view warning for ongoing or failed builds in Differential
Summary:
Fixes T10136. This reinforces ongoing or failed builds in the comment action area.

We already emit a similar message for unit test failures from `arc unit`. This should probably obsolete that, eventually.

Test Plan:
{F2304809}

{F2304810}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10136

Differential Revision: https://secure.phabricator.com/D17140
2017-01-04 15:12:45 -08:00
epriestley
10171e2101 Allow "O42" to find packages by monogram in Owners typeaheads
Summary: When a user queries by package monogram explicitly, search by package ID.

Test Plan: {F2305075}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17142
2017-01-04 15:08:37 -08:00
epriestley
ef05bf335d Allow Harbormaster builds to publish to a different object
Summary:
Fixes T9276. Fixes T8650. The story so far:

  - We once published build updates to Revisions.
  - An unrelated fix (D10911) sent them to the Diffs instead of Revisions, which isn't useful, since you can't see a diff's timeline anywhere.
  - This also caused a race condition, where the RevisionEditor and DiffEditor would update the diff simultaneously (T8650).
  - The diff update was just disabled to avoid the race (part of D13441).
  - Instead, allow the updates to go somewhere else. In this case, we send commit updates to the commit but send diff updates to the revision so you can see 'em.
  - Since everything will be using the revision editor now, we should either get proper lock behavior for free or it should be easy to add if something whack is still happening.
  - Overall, this should pretty much put us back in working order like we were before D10911.

This behavior is undoubtedly refinable, but this should let us move forward.

Test Plan:
Saw a build failure in timeline:

{F2304575}

Reviewers: chad

Reviewed By: chad

Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam

Maniphest Tasks: T9276, T8650

Differential Revision: https://secure.phabricator.com/D17139
2017-01-04 13:46:39 -08:00
Chad Little
e9243f22b9 Add Form MenuItem, Fix EditEngine Typeahead
Summary: Adds a FormEditEngine MenuItem for adding forms to Projects, Home, QuickCreate. Also adds an EditEngine typeahead that has token rendering issues currently.

Test Plan: Set a normal form as a menu item, edit it, set the name. Set a custom form as a menu item, edit it, set a name.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D17098
2017-01-04 13:12:32 -08:00
Chad Little
aa9708c5d3 Update diff highlight colors for better color blindess distinction
Summary: Tweaks the diff colors here a bit, as well as making full diffs slightly easier to read in full. Ref T12060

Test Plan:
Tested prose diffs, email prose diffs, and a regular Differential revision.

{F2304056}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T12060

Differential Revision: https://secure.phabricator.com/D17138
2017-01-04 11:35:19 -08:00
epriestley
c2f9e7f6e6 Remove an extra "`" from the documentation
Summary: One too many.

Test Plan: Counted carefully.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D17137
2017-01-04 11:09:33 -08:00
epriestley
4516109495 Survive hand-crafted Git commits which are missing timestamp information
Summary:
Fixes T12062. Like the commits from the year 3500, you can artificially build commits with no date information.

We could explicitly store these as `null` to fully respect the underlying datastore. However, I think it's very unlikely that these commits are intentional/meaningful or that this is valuable.

Additionally, "git show" interprets these commits as "Jan 1, 1970". Just store a `0` to mimic its behavior.

Test Plan:
  - Following the process in T11537#192019, artificially created a commit with //no// date information (I deleted all date information from the message).
  - Used `git show` / `git log --format ...` to inspect it: "Jan 1, 1970" on `git show`, no information at all on `%aD`, `%aT`, etc.
  - Pushed it.
  - Saw exception for trying to insert empty string into epoch colum from `bin/repository update`.
  - Applied patch.
  - Got a clean import.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12062

Differential Revision: https://secure.phabricator.com/D17136
2017-01-04 09:07:46 -08:00
epriestley
c07ec8fee6 Preserve nonstandard ports during 404 redirects which add "/" to the ends of URIs
Summary:
Fixes T12058. When the user visits `/maniphest`, for example, we redirect to `/maniphest/`.

Since this redirect is very low-level (at the Aphront level, below the Site level) we need to preserve the request Host rather than correct it to `PhabricatorEnv::getURI()` or similar -- the request may be hiting a different Site like a blog domain.

Currently, we do not preserve the port. Instead, preserve the port if it is not a standard port for the protocol (80 for http, 443 for https).

Test Plan:
  - Made a request with a missing slash and a normal port in my browser, got redirected normally.
  - Made a request with a missing slash and a nonstandard port, got redirected on the same port.

```
$ curl -H 'Host: local.phacility.com:123' -v http://local.phacility.com/diffusion
*   Trying 127.0.0.1...
* Connected to local.phacility.com (127.0.0.1) port 80 (#0)
> GET /diffusion HTTP/1.1
...
>
< HTTP/1.1 302 Found
...
< Location: http://local.phacility.com:123/diffusion/
...
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T12058

Differential Revision: https://secure.phabricator.com/D17134
2017-01-04 06:55:10 -08:00
Chad Little
489587d607 Add download link to embedded files
Summary: Ref T3612. Doesn't render correctly, need help please. Adds a download icon into the renderfilelinkview to allow easier downloads.

Test Plan: Click on link, get download, click on file, get lightbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T3612

Differential Revision: https://secure.phabricator.com/D16980
2017-01-03 10:50:26 -08:00