1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-11 01:12:41 +01:00
Commit graph

11108 commits

Author SHA1 Message Date
epriestley
5520729db3 Remove recently added repository_pathchange key
Summary:
Ref T10560. Reverts D15460. See that task for discussion: we dug up some more information to explain the behavior, and this key was just sort of sidestepping an analyze/cardinality estimate issue on the index.

With proper cardinality estimates it shouldn't be used, so just nuke it.

Test Plan: Ran `bin/storage adjust`, saw key drop.

Reviewers: eadler, chad

Reviewed By: chad

Maniphest Tasks: T10560

Differential Revision: https://secure.phabricator.com/D15486
2016-03-16 14:58:56 -07:00
epriestley
772c658aac Convert one-time file access tokens to modular token types
Summary: Fixes T10603. This is the last of the ad-hoc temporary tokens.

Test Plan:
  - Used a file token.
  - Viewed type in {nav Config > Temporary Tokens}.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15481
2016-03-16 09:34:52 -07:00
epriestley
6ef4747e9d Convert OAuth1 handshake tokens to new modular temporary tokens
Summary: Ref T10603. Swap these over and give them nice UI strings.

Test Plan:
- Refreshed a Twitter OAuth link.
- Unlinked and re-linked a Twitter account.
- Viewed the new type in {nav Config > Temporary Tokens}.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15480
2016-03-16 09:34:18 -07:00
epriestley
33a95d44bd Formally modularize MFA/TOTP tokens, provide a module panel for temporary tokens
Summary:
Ref T10603. We have a couple of sort of ad-hoc tokens, so start formalizing them. First up is MFA tokens.

Also adds a new config module panel for these.

Test Plan:
  - Added MFA.
  - Added MFA, intentionally fumbled the input, completed the workflow.
  - Removed MFA.
  - Viewed tokens, saw MFA sync tokens.
  - Viewed new module config panel.

{F1177014}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15479
2016-03-16 09:33:58 -07:00
epriestley
a837c3d73e Make temporary token storage/schema more flexible
Summary:
Ref T10603. This makes minor updates to temporary tokens:

  - Rename `objectPHID` (which is sometimes used to store some other kind of identifier instead of a PHID) to `tokenResource` (i.e., which resource does this token permit access to?).
  - Add a `userPHID` column. For LFS tokens and some other types of tokens, I want to bind the token to both a resource (like a repository) and a user.
  - Add a `properties` column. This makes tokens more flexible and supports custom behavior (like scoping LFS tokens even more tightly).

Test Plan:
- Ran `bin/storage upgrade -f`, got a clean upgrade.
- Viewed one-time tokens.
- Revoked one token.
- Revoked all tokens.
- Performed a one-time login.
- Performed a password reset.
- Added an MFA token.
- Removed an MFA token.
- Used a file token to view a file.
- Verified file token was removed after viewing file.
- Linked my account to an OAuth1 account (Twitter).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15478
2016-03-16 09:33:38 -07:00
epriestley
8e3ea4e034 Use new modular temporary auth token constants in one-time login and password reset flows
Summary:
Ref T10603. This converts existing hard-codes to modular constants.

Also removes one small piece of code duplication.

Test Plan:
  - Performed one-time logins.
  - Performed a password reset.
  - Verified temporary tokens were revoked properly.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15476
2016-03-16 09:33:24 -07:00
epriestley
cf15e0de43 Modularize temporary token types
Summary:
Ref T10603. For LFS, we need to issue a new type of temporary token.

This makes the temporary token code modular so applications can add new token types without modifying the Auth application.

(I'm moving slowly here because it impacts authentication.)

Test Plan:
  - Used `bin/auth recover` to get a one-time token from the CLI.
  - Used "Forgot your password?" to get a one-time token from the web UI.
  - Followed the web UI token to initiate a password reset, prompting generation of a password token.
  - Viewed these tokens in the web UI:

{F1176908}

  - Revoked a token.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10603

Differential Revision: https://secure.phabricator.com/D15475
2016-03-16 09:33:05 -07:00
epriestley
121e68e3ad Fix an issue with rendering unit messages for diffs with no buildable
Summary: Fixes T10591. This was accidentally reverted in 148a50e48b, probably when resolvign a merge/rebase.

Test Plan: Will push to production.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10591

Differential Revision: https://secure.phabricator.com/D15474
2016-03-15 08:19:24 -07:00
Chad Little
d76175285e Update Diff view page to new layout
Summary: Converts Diff View, single column though.

Test Plan: Upload a new diff, review page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15470
2016-03-13 16:04:38 -07:00
Chad Little
301ecdef18 Convert Drydock to two column layout
Summary: Updates Drydock to use two column + curtain layouts.

Test Plan: Tested what I could get to, need @epriestley to run this locally for edge cases.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D15467
2016-03-13 08:10:36 -07:00
Chad Little
148a50e48b Convert Differential to new layout
Summary:
First pass at converting Differential, I likely have some buggy-poos but thought I'd toss this up now in case very bad bugs present.

To do:
- Need to put status back on Hovercards
- "Diff Detail" probably needs a better design

Test Plan: Looking at lots of diffs, admittedly I dont have harbormaster, etc, running locally. Checked Diffusion for Table of Content changes on small and large commits.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15463
2016-03-12 13:04:21 -08:00
epriestley
ba9cd64e51 Stop moving "Cc" addresses to "To" when building mail targets
Summary: Fixes T10539. When building mail targets, we fail to preserve whether a recipient was originally "To" or "Cc", and just move everyone to "To".

Test Plan:
Added a comment to a task with a "To" user and a "Cc" user, with `metamta.placeholder-to-recipient` set and `metamta.one-mail-per-recipient` set.

Got mail with me Cc'd as the Cc'd user:

{F1172020}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10539

Differential Revision: https://secure.phabricator.com/D15465
2016-03-12 07:30:00 -08:00
epriestley
de23ba0002 Fix a minor issue in Nuance which could cause the trigger daemon to poll too often
Summary: Ref T10537. Currently, when you have at least two cursors, the daemon can poll too frequently when processing the last source because it never hits the end-of-list condition.

Test Plan:
  - Ran `bin/phd debug trigger`.
  - Observed huge volumes of output before change as triggers fired as fast as possible.
  - Observed reasonable poll frequency after change.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15464
2016-03-12 05:04:42 -08:00
epriestley
d511308a79 Add a Phrequent curtain extension
Summary: Fixes T10546. Some day, decades from now, we can revisit this when we iterate on Phrequent. Just don't regress for no real reason in the meantime, since it's easy enough to keep it working in reasonable shape.

Test Plan: {F1169096}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10546

Differential Revision: https://secure.phabricator.com/D15461
2016-03-10 18:45:04 -08:00
Burak Yigit Kaya
60b42750b6 Cast old duration values for unit tests to float in DifferentialController
Summary: Fixes T10549.

Test Plan: N/A

Reviewers: #blessed_reviewers, avivey, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Maniphest Tasks: T10549

Differential Revision: https://secure.phabricator.com/D15452
2016-03-10 18:15:46 -08:00
epriestley
68b468a846 Partially improve threading UI for adjacent inline comments
Summary:
Ref T10563. This isn't a complete fix, but should make viewing complex inline threads a little more manageable.

This just tries to put stuff in thread order instead of in pure chronological order. We can likely improve the display treatment -- this is a pretty minimal approach, but should improve clarity.

Test Plan:
T10563 has a "before" shot. Here's the "after":

{F1169018}

This makes it a bit easier to follow the conversations.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10563

Differential Revision: https://secure.phabricator.com/D15459
2016-03-10 17:40:13 -08:00
epriestley
99bc1b05d7 Use more explicit language for unassigning tasks
Summary:
Ref T10493.

  - Call this action "Unassigned" instead of "Up For Grabs", since the latter implies that it's OK for anyone to grab it, which is a social/context thing that we probably shouldn't assume.
  - Show who a task was previously assigned to in the transaction.

The text is a little clunky, yell if you've got a better wording? Or maybe I'll come up with something.

Test Plan: {F1166299}

Reviewers: chad

Reviewed By: chad

Subscribers: cburroughs

Maniphest Tasks: T10493

Differential Revision: https://secure.phabricator.com/D15454
2016-03-10 17:39:06 -08:00
epriestley
ca4c0db2c1 Add a key to improve Diffusion's cache fill history query
Summary:
Ref T10560. I don't fully understand what MySQL is doing here, but it looks like this key improves the problematic dataset in practice.

(It makes sense that this key helps, I'm just not sure why the two separate keys and the UNION ALL are so bad.)

This key isn't hugely expensive to add, so we can try it and see if there are still issues.

Test Plan: Ran `bin/storage adjust`, saw key added to table. Used `SHOW CREATE TABLE ...` to verify the key exists. Used `EXPLAIN SELECT ...` to make sure MySQL actually uses it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10560

Differential Revision: https://secure.phabricator.com/D15460
2016-03-10 17:38:36 -08:00
epriestley
8858b6cf8d When replying to a ghost comment, attach the reply to the same place
Summary:
Fixes T10562. I left this behavior sort of ambiguous in the original implementation because I didn't anticipate or stumble across this situation.

It's easy to fix: when you reply to a ghost, just put the reply in the exact same place as the ghost (even if it's a different diff), so they always move/ghost/port/thread together.

Test Plan:
See T10562 for reproduction steps and a "before" picture. Here's the after picture:

{F1168983}

The two comments at the bottom are pre-fix, and exhibit the bug. The comment at the top is post-fix, and appears adjacent to the original correctly.

Reviewers: chad

Reviewed By: chad

Subscribers: eadler

Maniphest Tasks: T10562

Differential Revision: https://secure.phabricator.com/D15458
2016-03-10 16:41:49 -08:00
epriestley
7b8da99914 Move DifferentialRevisionViewController to newPage()
Summary: I think this works?

Test Plan:
i am wizard

{F1168808}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15457
2016-03-10 13:22:25 -08:00
Chad Little
31984a78ee Add date to author panel in Maniphest
Summary: Adds a date with the author name on the Authored By panel in Maniphest. A basic treatment, will see how it feels.

Test Plan: Look at a few tasks

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15456
2016-03-10 09:10:00 -08:00
Chad Little
e351eba744 Add a footer to PHUITwoColumnView
Summary: This allows setting of full-width content underneath the two column, or full column all by itself. Maybe these names are bad.

Test Plan: Using these in Differential / Diffusion conversions.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15455
2016-03-09 19:18:26 -08:00
epriestley
27ce691839 Fix an issue with the Herald engine field value cache
Summary:
To improve the performance of Herald, we attempt to generate the value for each field (e.g., a task title) only once.

For most field values this is cheap, but for some (like a commit's branches) it can be quite expensive. We only want to pay this cost once, so we cache field values.

However, D12957 accidentally added a check where we bypass the cache and generate the value for every field, before reading the cache. This causes us to generate each field for every rule that uses it, plus one extra time.

Instead, use the cache for this check, too. Also allow the cache to cache `null`, since it can be expensive to generate `null` even though the value isn't too interesting.

The value of this early hit isn't even used (we only care if it throws or not).

Test Plan:
  - Wrote a rule like "if any condition matches: branches contain a, branches contain b, branches contain c".
  - Put `phlog(new Exception())` in `DiffusionCommitBranchesHeraldField`.
  - Before patch, saw `bin/repository reparse --herald <any commit>` compute branches three times.
  - After patch, saw only one computation.
  - Verified field values in the transcript view

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15451
2016-03-09 10:28:50 -08:00
epriestley
d7cd2a9b9c Begin adding test coverage to GitHub Events API parsers
Summary:
Ref T10538.

This is a tiny fraction of the API. GitHub has 25 primary event types; we currently partially parse 3 of them. GitHub has 17 issue event types; we currently partially parse 12.

Test Plan: Ran `arc unit`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10538

Differential Revision: https://secure.phabricator.com/D15448
2016-03-09 09:30:07 -08:00
epriestley
638ccf9dcb Begin bridging GitHub objects through Doorkeeper
Summary:
Ref T10538. This sets up a Doorkeeper bridge for GitHub issues, and pulls issues from GitHub to create ExternalObject references.

Broadly, does nothing useful.

Test Plan: Put a `var_dump()` in there somewhere and saw it probably do something when running `bin/nuance update --item 44`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10538

Differential Revision: https://secure.phabricator.com/D15447
2016-03-09 09:29:21 -08:00
epriestley
72889c09bf Split the GitHub import cursor into separate repository and issues event importers
Summary:
Ref T10538. The primary GitHub event activity stream does not report minor events (labels, milestones, etc).

GitHub has a second, similar activity stream which does report these events (the "Issues Events API").

Use two separate cursors: one consumes the primary stream; the second consumes the events stream.

One possible issue with this is that we may write events in a different order than they occurred, so GitHub shows "comment, label, close" but we show "comment, close, label" or similar. This is probably OK because the secondary API doesn't seem to have any very important events (e.g., it's probably fine if label changes are out-of-order), but we can conceivably put some buffer stage in between the two if it's an issue.

Test Plan: {F1164894}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10538

Differential Revision: https://secure.phabricator.com/D15446
2016-03-09 09:27:19 -08:00
epriestley
1e83aef880 Give Nuance items some basic descriptive text
Summary: Ref T10537. Ref T10538.

Test Plan: {F1164858}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537, T10538

Differential Revision: https://secure.phabricator.com/D15445
2016-03-09 09:26:59 -08:00
epriestley
ee155ce8d2 Move Nuance Items to two-column views
Summary: Ref T10537.

Test Plan:
{F1164796}

{F1164797}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15444
2016-03-09 09:26:42 -08:00
Chad Little
2da9fcafbf Update project manage page for two column
Summary: Fixes T10545. Converts layout to two column.

Test Plan: Review a few project manage pages, see new layout and flag ability.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10545

Differential Revision: https://secure.phabricator.com/D15450
2016-03-09 09:11:48 -08:00
Chad Little
1392872c5c Convert people manage page to two column
Summary: Ref T10545, this brings flags back? and converts the layout to two column w/curtain

Test Plan: View a few manage pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10545

Differential Revision: https://secure.phabricator.com/D15449
2016-03-09 08:57:11 -08:00
epriestley
e5f867e0df Add Nuance daemons and item types
Summary:
Ref T10537. This adds an update daemon for pulling item data (e.g., figuring out who the author of a GitHub comment is) and routing items (e.g., sending them to a queue or applying them directly to a task).

Also adds `bin/nuance update --item X` for doing this manually for debugging.

And adds item types, for specializing item behavior. Previously, sources completely dictated item behavior, but I think we want something a little more flexible.

Test Plan:
  - This still does nothing.
  - Ran `bin/nuance update --item 15`.
  - Saw an item route to a default queue.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15441
2016-03-09 03:43:06 -08:00
Chad Little
3d44a5c253 Polish up timeline for PHIUTwoColumnView
Summary: This inverts colors and icons a bit, so they're not as harsh. So instead of a dark green item with white icon, its now light green with a dark green icon. I've also changed all text and comment boxes to be "grey" visually to separate out the UI from converation/actions. Give it a spin and let me know how this feels. I still need to update the comment UI.

Test Plan:
UIExamples, lots of various tasks and diffs.

{F1163837}

{F1163839}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15442
2016-03-08 17:51:53 -08:00
epriestley
5d6bb0ffeb Import raw GitHub event data into Nuance
Summary:
Ref T10537. Ref T10538. This polls the GitHub events API and creates Nuance items from the raw data.

It does nothing useful with them.

Test Plan:
  - Polled GitHub.
  - Saw some items get created.
  - X-Poll-Interval seemed to work.
  - ETag seemed to work.
  - Recognizing when we hit items we've already seen seemed to work.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537, T10538

Differential Revision: https://secure.phabricator.com/D15440
2016-03-08 12:03:11 -08:00
Chad Little
e3a97e31a0 Update Phurl to PHUITwoColumnView
Summary: Cleaner UI, moved visit to be button.

Test Plan: Make a phurl about cats, click on it.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15385
2016-03-08 19:53:44 +00:00
epriestley
fe01949a5c Add a Nuance GitHub repository source and basic polling
Summary: Ref T10537. Ref T10538. This calls GitHub, sorta?

Test Plan:
```
$ ./bin/nuance import --source poem
<cursor:events.repository> Polling GitHub Repository API endpoint "/repos/epriestley/poems/events".
<cursor:events.repository> This key has 4,988 remaining API request(s), limit resets in 1,871 second(s).
<cursor:events.repository> ETag for this request was ""4abdd3d66ad5ca38f5117b094e76f4ba"".
array(4) {
  [0]=>
  array(7) {
    ["id"]=>
    string(10) "3733510485"
...
```

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537, T10538

Differential Revision: https://secure.phabricator.com/D15439
2016-03-08 10:33:05 -08:00
epriestley
2a3c3b2b98 Provide bin/nuance import and ngram indexes for sources
Summary:
Ref T10537. More infrastructure:

  - Put a `bin/nuance` in place with `bin/nuance import`. This has no useful behavior yet.
  - Allow sources to be searched by substring. This supports `bin/nuance import --source whatever` so you don't have to dig up PHIDs.

Test Plan:
  - Applied migrations.
  - Ran `bin/nuance import --source ...` (no meaningful effect, but works fine).
  - Searched for sources by substring in the UI.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15436
2016-03-08 10:30:24 -08:00
epriestley
3f4cc3ad6e Allow Nuances sources to provide import cursors
Summary:
Ref T10537. Some sources (like the future "GitHub Repository" source) need to poll remotes.

  - Provide a mechanism for sources to emit import cursors.
  - Hook them into the trigger daemon so they'll fire periodically.
  - Provide some storage.

This diff does nothing useful or interesting, and is pure infrastructure.

Test Plan:
  - Ran `bin/storage upgrade -f`, no adjustment issues.
  - Poked around Nuance.
  - Ran the trigger daemon, verified it didn't crash and checked for Nuance stuff to do.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15435
2016-03-08 10:30:04 -08:00
epriestley
aa5df5fb07 Convert Nuance Sources to EditEngine
Summary: Ref T10537. Converts sources to EditEngine.

Test Plan:
  - Created a new source.
  - Edited an existing source.
  - Submitted a complaint with the complaint form.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15434
2016-03-08 10:29:48 -08:00
epriestley
8a7c963908 Allow applications to test if a user could edit a certain field by clicking "Edit Thing"
Summary: See D15432. There, we can use this test to check if the user //could// reassign the task by using "Edit Form" or the stacked actions, so any dedicated "claim" element is consistent with the other permissions.

Test Plan:
  - Added a `var_dump($can_reassign)` after the call.
  - Saw `true`.
  - Edited the edit form, locked and disabled "Assigned To".
  - Saw `false`.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15433
2016-03-08 10:29:34 -08:00
Chad Little
d653b125b5 Add back calendar comment form
Summary: Fix T10544, missed this in testing.

Test Plan: Pull up event, see form, leave comment.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10544

Differential Revision: https://secure.phabricator.com/D15437
2016-03-08 08:06:54 -08:00
epriestley
86768737c5 Move Nuance Queues to EditEngine
Summary: Ref T10537. Update queue editing to use EditEngine.

Test Plan:
  - Created a new queue.
  - Edited an existing queue.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15431
2016-03-07 17:02:05 -08:00
epriestley
6872b96808 Convert Nuance sources and queues to two-column + curtain
Summary: Ref T10537. Update the detail views.

Test Plan:
{F1162212}

{F1162213}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15430
2016-03-07 16:34:57 -08:00
epriestley
01ed526527 Modernize Nuance queries and search engines
Summary: Ref T10537. Minor updates to simplify and modernize these codepaths.

Test Plan: Searched for queues and sources.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15429
2016-03-07 15:50:47 -08:00
epriestley
98542637a1 Use modern SearchEngine construction in Nuance
Summary: Ref T10537. Minor cleanup of controllers to be more modern / work better on mobile.

Test Plan: Browsed all queue / source pages.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10537

Differential Revision: https://secure.phabricator.com/D15428
2016-03-07 15:50:28 -08:00
epriestley
2ddd78647b Improve "Land Revision" errors for issues related to staging areas
Summary: Ref T10093. Changes must be pushed to staging before they can be landed from the web.

Test Plan:
Changes must be pushed to staging before they can be landed from the web.

{F1161909}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10093

Differential Revision: https://secure.phabricator.com/D15427
2016-03-07 12:46:07 -08:00
epriestley
16a584ac7e Make bin/phd debug quieter by default
Summary:
By default, `bin/phd debug` activates `--trace`, which is incredibly verbose.

Instead, be moderately verbose by default, and only include tracing if `--trace` was passed to `bin/phd debug`.

See also D15422.

Test Plan:
  - Ran `bin/phd debug task`, got moderate amount of most useful debug output.
  - Ran `bin/phd debug task --trace`, got very verbose, detailed low-level debug output.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15423
2016-03-07 08:04:49 -08:00
epriestley
19eee427ad Improve Drydock errors for empty commits and missing changes
Summary: Ref T10093. Show better errors when a commit fails because it has already been merged and when a fetch fails because the ref isn't present in the remote.

Test Plan:
{F1160794}

{F1160795}

Reviewers: chad

Reviewed By: chad

Subscribers: michaeljs1990, yelirekim

Maniphest Tasks: T10093

Differential Revision: https://secure.phabricator.com/D15420
2016-03-07 05:29:25 -08:00
tycho.tatitscheff
821ba8b22e Fix a typo on Almanac User Guide
Summary:
Ref T10527
The lack of a * messed up the remarkup.

Test Plan:
Tested on my instance by pasting the sentence in a phriction document.
See the markup correctly done.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T10527

Differential Revision: https://secure.phabricator.com/D15421
2016-03-06 15:49:44 -08:00
Chad Little
85b85529ad Minor curtain spacing update
Summary: Removes unused CSS, cleans up curtain spacing.

Test Plan: Test maniphest, etc, in mobile, tablet, desktop

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15418
2016-03-06 13:35:53 -08:00
epriestley
fd9de5d6ec Convert every two-column application except Maniphest to curtain views
Summary: Moves over everything except Maniphest, which has some special behavior.

Test Plan:
  - Viewed a badge.
  - Viewed a calendar event.
  - Viewed a countdown.
  - Viewed a Fund initiative.
  - Viewed a Herald rule.
  - Viewed a macro.
  - Viewed an application.
  - Viewed an owners package.
  - Viewed a credential.
  - Viewed a Ponder question.
  - Viewed a poll.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15416
2016-03-06 10:44:07 -08:00
epriestley
eb1a0799ae Convert Maniphest to curtain view
Summary: Moves Maniphest over, and allows application to provide ad-hoc panels more easily.

Test Plan: {F1160591}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15417
2016-03-06 10:32:18 -08:00
epriestley
11774ef290 Use curtain views in Almanac
Summary: Convert Almanac interfaces to Curtain views.

Test Plan: Viewed Services, Bindings, Devices, Namespaces and Networks.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15415
2016-03-06 10:31:25 -08:00
epriestley
61f82bb97b Introduce "Curtain" views, panels, and extensions
Summary:
This opens up the new action column to have specialized rendering and behavior. Briefly:

  - Converted applications (right now, only Paste) render a `CurtainView` to build the column content.
  - This view uses new extensions to build panels (projects, subscribers, tokens).
  - The panel extension code and rendering can be changed without breaking old stuff.

Minor changes:

  - Token awards now load their tokens, for consistency/simplicity.
  - Removed the rest of the "fork of" / "forked from" UI in Paste -- I essentially removed these features a while ago, and no one has complained.

Test Plan:
UI is a bit rough, but works, and it's going to get changed now anyway:

{F1160550}

{F1160551}

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15414
2016-03-06 09:27:55 -08:00
epriestley
aaab1011e5 Give AphrontTagView a getViewer(), deprecate getUser()
Summary:
Two minor changes here:

  - Replace `get/setUser()` with `get/setViewer()` for consistency with everything else.
  - `getViewer()` now throws if no viewer is set. We had a lot of code that either "should" check this but didn't, or did check it in an identical way, duplicating work. In contrast, very little code checks for a viewer but works if one is not present.

Test Plan:
  - Grepped for `->user`.
  - Attempted to fix all callsites inside `*View` classes.
  - Browsed around a bunch of applications, particularly Calendar, Differential and Diffusion, which seemed most heavily affected.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15412
2016-03-06 09:27:38 -08:00
epriestley
abb4c03b47 Remove shouldShowSubscribersProperty() from SubscribableInterface
Summary:
Every caller returns `true`. This was added a long time ago for Projects, but projects are no longer subscribable.

I don't anticipate needing this in the future.

Test Plan: Grepped for this method.

Reviewers: chad

Reviewed By: chad

Differential Revision: https://secure.phabricator.com/D15409
2016-03-06 06:01:36 -08:00
Chad Little
220230e08c Fix typo in Phriction contne
Summary: Fix typo in infoview. Fixes T10524

Test Plan: Read.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10524

Differential Revision: https://secure.phabricator.com/D15410
2016-03-05 19:17:00 -08:00
Chad Little
5a28bff987 Fix variable in StandardPageView
Summary: Found this grepping for `contne`

Test Plan: render any standard page

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15411
2016-03-05 19:16:36 -08:00
Chad Little
6084b7a201 Update Owners for PHUITwoColumn
Summary: Clean up owners a bit, move to two columns.

Test Plan:
Review a package, edit paths, remove all paths. Archive.

{F1139351}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15388
2016-03-05 16:30:06 -08:00
epriestley
0569919eab Fix some visibility issues with inline comments in Diffusion
Summary:
Fixes T10519. Two issues:

First, the acting user wasn't explicitly included in the mail. This usually didn't matter, but could matter if you unsubscribed and then interacted.

Second, we had some logic which tried to hide redundant "added inline comment" transactions, but could hide them inappropriately. In particular, if another action (like a subscribe) was present in the same group, we could hide the inlines because of that other transaction, then //also// hide the subscribe. This particular issue is likely an unintended consequence of hiding self-subscribes.

Instead of hiding inlines if //anything else// happened, hide them only if:

  - there is another "added a comment" transaction; or
  - there is another "added an inline comment" transaction.

This prevents the root issue in T10519 (incorrectly hiding every transaction, and thus not sending the mail) and should generally make behavior a little more consistent and future-proof.

Test Plan:
  - Submitted //only// an inline comment on a commit I had not previously interacted with.
  - Before patch: no mail was generated (entire mail was improperly hidden).
  - After patch: got some mail with my comment.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10519

Differential Revision: https://secure.phabricator.com/D15407
2016-03-05 14:18:49 -08:00
Chad Little
090252a89e Clean up Macro view page
Summary: Sets a header icon, makes "Details" not show if empty, simplifies title.

Test Plan: Review a few Macro pages for changes with and without audio.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15406
2016-03-05 12:42:26 -08:00
Chad Little
010b7811b4 Convert Applications to two column view
Summary: Converts the meta applications application view layout to two column

Test Plan: click through "Configure" on each application, set up some emails. uninstall Phrequent

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15405
2016-03-05 20:34:56 +00:00
Chad Little
f6127f5835 Convert Almanac Binding View to two columns
Summary: Moves over to the new layout. Fixes T10521

Test Plan: Make a binding, view page, add some properties.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10521

Differential Revision: https://secure.phabricator.com/D15404
2016-03-05 08:23:49 -08:00
Chad Little
5a43e2040e Fix header tag on Hovercards
Summary: Switch to new method.

Test Plan: Hover over task, see tag in correct place.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15403
2016-03-05 15:25:06 +00:00
Chad Little
fec1a154d5 Expand scope of addActionItem in PHUIHeaderView
Summary: Gives a bit more flexibility to add anything to the right side of PHUIHeaderView.

Test Plan: Test Maniphest, Workboards, Project Home, Differential. Grep for `addActionIcon` use. Fixes T10518

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10518

Differential Revision: https://secure.phabricator.com/D15402
2016-03-04 18:35:05 -08:00
Chad Little
2b1ac4fcec Update Maniphest for PHUITwoColumnView
Summary: Reworks Maniphest into a two column view. Moves priority and color to header, assignee to sidebar. quest points to header, and author to gutter. may be some confusion since priority only displays on open tickets.

Test Plan: with and without description, custom fields, points, tablet, mobile and desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15396
2016-03-04 17:26:38 -08:00
epriestley
2f14a59b1d Unprototype Drydock
Summary:
Ref T10246. Drydock still has a few outstanding issues, but it's mostly minor UI stuff and the documentation has reasonable caveats about it.

Broadly, I don't expect to make any major changes to Drydock in the future (i.e., all the fundamentals seem sound at this point) and it doesn't have any major technical debt or, like, obsolete APIs or anything.

Test Plan: Saw "Drydock" as not-a-prototype in Applications.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246

Differential Revision: https://secure.phabricator.com/D15401
2016-03-04 17:23:07 -08:00
epriestley
809646c8d2 Unprototype Almanac
Summary: Fixes T10449. Almanac doesn't do a whole lot for the average user, but is in good shape technically and works well, and exposing it in the cluster won't let installs destroy themselves now.

Test Plan: Re-read documentation; grepped for `TODO` (there are a couple, but reasonable to push off); browsed around all the UI things (new two-column looks great), called API methods.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15400
2016-03-04 17:22:49 -08:00
epriestley
85bf04ea02 Use EditEngine for AlmanacDevice
Summary: Ref T10449. Modernize the AlmanacDevice code a bit.

Test Plan:
  - Created a device.
  - Edited a device.
  - Listed devices.
  - Viewed a device.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15399
2016-03-04 17:22:33 -08:00
epriestley
167da4ec52 Move Almanac Services to EditEngine
Summary: Ref T10449. This modernizes the service creation/editing flow and updates the list view code a little bit.

Test Plan:
  - Created a service.
  - Edited a service.
  - Browsed services.
  - Hit policy exception for editing cluster services with no permission.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15398
2016-03-04 17:22:00 -08:00
Chad Little
13813d2268 Minor Ponder spacing updates
Summary: Fix an issue where you've already answered, moved the summary section.

Test Plan: Review an answer with a wiki that i've already answered

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15395
2016-03-03 15:22:33 -08:00
epriestley
e6158391d2 Make Drydock repository operations a little more modern and consistent
Summary: Ref T10457. Use modern controller and UI tech to build the list view and actions.

Test Plan:
  - Viewed operation list.
  - Viewed operation detail.
  - Checked menus on mobile.

{F1139757}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15393
2016-03-03 15:22:15 -08:00
epriestley
fc0dc02bb9 Allow Drydock blueprints to be tagged and searched, and give types some little icons
Summary:
Ref T10457.

  - Let blueprints be tagged so you can search and annotate them a little more easily.
  - Give each blueprint type an optional icon to make things a little easier to parse visually.

Test Plan:
  - Tagged blueprints.
  - Searched by tags.
  - Looked at nice little icons.

{F1139712}

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15392
2016-03-03 15:21:58 -08:00
epriestley
1bdf988556 Convert DrydockBlueprints to EditEngine
Summary:
Ref T10457. Fixes T10024. This primarily just modernizes blueprints to use EditEngine.

This also fixes T10024, which was an issue with stored properties not being flagged correctly.

Also slightly improves typeaheads for blueprints (more information, disabled state).

Test Plan:
  - Created and edited various types of blueprints.
  - Set and removed limits.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10024, T10457

Differential Revision: https://secure.phabricator.com/D15390
2016-03-03 15:21:25 -08:00
epriestley
01379958fa Allow Drydock blueprints to be searched by name
Summary:
Ref T10457. The ngram indexing seems to be working well; extend it into Drydock.

Also clean up the list controller a little bit.

Test Plan:
  - Ran migrations.
  - Searched for blueprints by name.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15389
2016-03-03 15:21:12 -08:00
Chad Little
ba5b32f5bb Add headericons a little more consistently
Summary: I kinda like these to differentiate the headers and different object types. Somethings duplicitive, but helps orient the clean header a bit.

Test Plan: Review each in sandbox.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15394
2016-03-03 22:08:00 +00:00
epriestley
ac72927832 Fix overzealous transactions on dashboard panels
Summary: Fixes T10474. This had the same root cause as T10024 -- a missing call to `didSetValueFromStorage()` because of the way the fields work.

Test Plan:
  - Edited a text panel before change, without changing text: got silly transaction.
  - Made change, edited text panel without changing text, no transaction.
  - Made a real edit, got a good transaction.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10474

Differential Revision: https://secure.phabricator.com/D15391
2016-03-03 07:35:03 -08:00
Chad Little
61c45e4927 Update Calendar for PHUITwoColumnView
Summary: Moves calendar event view to PHUITwoColumnView. Tightened up some phui status spacing.

Test Plan: Review Calendar Events, Differential status list.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15387
2016-03-02 18:12:42 -08:00
Chad Little
e08d70a9a5 Touch up HeraldView a bit more
Summary: Better colors, move description to own box, cleaner spacing.

Test Plan: View a few herald rules

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15386
2016-03-03 00:23:11 +00:00
epriestley
e3ed8b5fe1 Sync up UI with actual policy rules in Phame
Summary: Fixes T10504. The "Create Blog" buttons weren't generated by EditEngine, but should be, so that the UI and policies are in sync.

Test Plan:
  - Viewed blog list as user with and without permission to create blogs. Saw correct button state.
  - Tried to create blogs, saw correct result.
  - Viewed empty state of home, clicked "New Blog" buttons.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10504

Differential Revision: https://secure.phabricator.com/D15384
2016-03-02 11:53:28 -08:00
Chad Little
86d6191633 Update Fund for PHUITwoColumnView
Summary: Updates the Fund application to use a two column layout

Test Plan: Make an initiative.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15383
2016-03-02 11:22:34 -08:00
Chad Little
b9a13e56e4 Update Badges for PHUITwoColumnView
Summary: Updates the layout to two column, moves "Add Receipients" to dialog. Ref T10318

Test Plan: Give badges, revoke badges.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10318

Differential Revision: https://secure.phabricator.com/D15382
2016-03-02 11:17:04 -08:00
Chad Little
6f481aa84f Convert Macro to PHUITwoColumnView
Summary: Converts Macro to new layout

Test Plan: Add Macro, Edit Macro, Mobile, Desktop layouts

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15372
2016-03-02 10:26:06 -08:00
Chad Little
caadd1025a Give PHUITwoColumnView an addPropertySection method
Summary: Simplifies building pages a little more, adds a helper method to just add a property section to the main column automatically above other content.

Test Plan: Review Ponder, Herald, Passphrase, Countdown.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15377
2016-03-02 09:35:27 -08:00
Chad Little
2c43cccddf Update Almanac for PHUITwoColumnView
Summary: Updates Almanac to the new layout, adds some header icons for interest.

Test Plan: Click on all the different almanac pages.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15381
2016-03-02 08:51:49 -08:00
epriestley
078bf59f59 Compress Harbormaster build logs inline
Summary:
Ref T5822.

  - After a log is closed, compress it if possible.
  - Provide `bin/harbormaster archive-logs` to make it easier to change the storage format of logs.

Test Plan:
  - Ran `bin/harbormaster archive-logs` on a bunch of logs, compressing and decompressing them without issues (same hashes, same decompressed size across multiple iterations).
  - Ran new builds, verified logs were compressed after they closed.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15380
2016-03-01 15:26:12 -08:00
epriestley
6514237c0e Implement an iterator for build log chunks
Summary: Ref T5822. This will make it easier to compress and archive chunks without needing to hold them in memory.

Test Plan: Ran a build, looked at some logs.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15378
2016-03-01 15:25:51 -08:00
epriestley
e174cac1b4 Give HarbormasterBuildLogChunk a real table
Summary:
Ref T10457. Currently, this table is an ad-hoc table, but can easily be turned into a normal table.

This will make iterating over log chunks to compress and archive them easier.

Test Plan: Viewed logs, ran `bin/storage adjust` with no issues.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15376
2016-03-01 15:25:34 -08:00
epriestley
0daa9ad987 Use PhutilRope as a buffer in Harbormaster BuildLogs
Summary:
Ref T10457. Currently, every `append()` call necessarily generates queries, and these queries are slightly inefficient if a large block of data is appended to a partial log (they do about twice as much work as they technically need to).

Use `PhutilRope` to buffer `append()` input so the logic is a little cleaner and we could add a rule like "flush logs no more than once every 500ms" later.

Test Plan:
  - Ran a build, saw logs.
  - Set chunk size very small, ran build, saw logs, verified small logs in database.

{F1137115}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15375
2016-03-01 15:25:19 -08:00
epriestley
cf0957451e Slightly simplify the Harbormaster build log API
Summary:
Ref T5822. This prepares for inline compression and garbage collection of build logs.

This reduces the API surface area and removes a log from the "wait" step that would just log a message every 15 seconds. (If this is actually useful, I think we find a better way to communicate it.)

Test Plan:
Ran a build, saw a log:

{F1136691}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T5822

Differential Revision: https://secure.phabricator.com/D15371
2016-03-01 15:25:04 -08:00
Chad Little
db4fdf8c2d Update Herald for PHUITwoColumnView
Summary: Updates Herald to new two column layout

Test Plan: View herald rule tablet, desktop, mobile

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15373
2016-03-01 20:11:51 +00:00
Chad Little
21f8323612 Fix spaces UI in PHUIHeaderView
Summary: This should consistenly apply the styling regardless of font or size of the Header. Fixes T10485

Test Plan: Visit a Task and a Countdown in a different Space.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10485

Differential Revision: https://secure.phabricator.com/D15374
2016-03-01 11:49:09 -08:00
Chad Little
fe7e288cf5 Solidify PHUITwoColumnView as a page layout
Summary:
Rolls out a new "Object Page" design with PHUITwoColumnView. This is reasonably polished, but wanted to post it up for you now for feedback before chasing down minor bugs. This implements TwoColumn in the following applications:

 - Ponder
 - Paste
 - Slowvote
 - Countdown
 - Projects
 - Profile
 - Passphrase

This helped track down display issues and inconsistencies and make sure the layout was flexible for different pages.

Test Plan:
Test each of the applications on mobile, tablet, and desktop breakpoints.

{F1135705}

{F1135706}

{F1135707}

{F1135708}

{F1135709}

{F1135710}

{F1135711}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15366
2016-03-01 07:23:08 -08:00
epriestley
8240e0f727 Treat "skipped" unit tests as less interesting than "passed"
Summary:
Ref T10457. Skipped tests are almost always well-behaved (e.g., `testWindows()`, but the test is running on Linux) and not interesting, and we do not expect well-written, solid systems to necessarily have 0 skips.

Although skips //could// indicate that you have missing dependencies on a build server, and thus be a bit interesting, I think they almost always indicate that a particular test is not expected to run in the current environment.

If we wanted to tackle this problem in granular detail, we could eventually add a "Missing" status or similar which would serve as "a skip you //could// reasonably fix in this environment", but I don't think that's too interesting.

Test Plan:
Here's an example of a build result with skips: B10875

{F1136511}

I think this is clearer as "Passed", as this is the expected production state of the build.

Locally, looked at some builds.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15369
2016-03-01 06:52:05 -08:00
epriestley
58cea0714b Fix doubling of unbroken build steps in Build Plan view
Summary: Fixes T10479.

Test Plan: Viewed a valid build plan.

Reviewers: hach-que, tycho.tatitscheff, chad

Reviewed By: chad

Maniphest Tasks: T10479

Differential Revision: https://secure.phabricator.com/D15368
2016-03-01 06:51:45 -08:00
epriestley
383b0bdc04 Fix missing cursor data for paging Projects by creation date
Summary: Fixes T10478.

Test Plan: Paged projects by "Created" without errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10478

Differential Revision: https://secure.phabricator.com/D15367
2016-02-29 16:08:28 -08:00
epriestley
181e030535 Give unit test results their own table in Differential
Summary: Ref T10457. This gives unit test results a more first-class treatment in the Differential UI, and consolidates some rendering code.

Test Plan:
Before:

{F1135536}

After:

{F1135537}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15365
2016-02-29 14:27:22 -08:00
epriestley
d436fecdab Show additional details for failed builds in Harbormaster
Summary:
Ref T10457. When tests fail, it currently takes several clicks to figure out //why// they failed.

In this project, map rebuilds and `liberate` are fairly common failure conditions, but verifying that they were the root issue requires jumping into a build, then scrolling through a log.

Instead, display details if they're available.

Test Plan:
Before:

{F1135453}

After:

{F1135454}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9951, T10457

Differential Revision: https://secure.phabricator.com/D15363
2016-02-29 14:26:45 -08:00
epriestley
3c19b72ca0 Begin making Harbormaster unit test results a little easier to read
Summary: Ref T10457. These lack color and iconography and are difficult to parse. Make them easier to read.

Test Plan:
Before:

{F1135396}

After:

{F1135399}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15362
2016-02-29 14:24:08 -08:00
epriestley
5512e9724f Allow Harbormaster build plans to be tagged with projects and searched by tag
Summary: Ref T10457. This is mostly just for consitency, but I imagine it will make managing large/complex build processes easier, and if we support Herald rules it would eventually let you write "Build plan's tags include [whatever]" to apply behavior to a group of plans.

Test Plan: {F1133107}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15360
2016-02-29 05:22:59 -08:00
epriestley
f078fd98d7 Support searching for Harbormater build plans by name substring
Summary: Ref T10457. Allow build plans to be queried by name.

Test Plan:
  - Searched for plans by name.
  - Renamed a plan, searched for new name.

{F1133085}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15359
2016-02-29 05:22:24 -08:00
epriestley
2e19b78b8d Don't publish anything for "Disable Mail" / "Enable Mail" on projects
Summary:
Fixes T10466. Currently, clicking "Disable Mail" or "Enable Mail" on a project toggles an edge, but it gets a default "added an edge" story and transaction record.

These are confusing, useless and not interesting, so just hide them.

Test Plan:
  - Before patch: clicked enable/disable mail, saw "added an edge" / "removed an edge" stories in feed and project history.
  - After patch: clicked enable/disable mail, saw nothing in feed or project history.
  - (Note that this patch is not retroactive for feed, so already-published stories won't unpublish.)

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10466

Differential Revision: https://secure.phabricator.com/D15361
2016-02-28 16:32:32 -08:00
epriestley
5295c6ba1e Use EditEngine for Harbormaster Build Plans, fix some crumbs/mobile stuff
Summary:
Ref T10457.

  - Use EditEngine for Build Plans.
  - Fix some minor issues with crumbs being inconsistent.
  - Fix some minor issues with mobile menus not being consistent/available.

Test Plan:
  - Created and edited build plans.
  - Poked around in mobile width, verified mobile menu had the right stuff in it.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15357
2016-02-27 07:13:29 -08:00
epriestley
c29ba039bb Update Buildable search in Harbormaster
Summary:
Fixes T10011.

  - Modernize searching for buildables.
  - Prepare for `harbormaster.buildable.search`.
  - Allow users to query by status (see T10011).
  - Collapse the four weird "commit / diff / revision / repository" fields into two slightly less weird fields with more UI hinting?

Test Plan: {F1131918}

Reviewers: chad

Reviewed By: chad

Subscribers: Luke081515.2

Maniphest Tasks: T10011

Differential Revision: https://secure.phabricator.com/D15356
2016-02-27 07:13:10 -08:00
epriestley
fdca684814 Slightly improve Buildable list in Harbormaster
Summary:
Ref T10457. This makes diffs/revisions show the revision as the buildable title, and commits show the commit as the title.

Previously, the title was "Buildable X".

Also makes icons/colors/labels more consitent.

Test Plan: {F1131885}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15355
2016-02-27 07:11:30 -08:00
epriestley
220ac48801 Remove buildable handle / container handle logic form Harbormaster buildable queries
Summary:
Ref T10457. We currently have these weird, out-of-place methods on Harbormaster queries that just load handles. These were written before HandlePool, and HandlePool is now more convenient, simpler, and more efficient.

Drop this stuff in favor of using handle pools off `$viewer`.

Test Plan: Looked at buildable list, looked at buildable detail, grepped for removed methods.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10457

Differential Revision: https://secure.phabricator.com/D15354
2016-02-27 07:11:09 -08:00
epriestley
93b8f803a0 Require "Can Edit" on a build plan to abort or pause associated builds
Summary: Fixes T9614. This is kind of silly, but stop users from fighting turf wars over build resources or showing up on an install and just aborting a bunch of builds for the heck of it.

Test Plan:
  - Restarted / paused / aborted / etc builds.
  - Tried to do the same for builds I didn't have edit permission on the build plan for, got errors.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9614

Differential Revision: https://secure.phabricator.com/D15353
2016-02-26 11:38:43 -08:00
epriestley
c64b822bee Remove obsolete, confusing Harbormaster builds steps
Summary: Fixes T10458. These steps are obsolete and have not worked since the last updates to Drydock. They may eventually return in some form, but get rid of them for now since they're confusing.

Test Plan:
  - Created a build plan with these steps.
  - Removed these steps.
  - Verified the build plan showed that the steps were invalid, and that I could delete them.
  - Deleted them.
  - Added new steps, no obsolete steps were available for selection.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10458

Differential Revision: https://secure.phabricator.com/D15352
2016-02-26 10:34:58 -08:00
Chad Little
0290cf0816 Library Map Update
Summary: Our of date, failed harbormaster build

Test Plan: run `arc liberate`

Reviewers: epriestley, nickz

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15351
2016-02-26 09:47:03 -08:00
Nick Zheng
6861af0cbb When the push phase of "Land Revision" fails, show the error in the UI
Summary: T10447

Test Plan: tested on my dev instance

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin, yelirekim

Differential Revision: https://secure.phabricator.com/D15350
2016-02-26 09:38:39 -08:00
epriestley
7d4b323da2 Store Almanac "service types" instead of "service classes"
Summary:
Ref T10449. Currently, we store classes (like "AlmanacClusterRepositoryServiceType") in the database.

Instead, store types (like "cluster.repository").

This is a small change, but types are a little more flexible (they let us freely reanme classes), a little cleaner (fewer magic strings in the codebase), and a little better for API usage (they're more human readable).

Make this minor usability change now, before we unprototype.

Also make services searchable by type.

Also remove old Almanac API endpoints.

Test Plan:
  - Ran migration, verified all data migrated properly.
  - Created, edited, rebound, and changed properties of services.
  - Searched for services by service type.
  - Reviewed available Conduit methods.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T10449

Differential Revision: https://secure.phabricator.com/D15346
2016-02-26 06:21:50 -08:00
epriestley
4c97d88aa4 Allow Almanac bindings to be disabled and unused interfaces to be removed
Summary:
Fixes T9762. Ref T10246.

**Disabling Bindings**: Previously, there was no formal way to disable bindings. The internal callers sometimes check some informal property on the binding, but this is a common need and deserves first-class support in the UI. Allow bindings to be disabled.

**Deleting Interfaces**: Previously, you could not delete interfaces. Now, you can delete unused interfaces.

Also some minor cleanup and slightly less mysterious documentation.

Test Plan: Disabled bindings and deleted interfaces.

Reviewers: chad

Reviewed By: chad

Subscribers: yelirekim

Maniphest Tasks: T9762, T10246

Differential Revision: https://secure.phabricator.com/D15345
2016-02-26 06:21:23 -08:00
epriestley
5b9d8aeae7 Fix two issues with callsign-free repositories
Summary:
Ref T4245. These callsites don't quite do the right thing if a repository has no callsign.

See also <https://github.com/phacility/phabricator/pull/822>.

Test Plan: Made a comment on a commit in a repository with no callsign.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15344
2016-02-26 06:13:46 -08:00
epriestley
944539a786 Simplify locking of Almanac cluster services
Summary:
Fixes T6741. Ref T10246. Broadly, we want to protect Almanac cluster services:

  - Today, against users in the Phacility cluster accidentally breaking their own instances.
  - In the future, against attackers compromising administrative accounts and adding a new "cluster database" which points at hardware they control.

The way this works right now is really complicated: there's a global "can create cluster services" setting, and then separate per-service and per-device locks.

Instead, change "Can Create Cluster Services" into "Can Manage Cluster Services". Require this permission (in addition to normal permissions) to edit or create any cluster service.

This permission can be locked to "No One" via config (as we do in the Phacility cluster) so we only need this one simple setting.

There's also zero reason to individually lock //some// of the cluster services.

Also improve extended policy errors.

The UI here is still a little heavy-handed, but should be good enough for the moment.

Test Plan:
  - Ran migrations.
  - Verified that cluster services and bindings reported that they belonged to the cluster.
  - Edited a cluster binding.
  - Verified that the bound device was marked as a cluster device
  - Moved a cluster binding, verified the old device was unmarked as a cluster device.
  - Tried to edit a cluster device as an unprivileged user, got a sensible error.

{F1126552}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15339
2016-02-25 03:38:39 -08:00
Chad Little
be0e84a81a Fix Ponder Exception, spacing
Summary: Evidently I only tested adding a question, not an answer. Properly set the getter. Also, fixed some header spacing.

Test Plan: Add a question, add an answer. See everything work, proper spacing.

Reviewers: epriestley, avivey

Reviewed By: avivey

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15341
2016-02-23 20:37:58 -08:00
Chad Little
e9f4ca6ca3 Redesign PonderQuestionView
Summary: Full new UI, testing some upcoming treatments for consideration in other View controllers. Small tweaks to allow PHUITwoColumnView to have fixed and fluid width, and let TransactionCommentView go fullWidth.

Test Plan:
Tested a number of Ponder cases, New Question, with and without summary, with and without answers, with and without comments. Mobile, Tablet, and Desktop layouts. Verify Project and Profile UI's still in tact.

{F1120961}

{F1120962}

{F1120963}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15315
2016-02-23 17:20:07 -08:00
epriestley
9baae00fbd Fix a couple of column editing issues
Summary:
Ref T10349.

  - Don't show subproject columns on "Manage Board".
  - Fix "Edit Column" for milestone columns (allows you to set points, but not rename).

Test Plan:
  - Viewed "Manage Board" on a project with subprojects.
  - Edited a milestone column and set a point limit.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15338
2016-02-23 14:45:05 -08:00
epriestley
ee6070a984 Add a couple of missing needProperties() Almanac calls
Summary: Fixes T10432. I missed these in making properties non-default.

Test Plan: Diffusion now works again in a cluster configuration.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10432

Differential Revision: https://secure.phabricator.com/D15337
2016-02-23 13:50:49 -08:00
epriestley
76d4e85bfc Only hide archived project tags on workboard cards
Summary: Fixes T10413. I accidentally hid these //everywhere//, but only intended to hide them on workboards.

Test Plan:
  - Viewed a workboard, saw un-archived projects only.
  - Viewed a task detail page, saw archived and un-archived projects.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10413

Differential Revision: https://secure.phabricator.com/D15335
2016-02-23 10:47:27 -08:00
epriestley
a112bc5cba Sort Spaces dropdown by name, not "alphabetical ID"
Summary:
Fixes T10414. I think this sorted by name at one time (the `asort()`) but then I probably added "Space SX" in front of it. Or I just got this wrong from the beginning.

Instead, sort by space name.

Test Plan: {F1126034}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10414

Differential Revision: https://secure.phabricator.com/D15334
2016-02-23 10:41:49 -08:00
epriestley
0799c91822 In Maniphest tasks, only move old owner to CC if owner changed
Summary:
Fixes T10426. When the owner of a task changes, we try to add the old owner to CC so they're kept in the loop.

Currently, we do this unconditionally. This can add the owner as a subscriber when someone didn't change anything, which is confusing.

Instead, only do this if the owner actually changed.

Test Plan:
  - With "A" as owner, edited task and saved.
    - Before patch, A was added as subscriber.
    - After patch, A not added.
  - With "A" as owner, changed owner to "B" and saved.
    - Both before and after patch, "A" is added as a subscriber.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10426

Differential Revision: https://secure.phabricator.com/D15333
2016-02-23 10:10:20 -08:00
Chad Little
2cdc40eb00 Fix description variable on Blog manage page
Summary: Properly set description variable.

Test Plan: Visit blog manage page.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15332
2016-02-23 08:55:23 -08:00
epriestley
f7d5904e4b Expose modern *.search Conduit endpoints in Almanac
Summary: Fixes T10411. Ref T10246. There are probably still some rough edges with this, but replace the old-school endpoints with modern ones so we don't unprototype with deprecated stuff.

Test Plan:
  - Made a bunch of calls to the new endpoints with various constraints/attachments.
  - Created and edited services, devices, interfaces, bindings, and properties on everything.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246, T10411

Differential Revision: https://secure.phabricator.com/D15329
2016-02-23 08:20:57 -08:00
Chad Little
023cfbb23a Restrict PropertyListView width to just DocumentProView
Summary: Fixes T10409. Long term need to build a proper "PageEngine" of sorts for layouts not needing special magic. For now this just affects a few applications.

Test Plan: View Diffusion, Phriction, Phame, Legalpad, Diviner.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10409

Differential Revision: https://secure.phabricator.com/D15328
2016-02-22 11:54:23 -08:00
epriestley
24104be67d Use EditEngine for Almanac Services, Devices, and Networks
Summary:
Ref T10411. This cleans up / modernizes things and lets me get an `almanac.network.edit` API in the future.

This is mostly straightforward, except that Services have an extra "choose type" screen in front of them.

Test Plan:
  - Created and edited Almanac networks, services, and devices.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10411

Differential Revision: https://secure.phabricator.com/D15326
2016-02-22 11:28:38 -08:00
epriestley
ab86523ac4 Allow Almanac properties to be deleted, use EditEngine instead of CustomField
Summary:
Fixes T10410. Immediate impact of this is that you can now actually delete properties from Almanac services, devices and bindings.

The meat of the change is switching from CustomField to EditEngine for most of the actual editing logic. CustomField creates a lot of problems with using EditEngine for everything else (D15326), and weird, hard-to-resolve bugs like this one (not being able to delete stuff).

Using EditEngine to do this stuff instead seems like it works out much better -- I did this in ProfilePanel first and am happy with how it looks.

This also makes the internal storage for properties JSON instead of raw text.

Test Plan:
  - Created, edited and deleted properties on services, devices and bindings.
  - Edited and reset builtin properties on repository services.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10410

Differential Revision: https://secure.phabricator.com/D15327
2016-02-22 11:28:26 -08:00
epriestley
411331469a Apply namespace locking rules in Almanac
Summary:
Ref T10246. Ref T6741.

When you have a namespace like "phacility.net", require users creating services and devices within it to have edit permission on the namespace.

This primarily allows us to lock down future device names in the cluster, so instances can't break themselves once they get access to Almanac.

Test Plan:
  - Configured a `phacility.net` namespace, locked myself out of it.
  - Could not create new `stuff.phacility.net` services/devices.
  - Could still edit existing devices I had permission for.
  - Configured a `free.phacility.net` namespace with more liberal policies.
  - Could create `me.free.phacility.net`.
  - Still could not create `other.phacility.net`.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15325
2016-02-22 04:58:53 -08:00
epriestley
db50d0fb11 Rough-in Almanac namespaces
Summary:
Ref T6741. Ref T10246.

Root problem: to provide Drydock in the cluster, we need to expose Almanac, and doing so would let users accidentally or intentionally create a bunch of `repo006.phacility.net` devices/services which could conflict with the real ones we manage.

There's currently no way to say "you can't create anything named `*.blah.net`". This adds "namespaces", which let you do that (well, not yet, but they will after the next diff).

After the next diff, if you try to create `repo003.phacility.net`, but the namespace `phacility.net` already exists and you don't have permission to edit it, you'll be asked to choose a different name.

Also various modernizations and some new docs.

Test Plan:
  - Created cool namespaces like `this.computer`.
  - Almanac namespaces don't actually enforce policies yet.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15324
2016-02-22 04:58:35 -08:00
epriestley
50debecf52 Allow Almanac namespaces to be searched by ngram index
Summary: Ref T6741. Ref T10246. This is largely modernization, but will partially support namespace locking in Almanac.

Test Plan:
Searched for Almanac networks by name substring.

{F1121740}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T6741, T10246

Differential Revision: https://secure.phabricator.com/D15322
2016-02-22 04:58:18 -08:00
epriestley
959bb16d0f Allow Almanac services to be searched by substring
Summary: Ref T10246. Build an ngram index for Almanac services, and use it to support improved search.

Test Plan: {F1121725}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10246

Differential Revision: https://secure.phabricator.com/D15321
2016-02-22 04:58:03 -08:00
Ben Alpert
31927476e3 Reorder audit actions to match Differential
Summary:
These trip me up every time because Differential has:

> Comment, Accept, Request Changes, Resign, Commandeer, Add Reviewers, Add Subscribers

while audits currently show:

> Comment, Add Subscribers, Add Auditors, Accept, Raise Concern, Resign

Now they're more or less in the same order which helps with muscle memory.

Test Plan: Careful inspection.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15323
2016-02-21 12:16:04 -08:00
epriestley
22d2b7ed04 Allow Almanac interfaces to be browsed
Summary:
Fixes T10205. Ref T10246. Previously, the issue was that the result set was not ordered, so "More Results" would not have been able to work in a reasonable way if there were more than 100 matching interfaces.

You would have seen 100 interfaces more or less at random, then clicked "more" and gotten 100 more random interfaces.

Now, you would see 100 "a" interfaces, then click more to get the next 100 alphabetical interfaces (say, "b" and "c" interfaces).

Test Plan:
  - Clicked browse when binding an interface.
  - Got a browse dialog.
  - Artificially set query limit to 1, paged through "local" interfaces in an ordered, consistent way.

{F1121313}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10205, T10246

Differential Revision: https://secure.phabricator.com/D15320
2016-02-21 10:45:00 -08:00
epriestley
1b6ddae6b2 Allow Almanac devices to be queried and sorted by name
Summary:
Ref T10205. Ref T10246. This is general modernization, but also supports fixing the interface datasource in T10205.

  - Update Query.
  - Update SearchEngine.
  - Use an ngrams index for searching names efficiently.

Test Plan:
  - Ran migrations.
  - Searched Almanac devices by name.
  - Created a new device, searched for it by name.

{F1121303}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10205, T10246

Differential Revision: https://secure.phabricator.com/D15319
2016-02-21 10:44:46 -08:00
Sébastien Santoro
a4db6f387d Fix typo: discsussions → discussions
Test Plan: Read again the sentence.

Reviewers: joshuaspence, #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15316
2016-02-21 01:51:03 -08:00
Chad Little
929b4ccb5c Remove Similar Questions column from Ponder
Summary: Not terribly useful. Also removed close your stuff reminder.

Test Plan: View question I asked and strangers question. Both layout more normal like.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15312
2016-02-19 14:55:55 -08:00
epriestley
50f910ce67 Always install the "icon" and "emoji" remarkup rules
Summary: Ref T10394. Currently, these rules are only active if the Macro application is installed. Instead, install them unconditionally.

Test Plan:
  - Used `{icon camera}` with Macro installed and uninstalled.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10394

Differential Revision: https://secure.phabricator.com/D15311
2016-02-19 11:51:53 -08:00
Chad Little
5eecff91cd Move Diffusion ReadmeView to PHUIDocumentProView
Summary: Swapping out to PHUIDocumentProView to remove all calls to PHUIDocumentView.

Test Plan: Review the Phabricator Readme.MD in Diffusion

Reviewers: epriestley, avivey

Reviewed By: avivey

Subscribers: avivey, Korvin

Differential Revision: https://secure.phabricator.com/D15308
2016-02-19 04:18:33 +00:00
epriestley
af1fef242c Fix an issue with editing pre-space objects using a form with no visibility controls
Summary:
WMF ran into this after their update. Here's the setup:

  - When you enable Spaces, we leave all existing objects set to `null`, which means "these belong to the default space". This is so we don't have to go update a trillion objects.
  - New objects get set to the default space explicitly (`PHID-SPCE-...`) but older ones stay with `null`.
  - If you edit an older object (like a task) from the time before Spaces, //and// the form doesn't have a Visbility/Spaces control, we would incorrectly poplate the value with `null` when the effective value should be the default space PHID.
  - This caused a "You must choose a space." error in the UI.

Instead, populate the control with the effective value instead of the literal database value. This makes the edit go through cleanly.

Also add a note about this for future-me.

Test Plan:
  - Disabled "Visibility" control in task edit form.
  - Edited an old task which had `null` as a `spacePHID` in the database.
  - Before patch: UI error about selecting a Space.
  - After patch: edit goes through cleanly.

Reviewers: chad, 20after4

Reviewed By: chad, 20after4

Subscribers: 20after4, aklapper

Differential Revision: https://secure.phabricator.com/D15306
2016-02-18 11:15:40 -08:00
epriestley
dc7d0b4a56 Make repository callsigns optional
Summary:
Ref T4245. This could still use a little UI smoothing, but:

  - Don't require a callsign on the create flow (you can add one later in "Edit Basic Information" if you want).
  - Allow existing callsigns to be removed.

Test Plan:
  - Created a new repository with no callsign.
  - Cloned it; pushed to it.
  - Browsed around Diffusion a bunch.
  - Visited a commit URI.
  - Added a callsign to it.
  - Removed the callsign again.
  - Referenced it with `R22` in remarkup.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15305
2016-02-18 10:36:13 -08:00
epriestley
dfc8f8bcb4 Make callsigns editable on repository basic information
Summary:
Ref T4245. This is a prelude to removing them from the "create" screen.

Currently, if you try to delete the callsign you get an unceremonious database error, but the next diff (or maybe two) will permit that, so I didn't put any "this is required yada yada" text in.

This could also maybe use some big flashing warning lights and a "if you edit this, all your URIs break" but I'll save that for later.

Test Plan: Changed the callsign for a repository.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15304
2016-02-18 10:34:32 -08:00
epriestley
b63eb09cac Don't require a callsign to set a repository's local path
Summary: Ref T4245. When creating new repositories, set a default local path based on the repository ID instead of callsign.

Test Plan:
  - Created a new repository.
  - Saw it get a reasonable, ID-based local path.
  - Edited a repository to make sure the `applyFinalEffects()` wasn't doing anything whacky.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15303
2016-02-18 10:33:10 -08:00
epriestley
74a79aa634 Make serving repositories work with alternate URIs
Summary: Ref T4245. Consolidates the URI parsing/rewriting logic so that repositories can be served from either `/diffusion/XYZ/` or `/diffusion/123/`, over both HTTP and SSH.

Test Plan:
  - Pulled a Git repository by ID and callsign over HTTP and SSH.
  - Pulled a Mercurial repository by ID and callsign over HTTP and SSH.
  - Pulled a Subversion repository by ID and callsign over SSH (no HTTP support for SVN).

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15302
2016-02-18 10:06:03 -08:00
epriestley
c2b8dd28d8 Support ID-based repository URIs, and canonicalize repository URIs
Summary:
Ref T4245. Make `/diffusion/123/` work, but redirect the user to `/diffusion/XYZ/` if the repository has a callsign.

(Right now, every repository has a callsign, so this always redirects.)

Also redirect `/R123:abcdef` if the repository has a callsign.

Also also, move the Pull garbage collector somewhere more sensible.

Test Plan:
  - Added test coverage.
  - Visited `/diffusion/1/`, was redirected.
  - Visited `/diffusion/R1:abcdef`, was redirected.
  - Browsed Diffusion normally.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15301
2016-02-18 09:56:28 -08:00
Alex Monk
f557fc9caa Return 404 instead of undefined variable error when trying to edit a non-existent form
Summary: E.g. https://phab-01.wmflabs.org/transactions/editengine/transactions.editengine.config/view/13/

Test Plan:
* Go to /transactions/editengine/transactions.editengine.config/view/1000000/
* Observe error
* Apply patch
* Observe 404

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D15307
2016-02-18 09:54:47 -08:00
epriestley
82ca92a9ef Don't show archived project tags on workboard cards
Summary: Ref T10349.

Test Plan:
  - Added archived and unarchived project tags to a task.
  - Saw unarchived tags, only, on cards.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10349

Differential Revision: https://secure.phabricator.com/D15297
2016-02-17 19:06:27 -08:00
epriestley
097bcb3970 Make bin/diviner generate --repository <repository> accept identifiers
Summary: Ref T4245. This currently accepts only callsigns; prepare it for the bright new callsign-optional world.

Test Plan:
  - Ran `./bin/diviner generate --repository 1 --book src/docs/book/flavor.book --clean`, got a good result.
  - Ran `./bin/diviner generate --repository 239238 --book src/docs/book/flavor.book --clean`, got an appropraite error about a bad repository identifier.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15296
2016-02-17 17:23:35 -08:00
epriestley
93d7b01222 Remove uncalled DiffusionRequest->getCallsign()
Summary: Ref T4245. This has no callers.

Test Plan:
  - Ran `git grep -i 'getCallsign('` and visually verified that no callers could reasonably be `DiffusionRequest` objects (there are only 23 remaining sites, and about half are `$this->...` in `PhabricatorRepository`.
  - Browsed around directory/file/branch/content/diff/etc pages in Diffusion.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15295
2016-02-17 17:17:35 -08:00
epriestley
925a0d3d59 Pass repository PHID to custom hooks in PHABRICATOR_REPOSITORY instead of callsign
Summary:
Ref T4245. We pass this exclusively for use by additional third-party hooks.

This is technically a backward compatibility break, but I suspect it doesn't affect anyone:

  - Probably almost no one is using this (there are few reasons to, even for the tiny number of installs with custom commit hooks).
  - If they are, there's a good chance the PHID will work anyway, since nearly all scripts and Conduit methods will accept it in place of a callsign now, and if it's in logging or debugging code the PHID is a reasonable substitute
  - Even if it doesn't just keep working, the break should be very obvious in most reasonable cases.

I'll call this out explicitly in the changelog, though -- almost everything else will just continue working, but this is a strict compatibility break.

Test Plan:
  - Ugh.
  - Picked a hosted Git repo out of Diffusion.
  - Went to the path on disk.
  - Went into `hooks/`.
  - Went into `pre-receive-phabricator.d/`.
  - Wrote this hook and gave it `chmod +x`:

```name=stuff.sh
#!/bin/sh

echo $PHABRICATOR_REPOSITORY >> /tmp/stuff.log
```

  - Pushed to the repository.
  - Saw a PHID show up in the log:

```
$ cat /tmp/stuff.log
PHID-REPO-bqkcdp47euwnwlasrsrh
```

Reviewers: chad, avivey

Reviewed By: avivey

Subscribers: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15294
2016-02-17 17:10:44 -08:00
epriestley
973b8ace86 Remove dependence on callsigns from bin/commit-hook
Summary:
Ref T4245. Two effects:

  - First, let hooks work for future repositories without callsigns.
  - Second, provide a better error when users push directly to hosted repositories.

Test Plan: Ran `bin/commit-hook PHID-REPO-xxx`.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T4245

Differential Revision: https://secure.phabricator.com/D15293
2016-02-17 16:50:36 -08:00
Chad Little
f5e2f9587c Add setHeader to PHUITwoColumnView for consistent page layouts
Summary: Working towards making PHUITwoColumnView into a page layout engine. Adds header support.

Test Plan: Use new header on Profile and Profiles. No visual changes, less duplicated code.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15292
2016-02-17 13:09:10 -08:00
Chad Little
12d8520059 Convert PHUIObjectBoxView to AphrontTagView
Summary: Attempting to clean PHUIObjectBoxView up a little as well as finally being able to `addClass` on the sucker. I'm running into some issue with `addTabs` though, which on Files isn't firing.

Test Plan: Bounce around tons of screens.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D15291
2016-02-17 12:54:56 -08:00