1. 22 Jul, 2013 24 commits
    • epriestley's avatar
      Fix "setName()" on Differental revision handles · f7e14500
      epriestley authored
      Summary: I copied this over wrong. Ref T2715
      
      Test Plan: Looked at Maniphest with linked commits/revisions, e.g.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6531
      f7e14500
    • epriestley's avatar
      Use application PHIDs in countdown · f00b43d4
      epriestley authored
      Summary: Ref T2715. Swap countdown to application PHIDs.
      
      Test Plan: Used `phid.lookup`; `phid.query`.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6532
      f00b43d4
    • epriestley's avatar
      Use ApplicationSearch in Pholio · 3aa5fcfc
      epriestley authored
      Summary: Ref T2637. Ref T2625. Convert Pholio to use ApplicationSearch.
      
      Test Plan:
      Viewed mocks, changed filters.
      
      Verified edit page works and no longer has a weird side nav on it.
      
      Reviewers: btrahan, chad
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2625, T2637
      
      Differential Revision: https://secure.phabricator.com/D6530
      3aa5fcfc
    • epriestley's avatar
      Fix exception with "phabricator.allowed-uris" when trying to set cookies · 7657c5e1
      epriestley authored
      Summary: The `phabricator.allowed-uris` config setting is not checked properly when trying to set cookies.
      
      Test Plan:
      Set an alternate URI, then accessed Phabricator. No longer received a secondary cookie error.
      
      Hit the new exceptions to test them:
      
      {F51131}
      {F51132}
      
      Reviewers: btrahan, garoevans
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D6528
      7657c5e1
    • epriestley's avatar
      Hack up Asana story text so it's more useful · c66ea567
      epriestley authored
      Summary: `FeedStory->renderText()` is garbage and I don't want to fix it in general until after T2222 / T2217. Provide an Asana-specific alternative for higher-quality feed stories (notably, including comment text).
      
      Test Plan: {F51035}
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2852
      
      Differential Revision: https://secure.phabricator.com/D6521
      c66ea567
    • epriestley's avatar
      Fix "request" and "update" mail preferences for Differential · cf255cde
      epriestley authored
      Summary:
      Fixes T3030. T1977 attempted to fix this but either didn't work (I think this is the case) or was broken later. We don't send `DifferentialCommentMail` on a create or update; we send `DifferentialReviewRequestMail`.
      
      Also update the details to be more clear.
      
      Test Plan:
      Verified review request mail is marked undeliverable:
      
      ```
      $ ./bin/mail show-outbound --id 6644
      ...
      PARAMETERS
      ...
      mailtags: ["differential-review-request"]
      ...
      subject: D922: asdf
      subject-prefix: [Differential]
      vary-subject-prefix: [Request, 100 lines]
      ...
      RECIPIENTS
      ! duck (duck)
          - This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences).
      
      BODY
      epriestley requested code review of "asdf".
      ...
      ```
      
      Verified update mail is marked undeliverable:
      
      ```
      $ ./bin/mail show-outbound --id 6646
      ...
      Message: Message has no valid recipients: all To/Cc are disabled, invalid, or configured not to receive this mail.
      
      PARAMETERS
      ...
      mailtags: ["differential-updated"]
      ...
      subject: D922: asdf
      subject-prefix: [Differential]
      vary-subject-prefix: [Updated, 100 lines]
      ...
      RECIPIENTS
      ! duck (duck)
          - This mail has tags which control which users receive it, and this recipient has not elected to receive mail with any of the tags on this message (Settings > Email Preferences).
      
      BODY
      epriestley updated the revision "asdf".
      ...
      ```
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T3030
      
      Differential Revision: https://secure.phabricator.com/D6518
      cf255cde
    • epriestley's avatar
      Provide a callback for Queries to filter objects from alternate result sets · f32e0e93
      epriestley authored
      Summary: Ref T2715. `PhabricatorObjectQuery` can theoretically bypass policies on its side-channel result set. This can't actually happen in practice because all the loading mechanisms are filtered, but provide a general way to implement side channel results safely.
      
      Test Plan: Loaded some pages; see next diff.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6514
      f32e0e93
    • epriestley's avatar
      Use application PHIDs in Repositories · d3cf7874
      epriestley authored
      Summary: Ref T2715. Move repositories to new app PHIDs.
      
      Test Plan: Used `phid.lookup`; `phid.query`; browsed Diffusion.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6529
      d3cf7874
    • epriestley's avatar
      Use Application PHIDs in Projects · 69d5a9af
      epriestley authored
      Summary: Ref T2715. Move Projects to the new stuff.
      
      Test Plan: Used `phid.query` to load projects.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6526
      69d5a9af
    • epriestley's avatar
      Use ApplicationSearch in projects · b574b3ff
      epriestley authored
      Summary: Ref T2715. I stripped a bunch of stuff from the list since it was buggy, slow, or both. Some day, we'll rebuild it.
      
      Test Plan: {F51128}
      
      Reviewers: btrahan, chad
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6525
      b574b3ff
    • epriestley's avatar
      Use modern UI elements and application/event-oriented construction in Projects · 7cbe82d7
      epriestley authored
      Summary:
      Ref T2715. This partially modernizes projects.
      
      Precursor to using ApplicationSearch, which is a precursor to using application PHIDs.
      
      Then, some day, we will make projects good.
      
      Test Plan: {F51126}
      
      Reviewers: btrahan, chad
      
      Reviewed By: chad
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6524
      7cbe82d7
    • epriestley's avatar
      Use Application PHIDs in Files · 3fcd9c93
      epriestley authored
      Summary: Ref T2715. Move files to the new stuff.
      
      Test Plan: Used `phid.query`; `phid.lookup` to find files.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6523
      3fcd9c93
    • epriestley's avatar
      Convert config to application PHIDs · 911aaee8
      epriestley authored
      Summary: Ref T2715.
      
      Test Plan: Used `phid.query` to load config entries. Edited config entries.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6520
      911aaee8
    • epriestley's avatar
      Remove PhabricatorPHID::fromObjectName · 2845d119
      epriestley authored
      Summary: Ref T2715. This only ever supported like 10% of object types; get rid of it in favor of the new infra.
      
      Test Plan:
        - Ran `bin/search index D12`; `bin/search index <some valid phid>`, `bin/search index derp`.
        - Turned off Search jump, searched for `D12`.
        - Used `phid.lookup`.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6519
      2845d119
    • epriestley's avatar
      Use application PHIDs in Pholio Mocks · 2ff57f69
      epriestley authored
      Summary: Ref T2715. Switch mocks to the new stuff.
      
      Test Plan: Used `phid.query` and `phid.lookup` to find mocks.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6517
      2ff57f69
    • epriestley's avatar
      Use Application PHIDs in Maniphest · 17ee71d8
      epriestley authored
      Summary: Ref T2715. Switch Maniphest to the new stuff.
      
      Test Plan: Used `phid.query`; `phid.lookup` to load objects.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6516
      17ee71d8
    • epriestley's avatar
      Use Application PHIDs for commits · 0e3cb3b3
      epriestley authored
      Summary: Ref T2716. Ref T2715. Move CMIT to use Application PHIDs. Nothing too special here, but I consolidated some code into DiffusionCommitQuery. Depends on D6514.
      
      Test Plan: Browsed Diffusion. Browsed Differential/Maniphest with linked commits. Used jump nav; used `phid.lookup` and `phid.query`. Used remarkup for Git and SVN repos. Grepped for PHID_TYPE_CMIT.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715, T2716
      
      Differential Revision: https://secure.phabricator.com/D6515
      0e3cb3b3
    • epriestley's avatar
      Use application PHIDs for mailing lists · c5a06a62
      epriestley authored
      Summary:
      Ref T2715. Ref T603. Ref T2625.
      
        - Implement policies.
        - Use policy queries.
        - Use ApplicationSearch.
        - Use application PHIDs.
      
      Test Plan: Browsed things with lists CC'd; edited lists; created a list, used `phid.query` to query handles.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T603, T2625, T2715
      
      Differential Revision: https://secure.phabricator.com/D6513
      c5a06a62
    • epriestley's avatar
      Use application PHIDs in Releeph, plus more · d2e5afb0
      epriestley authored
      Summary:
      Ref T2715. Ref T3551. Ref T603. This does a few things, but they're all sort of small:
      
        - We commonly use a `getX()` / `attachX()` pattern, but have very similar code in the `getX()` method every time. Provide a convenience method to make this pattern easier to write.
        - We use `willFilterPage()` in many queries, but it currently is called with zero or more results. This means we have a lot of "if no results, return nothing" boilerplate. Make it call only for one or more results.
        - Implement `PhabricatorPolicyInterface` on `ReleephBranch`. A branch has the same policy as its project.
        - Implement `ReleephBranchQuery`.
        - Move the branch PHID type to application PHID infrastructure.
      
      Test Plan: Browsed Releeph. Used `phid.query` to query branch PHIDs.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T603, T2715, T3551
      
      Differential Revision: https://secure.phabricator.com/D6512
      d2e5afb0
    • epriestley's avatar
      Delete various dead/nonuseful PHID code · 220f0ea4
      epriestley authored
      Summary:
      Ref T2715.
      
        - Remove the "PHID" application. `phid.query` provides a reasonable way for developers to get this data without requiring a top-level application.
        - Remove some dead/uncalled code.
      
      Test Plan: No more PHID application. Grepped for callsites.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6511
      220f0ea4
    • epriestley's avatar
      Use application handle infrastructure for Releeph Requests and Releeph Projects · f2ed5614
      epriestley authored
      Summary: Ref T2715.
      
      Test Plan: Used `phid.query` to query handles. Browsed Releeph.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6510
      f2ed5614
    • epriestley's avatar
      Move DifferentialRevision to application PHIDs · 1fb39a20
      epriestley authored
      Summary: Ref T2715.
      
      Test Plan: Used `phid.lookup` and `phid.query` to load handles. Grepped for `PHID_TYPE_DREV`.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6509
      1fb39a20
    • epriestley's avatar
      Proide application-based handle loads; load Slowvote handles from the application · 5ca41917
      epriestley authored
      Summary:
      Ref T2715. This is pretty straightforward, I think. Notes:
      
        - Long term, I want to replace `PhabricatorObjectHandleData` with `PhabricatorObjectQuery` and `PhabricatorHandleQuery`. The former's name is a relic of old Facebook stuff and unusual now that everything else uses normal queries.
        - I simplified the amount of work applications need to do in order to populate handles. The should just need to set names and URIs in most cases.
      
      Test Plan: Used `phid.lookup` and `phid.query` to load slowvote handles. Browsed around to load other handles.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T2715
      
      Differential Revision: https://secure.phabricator.com/D6508
      5ca41917
    • epriestley's avatar
      Unbeta tokens · bcb282bd
      epriestley authored
      Summary: Fixes T3580.
      
      Test Plan: Viewed home page, no beta icon on tokens.
      
      Reviewers: chad, btrahan
      
      Reviewed By: chad
      
      CC: aran
      
      Maniphest Tasks: T3580
      
      Differential Revision: https://secure.phabricator.com/D6527
      bcb282bd
  2. 21 Jul, 2013 5 commits
  3. 20 Jul, 2013 3 commits
  4. 19 Jul, 2013 6 commits
    • Bob Trahan's avatar
      Pholio - allow Pholio Mocks to be attached to Maniphest Tasks (and vice versa) · 38545994
      Bob Trahan authored
      Summary: Fixes T2654.
      
      Test Plan: attached lots of mocks and tasks to one another from both maniphest and pholio. verified transactions rendered okay in both applications
      
      Reviewers: epriestley
      
      Reviewed By: epriestley
      
      CC: aran, Korvin
      
      Maniphest Tasks: T2654
      
      Differential Revision: https://secure.phabricator.com/D6501
      38545994
    • epriestley's avatar
      Clean up CSS for Pholio upload thing · e777f7ad
      epriestley authored
      Summary: Ref T3572. Pure JS/CSS changes, just cleaning up some of the mess I made and slightly improving the behavior on mobile (you won't be able to edit images on mobile, but you could fix descriptions and titles, at least).
      
      Test Plan: {F50887}
      
      Reviewers: btrahan, chad
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T3572
      
      Differential Revision: https://secure.phabricator.com/D6500
      e777f7ad
    • epriestley's avatar
      Add JS support for replacing Pholio mocks 1:1 · 87871b35
      epriestley authored
      Summary:
      Ref T3572. Needs some CSS tweaks, but this lets you drag an image on top of another image to replace it. There's no server-side or transaction support (and I'm not planning to build that), I just wanted to clear the way on the JS side.
      
      You'll get an additional array posted called `replaces`. Keys are old file PHIDs; values are new file PHIDs.
      
      Note that a key may not exist yet (if a user adds an image, and then also replaces that same image). In this case, the server should just treat it as an add.
      
      Test Plan: Dragged images on top of other images.
      
      Reviewers: btrahan, chad
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T3572
      
      Differential Revision: https://secure.phabricator.com/D6499
      87871b35
    • epriestley's avatar
      Mark dead databases as "dead" and don't dump, probe, or list them · 83c29da5
      epriestley authored
      Summary:
      When we delete a database, we still need to create it in the patch sequence so that installs can upgrade correctly. However, we shouldn't try to dump, probe, or list it. Mark deleted databases (of which there is only one) as "dead" and don't dump them.
      
      A specific problem this fixes is `bin/storage dump` failing when trying to dump `phabricator_timeline`, which no longer exists.
      
      Test Plan: Ran `bin/storage dump`, `list`, `probe`.
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D6496
      83c29da5
    • epriestley's avatar
      Provide "Undo" on Pholio mock edits · 74ded4c1
      epriestley authored
      Summary: Ref T2637. Allows you to "undo" if you delete an image from a mock by accident.
      
      Test Plan:
      Deleted; undo'd.
      
      {F50878}
      
      Reviewers: btrahan, chad
      
      Reviewed By: chad
      
      CC: aran
      
      Maniphest Tasks: T2637
      
      Differential Revision: https://secure.phabricator.com/D6498
      74ded4c1
    • epriestley's avatar
      Fix a fatal in the feed handler, grotesquely · 02e1dc74
      epriestley authored
      Summary: The feed handler in the IRC bot calls Conduit to render feed stories, which sometimes end up here with no user. "Fix" it. This patch is really bad but the underlying code is a mess too. Fixing this is properly is blocked on T2222/T2217. Until those land, stop fataling at least.
      
      Test Plan: @dctrwatson confirmed this fixed things.
      
      Reviewers: dctrwatson, btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Differential Revision: https://secure.phabricator.com/D6497
      02e1dc74
  5. 18 Jul, 2013 2 commits
    • epriestley's avatar
      Modernize architecture of `phd` · d89b8ce2
      epriestley authored
      Summary:
      Ref T1670. Mostly, use PhutilArgumentParser. This breaks up the mismash of functional stuff and PhabriatorDaemonControl into proper argumentparser Workflows.
      
      There are no functional changes, except that I removed the "pingConduit()" call prior to starting daemons, because I intend to remove all Conduit integration.
      
      Test Plan:
      - Ran `phd list`.
      - Ran `phd status` (running daemons).
      - Ran `phd status` (no running daemons).
      - Ran `phd stop <pid>` (dead task).
      - Ran `phd stop <pid>` (live task).
      - Ran `phd stop zebra` (invalid PID).
      - Ran `phd stop 1` (bad PID).
      - Ran `phd stop`.
      - Ran `phd debug zebra` (no match).
      - Ran `phd debug e` (ambiguous).
      - Ran `phd debug task`.
      - Ran `phd launch task`.
      - Ran `phd launch 0 task` (invalid arg).
      - Ran `phd launch 2 task`.
      - Ran `phd help`.
      - Ran `phd help list`.
      - Ran `phd start`.
      - Ran `phd restart`.
      - Looked at Repositories (daemon running).
      - Looked at Repositories (daemon not running).
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran
      
      Maniphest Tasks: T1670
      
      Differential Revision: https://secure.phabricator.com/D6490
      d89b8ce2
    • epriestley's avatar
      Pholio - make the form maintain client side edits between file uploads · dd761433
      epriestley authored
      Summary: Fixes T3553. Did it by adding some code that refreshes the File object on keyup events within a given file entry. also fixes an html derp I found trying to fix this.
      
      Test Plan: added cool things like 'bbb' to every field and noted they were maintained when I added more files
      
      Reviewers: btrahan
      
      Reviewed By: btrahan
      
      CC: aran, Korvin, chad
      
      Maniphest Tasks: T3553
      
      Differential Revision: https://secure.phabricator.com/D6488
      dd761433