1. 09 Jan, 2017 5 commits
    • epriestley's avatar
      When updating revisions in response to commits, reuse previously generated diffs · 2dfe79cf
      epriestley authored
      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
      2dfe79cf
    • epriestley's avatar
      Use some more human-readable Conduit keys in updated API methods · 27ecedd1
      epriestley authored
      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
      27ecedd1
    • epriestley's avatar
      Remove extra container tag on HandleListViews rendering from ModularTransactions in text mode · b08c9b3f
      epriestley authored
      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
      b08c9b3f
    • epriestley's avatar
      Fix an issue which could prevent blocking reviewers from being removed from revisions · 425deeb5
      epriestley authored
      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
      425deeb5
    • epriestley's avatar
      Mark "v3" API methods as stable; mark obsoleted methods as "Frozen" · aa6e788f
      epriestley authored
      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
      aa6e788f
  2. 08 Jan, 2017 7 commits
    • epriestley's avatar
      Add "project.column.search" for querying workboard column information · 63bfa5cc
      epriestley authored
      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
      63bfa5cc
    • epriestley's avatar
      Add a "columns" attachment to the maniphest.search API method · ad3745c8
      epriestley authored
      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
      ad3745c8
    • epriestley's avatar
      Support "parentPHIDs" and "ancestorPHIDs" as constraints in project.search API · 9fa7355e
      epriestley authored
      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
      9fa7355e
    • epriestley's avatar
      Add "parent" and "ancestor" information to the project.search API · c0bec6c0
      epriestley authored
      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
      c0bec6c0
    • epriestley's avatar
      Return milestone information in project.search · e03103f3
      epriestley authored
      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
      e03103f3
    • epriestley's avatar
      Fix excessively strict "Can Use Application" policy filtering · f16778fc
      epriestley authored
      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
      f16778fc
    • epriestley's avatar
      Correct "Manage Password" link in Quickling in Diffusion · d4248d23
      epriestley authored
      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
      d4248d23
  3. 07 Jan, 2017 2 commits
  4. 06 Jan, 2017 1 commit
    • epriestley's avatar
      Make JX.Tooltip more conservative about positioning · 5ff02058
      epriestley authored
      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
      5ff02058
  5. 05 Jan, 2017 4 commits
    • epriestley's avatar
      Fix a case where "Accept + Comment" would ignore the "Accept" · 1f230699
      epriestley authored
      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
      1f230699
    • epriestley's avatar
      Correct a "bin/mail" command in "Show Raw Email" help text · 68374aa2
      epriestley authored
      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
      68374aa2
    • epriestley's avatar
      Nutritious vitamin paste. · 103b4507
      epriestley authored
      Auditors: chad
      103b4507
    • epriestley's avatar
      Straighten out some stacked action removal behaviors · 4b94ae15
      epriestley authored
      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
      4b94ae15
  6. 04 Jan, 2017 9 commits
    • Chad Little's avatar
      Bring up contrast on light green / red diffs · 96fbf37d
      Chad Little authored
      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
      96fbf37d
    • epriestley's avatar
      Show an info view warning for ongoing or failed builds in Differential · 2855470b
      epriestley authored
      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
      2855470b
    • epriestley's avatar
      Allow "O42" to find packages by monogram in Owners typeaheads · 10171e21
      epriestley authored
      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
      10171e21
    • epriestley's avatar
      Allow Harbormaster builds to publish to a different object · ef05bf33
      epriestley authored
      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
      ef05bf33
    • Chad Little's avatar
      Add Form MenuItem, Fix EditEngine Typeahead · e9243f22
      Chad Little authored
      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
      e9243f22
    • Chad Little's avatar
      Update diff highlight colors for better color blindess distinction · aa9708c5
      Chad Little authored
      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
      aa9708c5
    • epriestley's avatar
      Remove an extra "`" from the documentation · c2f9e7f6
      epriestley authored
      Summary: One too many.
      
      Test Plan: Counted carefully.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Differential Revision: https://secure.phabricator.com/D17137
      c2f9e7f6
    • epriestley's avatar
      Survive hand-crafted Git commits which are missing timestamp information · 45161094
      epriestley authored
      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
      45161094
    • epriestley's avatar
      Preserve nonstandard ports during 404 redirects which add "/" to the ends of URIs · c07ec8fe
      epriestley authored
      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
      c07ec8fe
  7. 03 Jan, 2017 1 commit
    • Chad Little's avatar
      Add download link to embedded files · 489587d6
      Chad Little authored
      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
      489587d6
  8. 02 Jan, 2017 5 commits
    • epriestley's avatar
      Define Differential email action in terms of EditEngine · 50de3071
      epriestley authored
      Summary: Ref T11114. Move email/command actions, like "!reject", to modular transactions + editengine.
      
      Test Plan: Used `bin/mail receive-test` to pipe "!stuff" to an object, saw appropraite effects in web UI.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T11114
      
      Differential Revision: https://secure.phabricator.com/D17133
      50de3071
    • epriestley's avatar
      Make some Differential comment actions (like "Accept" and "Reject") conflict with one another · 35750b9c
      epriestley authored
      Summary:
      Ref T11114. When a user selects "Accept", and then selects "Reject", remove the "Accept". It does not make sense to both accept and reject a revision.
      
      For now, every one of the "actions" conflicts: accept, reject, resign, claim, close, commandeer, etc, etc. I couldn't come up with any combinations that it seems like users are reasonably likely to want to try, and we haven't received combo-action requests in the past that I can recall.
      
      Test Plan:
        - Selected "Accept", then selected "Reject". One replaced the other.
        - Selected "Accept", then selected "Change Subscribers". Both co-existed happily.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T11114
      
      Differential Revision: https://secure.phabricator.com/D17132
      35750b9c
    • epriestley's avatar
      Make "View" links on Differential inline comment previews work again · 00313094
      epriestley authored
      Summary:
      Ref T11114. Recent changes broke the links to jump to inline comments from the previews because they get hooked up with JS.
      
      Restore the linking behavior.
      
      Test Plan: Clicked "View" on an inline comment preview, jumped to that comment.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T11114
      
      Differential Revision: https://secure.phabricator.com/D17131
      00313094
    • Chad Little's avatar
      Add responsive spacing to comment form info view · 34d279ab
      Chad Little authored
      Summary: Moves spacing to responsive CSS.
      
      Test Plan: Test mobile, desktop, and tablet breakpoints.
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      Subscribers: Korvin
      
      Differential Revision: https://secure.phabricator.com/D17130
      34d279ab
    • epriestley's avatar
      Apply application visibility checks during normal object filtering · cf1ccc99
      epriestley authored
      Summary:
      Fixes T9058. Normally, "Query" classes apply an application check and just don't load anything if it fails.
      
      However, in some cases (like email recipient filtering) we run policy checks without having run a Query check first. In that case, one user (the actor) loads the object, then we filter it against other users (the recipeints).
      
      Explicitly apply the application check during normal filtering.
      
      Test Plan: Added a failing test case and made it pass.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T9058
      
      Differential Revision: https://secure.phabricator.com/D17127
      cf1ccc99
  9. 01 Jan, 2017 6 commits
    • epriestley's avatar
      Add more strings for Paste title changes · 71de5f2d
      epriestley authored
      Summary: See downstream: <https://phabricator.wikimedia.org/T154367>
      
      Test Plan: {F2286968}
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Differential Revision: https://secure.phabricator.com/D17126
      71de5f2d
    • epriestley's avatar
      Make restricted objects in commit messages work more consistently with the web UI · 3d52f07e
      epriestley authored
      Summary:
      Fixes T11344. In the web UI, if a field like "Subscribers" on an object (like a task) contains values you don't have permission to see, you see tokens for them (like "Restricted Project") but not their names.
      
      Make commit messages work the same way: you see the PHID, and can remove it or leave it there, but can't see the underlying name.
      
      (We have to render an actual PHID rather than just "Restricted Thing" because we have to be able to figure out what edit the user is actually trying to make.)
      
      Test Plan: Interacted with a revision via the CLI that had project reviewers I couldn't see.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T11344
      
      Differential Revision: https://secure.phabricator.com/D17124
      3d52f07e
    • epriestley's avatar
      Use extended policies in Differential diffs · 65c1c758
      epriestley authored
      Summary:
      Fixes T9648. Diffs currently use `return $this->getRevision()->getViewPolicy();` to inherit their revision's view policy.
      
      After the introduction of object policies, this is wrong for policies like "Subscribers", because it means "Subscribers to this object, the diff". Since Diffs have no subscribers, this always fails.
      
      Instead, use extended policies so that the object policy evaluates in the context of the correct object (the revision).
      
      Test Plan:
        - Create a revision.
        - Subscribe `alice` to it.
        - Set view policy to "Subscribers".
        - View revision as `alice`.
        - Before patch: nonsense fatal about missing diff because of policy error.
        - After patch: `alice` can see the revision.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T9648
      
      Differential Revision: https://secure.phabricator.com/D17123
      65c1c758
    • epriestley's avatar
      Always parse the first line of a commit message as a title · 81e2a1cf
      epriestley authored
      Summary: Fixes T10312. If your first line is "Reviewers: xyz", it's a title, not a "Reviewers" field.
      
      Test Plan: Added unit test.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T10312
      
      Differential Revision: https://secure.phabricator.com/D17122
      81e2a1cf
    • epriestley's avatar
      Be more lenient when accepting "Differential Revision" in the presence of... · ab17a7d4
      epriestley authored
      Be more lenient when accepting "Differential Revision" in the presence of custom ad-hoc commit message fields
      
      Summary:
      Fixes T8360. We will now parse revisions out of "Differential Revision: X" followed by other ad-hoc fields which we do not recognize. Previously, these fields would be treated as part of the value.
      
      (In the general case, other fields may line wrap so we can't assume that fields are only one line long. However, we can make that assumption safely for this field.)
      
      Also maybe fix whatever was going on in T9965 although that didn't really have a reproduction case.
      
      Test Plan: Added unit tests.
      
      Reviewers: chad
      
      Reviewed By: chad
      
      Maniphest Tasks: T8360
      
      Differential Revision: https://secure.phabricator.com/D17121
      ab17a7d4
    • epriestley's avatar
      Use a more conventional spelling of "CLOSED" · 7bf49d25
      epriestley authored
      Summary: Ref T11114. Wow!
      
      Test Plan: Spelling!
      
      Reviewers: chad, eadler
      
      Reviewed By: chad, eadler
      
      Maniphest Tasks: T11114
      
      Differential Revision: https://secure.phabricator.com/D17125
      7bf49d25