Permalink
Switch branches/tags
Nothing to show
Commits on Jul 3, 2017
  1. Fix an issue where repositories with hyphens could sort improperly in…

    … typeaheads
    
    Summary: Fixes T12894. See that task for discussion.
    
    Test Plan:
      - Created repositories `abcdef`, then `abcdef-a` through `abcdef-f`.
      - Before patch, awkward sort order.
      - After patch, query for `abcdef` hits `abcdef` first.
      - See T12894 for details and screenshots.
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Maniphest Tasks: T12894
    
    Differential Revision: https://secure.phabricator.com/D18179
    epriestley committed Jul 3, 2017
Commits on Jul 2, 2017
  1. Update Diffusion conduit text

    Summary: Fixes T12888
    
    Test Plan: Verify text is there.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Maniphest Tasks: T12888
    
    Differential Revision: https://secure.phabricator.com/D18178
    chadlittle committed with chad Jul 2, 2017
Commits on Jul 1, 2017
  1. Move Diffusion Browse to a single column layout

    Summary: The main change here is moving (compare, search, history) into buttons in the header bar on all browse views. This allows Directory Browsing to be full width, since there is no other curtain information. File, Image, LFS, Binary all stay in TwoColumn layouts with the same buttons in the header.
    
    Test Plan: Test viewing a directory, file, image, binary file, readme, and fake a gitlfs.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D17766
    chadlittle committed Jul 1, 2017
Commits on Jun 30, 2017
  1. Use the correct "completed" time in Harbormaster display UI

    Summary: Fixes T12883. The task seems correct to me and I think this is a copy/paste mistake that probably blames to me.
    
    Test Plan: Fiddled these numbers, viewed a build in Harbormaster, saw the adjusted time.
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam
    
    Maniphest Tasks: T12883
    
    Differential Revision: https://secure.phabricator.com/D18177
    epriestley committed Jun 30, 2017
  2. Correct a datasource issue when viewing repository URIs in "Manage Re…

    …pository"
    
    Summary:
    Fixes T12884. In cases other than this UI, applications access URIs through the Repository they're part of. This means that applications interact with URIs which have gone through the correction/adjustment logic in `PhabricatorRepository->attachURIs()`, which fixes up "builtin" URIs to have the right values based on configuration.
    
    In this case (and, as far as I can tell, only this case) we load the URI directly //and// act on its properties which depend on configuration and repository state.
    
    This can mean we're using a different view of the URI than we should be.
    
    To fix this: after loading the URI, reload it through the repository so the relevant adjustments are applied.
    
    I think this is the most reasonable fix. We could try to make `RepositoryURIQuery` somehow enforce this, but the cost of this error is small (mild confusion about display state), the other things which do direct loads don't depend on this state (editing), and everything else loads via a repository and is likely to continue doing that forever.
    
    Test Plan: {F5026633}
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Maniphest Tasks: T12884
    
    Differential Revision: https://secure.phabricator.com/D18176
    epriestley committed Jun 30, 2017
  3. Move misplaced validation for ambiguous fields in "Test Plan" to the …

    …right place
    
    Summary:
    When users use the web UI to enter text like "Reviewers: x" into the "Summary" or "Test Plan", we can end up with an ambiguous commit message.
    
    Some time ago we added a warning about this to the "Summary" field, and //attempted// to add it to the "Test Plan" field, but it actually gets called from the wrong place.
    
    Remove the code from the wrong place (no callers, not reachable) and put it in the right place.
    
    This fixes an issue where users could edit a test plan from the web UI to add the text "Tests: ..." and cause ambiguities on a later "arc diff --edit".
    
    Test Plan: {F5026603}
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Differential Revision: https://secure.phabricator.com/D18175
    epriestley committed Jun 30, 2017
Commits on Jun 28, 2017
  1. Update people image for projects

    Summary: Better diversity.
    
    Test Plan: Photoshop
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D18170
    chadlittle committed Jun 28, 2017
Commits on Jun 27, 2017
  1. Drop interactive login from sshd example

    Summary: Prevent slightly disturbing output on SSH authentication failure that implies some kind of interactive logins are possible: `Permission denied (publickey,keyboard-interactive).`
    
    Test Plan: doitlive
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D18167
    Austin McKinley committed Jun 27, 2017
  2. Convert cluster/projects config options to newer modular structure

    Summary: Ref T12845. Converts the cluster and project config options to the new stuff; this is mostly just shifting boilerplate around.
    
    Test Plan: Edited, deleted, and mangled these options from the web UI and CLI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18166
    epriestley committed Jun 27, 2017
  3. Convert Maniphest custom config to new config types

    Summary:
    Fixes T12870. Ref T12845.
    
    Technically, this addresses the core issue in T12845 too, but I'm going to convert the rest of the `custom:...` types before closing that.
    
    In particular, for T12870:
    
      - Validates that keywords are unique across priorities.
      - Fixes missing newline in documentation.
      - Updates documentation to note that keywords are now mandatory and must be unique across priorities.
    
    Test Plan: Edited, deleted and mangled all the Maniphest custom options (priorities, statuses, points, subtypes).
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12870, T12845
    
    Differential Revision: https://secure.phabricator.com/D18165
    epriestley committed Jun 27, 2017
  4. Move "wild" config types to new code

    Summary:
    Ref T12845. This is the last of the hard-coded types.
    
    These are mostly used for values which users don't directly edit, so it's largely OK that they aren't carefully validated. In some cases, it would be good to introduce a separate validator eventually.
    
    Test Plan: Edited, deleted and mangled these values via the web UI and CLI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18164
    epriestley committed Jun 27, 2017
  5. Move 'set' config option type to new structure

    Summary: Ref T12845. This move 'set' options (a set of values).
    
    Test Plan: Set, deleted and mangled 'set' options from CLI and web UI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18160
    epriestley committed Jun 26, 2017
  6. Convert 'class' config options to new validation

    Summary: Ref T12845. These options prompt the user to select from among concrete subclasses of some base class.
    
    Test Plan: Set, deleted and mangled these values from the web UI and CLI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18159
    epriestley committed Jun 26, 2017
  7. Convert "bool" config values to new modular system

    Summary: Ref T12845. Moves the "bool" values over.
    
    Test Plan: Set, deleted, and mangled bool values from CLI and web UI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18158
    epriestley committed Jun 26, 2017
  8. Convert the "list<string>" and "list<regex>" Config option types

    Summary: Ref T12845. This updates the "list<string>" and "list<regex>" options.
    
    Test Plan: Set, deleted, and mangled options of these types from the web UI and CLI.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18157
    epriestley committed Jun 26, 2017
  9. Convert "enum" and "string" config options to new modular option types

    Summary: Ref T12845. This moves the "enum" and "string" types to the new code.
    
    Test Plan: Set, deleted, and tried to set invalid values for various enum and string config values (header color, mail prefixes, etc) from the CLI and web.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18156
    epriestley committed Jun 26, 2017
  10. Begin modularizing config options in a more modern way

    Summary:
    Ref T12845. Config options are "modular", but the modularity is very old, half-implemented, and doesn't use modern patterns.
    
    Half the types are hard-coded, while half the types are semi-modular but in a weird hacky way where you prefix the type with `custom:...`.
    
    The actual API is also weird and requires types to return a lot of `array($stuff, $thing, $other_thing, $more_stuff)` sorts of tuples.
    
    Instead:
    
      - Add a new replacement layer which uses modern modularity patterns and overrides the older stuff if available, so we can migrate things one at a time.
      - New layer uses a more modern API -- no `return array($thing, $other_thing, ...)`, and more modern building blocks (like AphrontHTTPParameterType).
      - New layer allows custom types to be deleted, which will ultimately let us deal with T12845.
    
    Then, convert the `'int'` type to use the new layer.
    
    Test Plan:
      - Set, edited, tried-to-change-in-an-invalid-way, and deleted an `'int'` option from the web UI.
      - Same from the CLI.
      - Edited `config.json` to have an invalid value, verified that the error was detected and config was repaired.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12845
    
    Differential Revision: https://secure.phabricator.com/D18155
    epriestley committed Jun 26, 2017
  11. New icons for Projects

    Summary: Updates the builtin images, leaves the old choose... icons for now. I'd like to automate this based on icon when creating a project.
    
    Test Plan: Visit edit picture page, pick a few. Purge cache, see new default image.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D18162
    chadlittle committed Jun 27, 2017
  12. Turn off spellcheck, etc, on main search input

    Summary: Ref T12872, turns off all these "helpful" fields.
    
    Test Plan: Type "phab" in main search and do not get a suggestion for "phablet".
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Maniphest Tasks: T12872
    
    Differential Revision: https://secure.phabricator.com/D18163
    chadlittle committed Jun 27, 2017
Commits on Jun 26, 2017
  1. Restore "Land Revision" action to UI

    Summary: This was accidentally caught in the crossfire in D18150. This is stable enough to formalize instead of adding with an event hook.
    
    Test Plan: Looked at a candidate revision, saw "Land Revision" appear in UI again.
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Differential Revision: https://secure.phabricator.com/D18154
    epriestley committed Jun 26, 2017
Commits on Jun 23, 2017
  1. Degrade more gracefully when ProfileMenu dashboards fail to render

    Summary:
    Ref T12871. This replaces a dead end UI (user totally locked out) with one where the menu is still available, if the default menu item is one which generates a policy exception (e.g., because users can't see the dashboard).
    
    Really, we should do better than this and not select this item as the default item if the viewer can't see it, but there is currently no reliable way to test for "can the viewer see this item?" so this is a more involved change. I'm thinking we get this minor improvement into the release, then pursue a more detailed fix afterward.
    
    Test Plan:
      - Added a dashboard as the top item in the global menu.
      - Changed the dashboard to be visible to only user B.
      - Viewed Home as user A.
      - Before patch: entire page is a policy exception dialog.
      - After patch, things are better:
    
    {F5014179}
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12871
    
    Differential Revision: https://secure.phabricator.com/D18152
    epriestley committed Jun 23, 2017
  2. Let PhabricatorSearchCheckboxesField survive saved query data with mi…

    …smatched types
    
    Summary:
    Fixes T12851.
    
    This should fix the error I'm seeing, which is:
    
    * `Argument 1 passed to array_fuse() must be of the type array, boolean given`
    
    There may be a better way to patch this up than overriding the getValue() method,
    however.
    
    Test Plan:
    - Changed the default "Tags" filter to specify `true` instead of `array('self')`, then viewed that filter in the UI.
    - Before patch: fatal.
    - After patch: page loads. Note that `true` is not interpreted as `array('self')`, but the page isn't broken, which is a big improvement.
    
    Reviewers: #blessed_reviewers, 20after4, chad, amckinley
    
    Reviewed By: #blessed_reviewers, amckinley
    
    Subscribers: Korvin
    
    Maniphest Tasks: T12851
    
    Differential Revision: https://secure.phabricator.com/D18132
    epriestley committed Jun 19, 2017
  3. Fix ambiguous URI parsing in Youtube Remarkup rule

    Summary:
    Fixes T12867. Also:
    
      - Simplify the code a little.
      - Stop mutating this on text/mobile -- there's no inherent value in the "youtu.be" link so I think this just changes the text the user wrote unnecessarily.
    
    Test Plan: {F5013804}
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Maniphest Tasks: T12867
    
    Differential Revision: https://secure.phabricator.com/D18149
    epriestley committed Jun 23, 2017
  4. Remove old "Landing Strategy" code

    Summary:
    Fixes T12869. This is a very old, pre-Drydock chunk of code from D7486 and some followups.
    
    It does three things:
    
      - "Land to Hosted Git": Obsoleted by Drydock, has been commented out in HEAD for a very long time with no complaints. Disabled by D8719 in 2014.
      - "Land to Hosted Mercurial": Could be obsoleted by Drydock with a fairly small amount of work, but currently has no replacement. Unclear if this sees any real use. Not actually disabled at HEAD.
      - "Land to GitHub": Use GitHub OAuth credentials to land to GitHub. This is sort of theoretically useful and has no analog today. Disabled by D13022 in 2015.
    
    This stuff was largely disabled a long time ago and we haven't seen users hitting issues with it. This could all be moved to an extension today if anyone still relies on it.
    
    Test Plan: Grepped for removed classes, browsed Differential.
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Maniphest Tasks: T12869
    
    Differential Revision: https://secure.phabricator.com/D18150
    epriestley committed Jun 23, 2017
Commits on Jun 22, 2017
  1. Add a top level tab navigation option to PHUITwoColumnView

    Summary: Builds out a responsive tab bar system for PHUITwoColumnView pages
    
    Test Plan:
    Tested at mobile, tablet, and desktop breakpoints
    
    {F5012429}
    
    {F5012430}
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D18148
    chadlittle committed Jun 22, 2017
  2. Add a cache purger for builtin files

    Summary: Fixes T12859.
    
    Test Plan:
      - Loaded Diffusion builtin icons before recent updates, saw cached builtins.
      - Ran `bin/cache purge --caches builtin-file`.
      - Reloaded, saw new files.
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Maniphest Tasks: T12859
    
    Differential Revision: https://secure.phabricator.com/D18147
    epriestley committed Jun 22, 2017
  3. Modularize "bin/cache" purgers

    Summary: Ref T12859. This is an older command with a lot of hard-coded flags. Modularize cache purging in a modern way so it can be extended.
    
    Test Plan: Ran `bin/cache purge --trace` with various valid and invalid flags.
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Maniphest Tasks: T12859
    
    Differential Revision: https://secure.phabricator.com/D18146
    epriestley committed Jun 22, 2017
  4. Make searching by tags work in Phriction

    Summary: Fixes T12860. Some joins were being dropped because we didn't call `parent::...`
    
    Test Plan:
      - Tagged a document.
      - Searched for documents with that tag.
      - Before change: got all documents.
      - After change: got only tagged documents.
    
    Reviewers: chad
    
    Reviewed By: chad
    
    Maniphest Tasks: T12860
    
    Differential Revision: https://secure.phabricator.com/D18145
    epriestley committed Jun 22, 2017
  5. Fix AA in repository images

    Summary: Updated Files, no more AA issue.
    
    Test Plan: look
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: Korvin
    
    Differential Revision: https://secure.phabricator.com/D18144
    chadlittle committed Jun 22, 2017
  6. New icons for repositories

    Summary: Had some made, they seem better than my attempt.
    
    Test Plan: review in sandbox.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    Subscribers: avivey, Korvin
    
    Maniphest Tasks: T12859
    
    Differential Revision: https://secure.phabricator.com/D18143
    chadlittle committed Jun 21, 2017
Commits on Jun 21, 2017
  1. Let "<select />" EditEngine fields canonicalize saved defaults

    Summary:
    Ref T12124. After D18134 we accept either "25" or "low" via HTTP parameters and when the field renders as a control, but if the form has a default value for the field but locks or hides it we don't actually run through that logic.
    
    Canonicalize both when rendering the control and when using a raw saved default value.
    
    Test Plan:
      - Created a form with "Priority: Low".
      - Hid the "Priority" field.
      - Before patch: Tried to create a task, was rebuffed with a (now verbose and helpful, after D18135) error.
      - Applied patch: things worked.
    
    Reviewers: chad, amckinley
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12124
    
    Differential Revision: https://secure.phabricator.com/D18142
    epriestley committed Jun 20, 2017
Commits on Jun 20, 2017
  1. Don't compute MIME type of noninitial chunks from `diffusion.filecont…

    …entquery`
    
    Summary:
    Ref T12857. This is generally fairly fuzzy for now, but here's something concrete: when we build a large file with `diffusion.filecontentquery`, we compute the MIME type of all chunks, not just the initial chunk.
    
    Instead, pass a dummy MIME type to non-initial chunks so we don't try to compute them. This mirrors logic elsewhere, in `file.uploadchunk`. This should perhaps be centralized at some point, but it's a bit tricky since the file doesn't know that it's a chunk until later.
    
    Also, clean up the `TempFile` immediately -- this shouldn't actually affect anything, but we don't need it to live any longer than this.
    
    Test Plan:
      - Made `hashFileContent()` return `null` to skip the chunk cache.
      - Added `phlog()` to the MIME type computation.
      - Loaded a 12MB file in Diffusion.
      - Before patch: Saw 3x MIME type computations, one for each 4MB chunk.
      - After patch: Saw 1x MIME type computation, for initial chunk only.
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Maniphest Tasks: T12857
    
    Differential Revision: https://secure.phabricator.com/D18138
    epriestley committed Jun 19, 2017
  2. Pass all Throwables to Exception Handlers, not just Exceptions

    Summary:
    Ref T12855. PHP7 introduced "Throwables", which are sort of like super exceptions. Some errors that PHP raises at runtime have become Throwables instead of old-school errors now.
    
    The major effect this has is blank pages during development under PHP7 for certain classes of errors: they skip all the nice "show a pretty error" handlers and
    
    This isn't a compelete fix, but catches the most common classes of unexpected Throwable and sends them through the normal machinery. Principally, it shows a nice stack trace again instead of a blank page for a larger class of typos and minor mistakes.
    
    Test Plan:
    Before: blank page. After:
    
    {F5007979}
    
    Reviewers: chad, amckinley
    
    Reviewed By: chad
    
    Maniphest Tasks: T12855
    
    Differential Revision: https://secure.phabricator.com/D18136
    epriestley committed Jun 19, 2017
Commits on Jun 19, 2017
  1. Allow numeric constants to act as aliases for task priorities in the …

    …web UI <select />
    
    Summary:
    Ref T12124. This is a fairly narrow fix for existing saved EditEngine forms with a default priority value.
    
    These saved forms have a numeric (or probably "string-numeric") default value, like "50". They lost their meaning after D18111, when "50" no longer appears in the dropdown. Instead, these forms all select the highest available priority.
    
    At time of writing, this form was broken on this install, for example:
    
    > https://secure.phabricator.com/transactions/editengine/maniphest.task/view/13/
    
    Additionally, `/task/edit/form/123/?priority=...` (for templating forms) stopped working with `priority=50`. This isn't nearly as important, but a larger and more sudden compatiblity break than we need to make.
    
    Add support for an "alias map" on `<select />` controls, so if the value comes in with something we don't recognize we'll treat it like some other value. Then alias all the numeric constants -- and other keywords -- to the right constants.
    
    This ended up only affecting the `<select />` control in the web UI.
    
    Test Plan:
      - On `stable`, created a form with "Priority: Low".
      - Before patch: form has "Priority: Unbreak Now!" on `master`.
      - After patch: form has "Priority: Low" again.
      - Used `?priority=25`, `?priority=wish`, `?priority=wishlist` to template forms: all forms worked.
    
    Reviewers: amckinley, chad
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12124
    
    Differential Revision: https://secure.phabricator.com/D18134
    epriestley committed Jun 19, 2017
  2. Improve validation errors for changing task priorities

    Summary:
    Ref T12124. Currently, Conduit provides a fairly rough error message if you provide an invalid priority.
    
    Instead, provide a more tailored message. Also, block `!!unknown!!` except from web edits.
    
    Test Plan:
    Before:
    
    {F5007964}
    
    After:
    
    {F5007965}
    
    Also, changed a priority to `999` in the database, edited it with the normal web UI form, it let me make the edit without being forced to adjust the priority.
    
    Reviewers: amckinley, chad
    
    Reviewed By: amckinley
    
    Maniphest Tasks: T12124
    
    Differential Revision: https://secure.phabricator.com/D18135
    epriestley committed Jun 19, 2017