1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 17:28:51 +02:00
Commit graph

3155 commits

Author SHA1 Message Date
epriestley
71c170661b Use "flame" notification icon and bubble instead of lightning bolt
Summary: Switch to the final versions of these

Test Plan: Will add screenshots...

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4032
2012-11-27 14:03:25 -08:00
epriestley
b04114f95c Allow Drydock to allocate (very basic) working copy resources
Summary: This is missing a lot of features, but technically allows working copy allocation.

Test Plan: Ran `drydock lease --type working-copy --attributes repositoryID=12`, got a working copy of Phabricator allocated on disk.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3999
2012-11-27 12:48:14 -08:00
epriestley
5cbc31644b Add a "close" action to Drydock resources
Summary: This does nothing fancy, just closes the resource and releases/breaks leases. They'll get cleaned up in some to-be-written GC process.

Test Plan: Closed resources from web UI and CLI.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3998
2012-11-27 12:48:03 -08:00
epriestley
1bbdfa60c7 Build PhabricatorTagView
Summary:
Builds out most of the non-hover-stuff from `overview-hovercards.png`. Things I didn't build:

  - Tokens (I like them a lot but don't want to scope creep)
  - Functions (backend mess / future work)
  - Icons for tags.
  - Tags with pointy ends and holes in them (an earlier mock had this I think but they're gone on final)
  - The cyaney color for "Sporadic" since I just noticed it while typing this up.

Test Plan: Looked at UIExample page.

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2089

Differential Revision: https://secure.phabricator.com/D4029
2012-11-24 06:47:06 -08:00
epriestley
9913804932 Remove some unused images
Summary:
 - Remove `app_audit.png`, which is now part of the sprite (it was held back transitionally to make sure things worked).
 - Remove `sprite.png`, which is the old button sprite. The only remaining use was on the home page, which I replaced with box shadows to achieve a similar effect. These buttons should probably go away at some point anyway.

Test Plan: {F25768}

Reviewers: chad

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4028
2012-11-24 06:46:57 -08:00
epriestley
6c88c76cac Generate an icon sprite map with new sprites and 2x retina graphics
Summary:
  - The filesystem is now the authority for which sprites are available. If you add new icons, the generation process will pick them up.
  - I broke out icon generation and added retina support. App icon generation still uses the old method.
  - Update ActionList and RemarkupControl to use the new sheet.
  - Use white icons on hover.
  - Also fixed a couple of minor issues with some stuff in Firefox/Chrome.

Test Plan:
{F25750}

{F25751}

{F25752}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D4027
2012-11-23 16:35:39 -08:00
epriestley
f8e6240b9d Move sprite sources from webroot/ to resources/
Summary:
  - Since we'll never serve these directly, move them to resources/. This makes generating the Celerity map faster and reduces the size of the result map, since we don't need to analyze resources we'll never serve.
  - Also Rename the 2x `subscribe-remove` to `subscribe-delete` since they were named inconsistently. Everything else is in good shape.

Test Plan: Generated sprites as per D4025

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D4026
2012-11-23 16:19:06 -08:00
epriestley
d9fd43704f Improve Lightbox behavior for nonstandard clicks
Summary:
When users middle click or command-click an image, we should open it in a new tab, not open a lightbox.

See https://github.com/facebook/phabricator/issues/234

Test Plan: Left, middle, and command-clicked a lightbox image.

Reviewers: vrana, chad, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4020
2012-11-22 08:25:13 -08:00
epriestley
3ceaad1aa8 Add basic email support to Pholio
Summary: These emails aren't yet useful, but thread/multiplex/etc correctly.

Test Plan: Got some Pholio emails.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3842
2012-11-21 17:39:46 -08:00
epriestley
029cfcfc19 Add subscriber/mention support to Pholio
Summary:
  - Show subscribers.
  - When a user is mentioned in the description or a comment, subscribe them explicitly.

Test Plan: {F22370}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3838
2012-11-21 17:38:57 -08:00
epriestley
1f873572a4 Make Pholio mock edits (mostly) transaction-oriented
Summary:
  - Use transactions to apply edits.
  - Use Editor to apply transactions.
  - Some special casing for tricky stuff I don't want to deal with yet (mock images).

Test Plan: {F22368}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3837
2012-11-21 17:27:44 -08:00
epriestley
e389fc70fa Allow users to add comments in Pholio
Summary: Basic support for adding comments. Missing a lot of frills. Uses new comment/transaction UI.

Test Plan:
Added some comments. Tried to add an empty comment.

Some comments:

{F22361}

No text provided:

{F22362}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3834
2012-11-21 17:27:20 -08:00
epriestley
1d5551789d Add basic transaction/timeline view
Summary:
This is still rough and not completely accurate to the mocks (and the mobile view is quite crude and mostly just "hey this technically works"), but I want to build Pholio on top of it rather than building it on something else and then swapping it out later and the API is reasonable enough.

This should probably be called `PhabricatorTransactionView` but we already have one of those. I might juggle the names in a future diff.

Test Plan:
Desktop

{F22352}

Mobile

{F22351}

Reviewers: chad, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3833
2012-11-21 17:24:56 -08:00
epriestley
6f913b7124 Add Pholio mock view basics
Summary:
Just laying more groundwork out of ready-made UI.

{F22349}

Test Plan: Looked at a mock.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3832
2012-11-21 17:24:01 -08:00
epriestley
a6cd41ff7d Add very basic create interface for Pholio
Summary:
Nothing app-specific yet, just stitching groundwork together from readymade components.

{F22347}

Test Plan: Created some mocks via web UI.

Reviewers: btrahan, chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3830
2012-11-21 17:23:28 -08:00
epriestley
fc9ad37b26 Add very basic scaffolding for Pholio
Summary:
I'm not going to land this until it's a bit more fleshed out since it would just confuse users, but this is probably more reviewable as a few diffs adding a couple features than one ULTRA-diff adding everything. Implement application basics for Pholio. This does more or less nothing, but adds storage, subscribe, flag, markup, indexing, query basics, PHIDs, handle loads, a couple of realy really basic controllers, etc.
Basic hierarchy is:

  - **Moleskine**: Top-level object like a Differential Revision, like "Ponder Feed Ideas".
  - **Image**: Each Moleskine has one or more images, like the unexpanded / expanded / mobile / empty states of feed.
  - **Transaction**: Comment or edit, like Maniphest. I generally want to move most apps to a transaction model so we can log edits.
  - **PixelComment**: Equivalent of an inline comment.

Test Plan: Created a fake object and viewed it.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran, davidreuss

Maniphest Tasks: T2097

Differential Revision: https://secure.phabricator.com/D3817
2012-11-21 17:22:36 -08:00
epriestley
f4fa968770 Fix an issue with browsing repositories that have README, etc
Summary: D3533 changed the path for files at root from, e.g., "README" to "/README", which fatals when we try to `git cat-file` it.

Test Plan:
This no longer happens:

{F24874}

Viewed a directory in browse without a trailing slash in the URL.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D4016
2012-11-21 16:56:05 -08:00
vrana
4d7b441834 Don't skip even lines in copied code detector
Summary: PHP 3 basics: `each()` advances internal pointer so calling `next()` is wrong.

Test Plan: New test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4011
2012-11-21 16:34:53 -08:00
vrana
254678d41d Delete dead code handling README
Summary: Since D2336.

Test Plan: Looked at README in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4015
2012-11-21 16:34:30 -08:00
epriestley
66c648cc56 Fix a redirect-on-login issue by allowing logged-out users to view 404 pages
Summary:
See T2102 and inline for discussion. This seems like the least-bad approach until we have something better.

The utility of next_uri seems much greater than the minor exposure of routable URIs.

Note that attackers can //not// detect if routable URIs are //valid// (e.g., "/D999" will always hit the login page whether it exists or not), just that they're routable. So you can only really tell if apps are installed or not.

Test Plan: Hit `/alsdknlkasnbla` while logged out, got 404 instead of login.

Reviewers: vrana, codeblock, btrahan

Reviewed By: codeblock

CC: aran

Maniphest Tasks: T2102

Differential Revision: https://secure.phabricator.com/D4012
2012-11-21 14:43:35 -08:00
Nick Harper
b5c7896b10 Fix diffusion browse queries in git
Summary:
If you try to load a directory in diffusion in a git repo that has a readme
file and you don't include a trailing slash in the path, you get an error
because we don't assemble the full paths of files correctly. This fixes that.

Test Plan: load such a directory in diffusion and see no fatal

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3533
2012-11-21 13:48:27 -08:00
vrana
abd880e30f Display correct size of binary files in Diffusion
Test Plan: https://secure.phabricator.com/diffusion/P/browse/master/webroot/rsrc/image/header_logo.png

Reviewers: btrahan, epriestley

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D3961
2012-11-21 13:09:45 -08:00
vrana
97a97f5376 Attach mentioned Maniphest task also to revision
Summary: Also disable this feature without 'maniphest.enabled'.

Test Plan:
Wrote "fixes T..." in `arc diff`, verified that the task is attached.
Add another "fixes T..." in edit revision on web, verified that it was added.
Deleted "fixes T..." in edit revision, verified that the attached task wasn't deleted.

Reviewers: 20after4, epriestley

Reviewed By: 20after4

CC: aran, Korvin

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D3986
2012-11-21 11:23:47 -08:00
vrana
58716521bd Disable Maniphest Remarkup rule with disabled Maniphest
Test Plan: Disabled Maniphest, wrote T1000, enabled, wrote T1000.

Reviewers: pieter, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4010
2012-11-21 11:22:19 -08:00
vrana
03aca35cce Create new paths in Differential
Summary: It is used by 'Pending Differential Revisions'.

Test Plan: Created a new file, `arc diff`, looked at this path in Diffusion, saw Pending Differential Revisions.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3991
2012-11-21 11:08:49 -08:00
vrana
3732f14740 Document that arc diff is able to commit
Test Plan: Read it.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2025

Differential Revision: https://secure.phabricator.com/D4008
2012-11-21 11:05:09 -08:00
vrana
3d6e4280d1 Fix markup in docs
Summary: We highligh ##``## only on the same line.

Test Plan: Looked at it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D4007
2012-11-21 11:04:32 -08:00
epriestley
7138427a05 Modify Celerity to emit required resources on Ajax responses
Summary: Companion diff to D4003.

Test Plan: Rigged up a response which loaded a CSS file with `body { background: red; }`, verified page turned red after I clicked the button.

Reviewers: vrana, chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2086

Differential Revision: https://secure.phabricator.com/D4004
2012-11-21 08:37:01 -08:00
epriestley
2dcc4cfb53 Update static resource packages
Summary: These are a bit out of date; bundle things together better.

Test Plan: Viewed page source for home, differential list, differential diff, maniphest list, maniphest task. Verified reasonable resource packaging.

Reviewers: chad, vrana, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D4002
2012-11-20 18:01:25 -08:00
epriestley
10a9f2a15f Improve PhabricatorPropertyListView and add section headers
Summary:
  - For Drydock, I want to add section headers to separate user-defined attributes from global attributes.
  - Some day for Differential, I want to add "Summary" and "Test Plan" section headers.
  - Clean up some stuff a bit; drop the multiple APIs for setting text content. Explicitly disallow appendChild().
  - Build out the UIExample a bit.

Test Plan:
{F24821}

{F24822}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D4000
2012-11-20 18:01:18 -08:00
Wez Furlong
df76ed9545 be careful of received mail object in error cases too
Summary:
we're tracking down a fatal caused by the mandatory
attachments array parameter change in the reply handler and
yo dawg, heard you like to fatal in your fatal.

Test Plan:
internal test scenario with xmail -> phabricator
triggered manually.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D4005
2012-11-20 17:19:26 -08:00
epriestley
b2bf634795 Add a detail view for resources in Drydock
Summary: Nothing fancy here, just add a detail page.

Test Plan:
Looked at detail page.

{F24808}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran, vrana

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3995
2012-11-20 13:25:22 -08:00
epriestley
27626e6d47 Document a policy about fishing expeditions
Summary:
Tighten the Phabricator support policy from "we will help with literally anything for free" to "we will help with anything for free, except unreproducible fishing expeditions".

This is not the right policy in the long term (in some form, I expect the level of free support will decrease, and, e.g., I won't be offering to drive to your place and fix your stuff), but this class of issue is by far the worst and most pressing and I want to stop dealing with fishing expeditions like this one right now, since I hate supporting them and they're a disproportionately huge waste of time:

  https://github.com/facebook/phabricator/issues/233

We had a similar case over the weekend on Facebook:

  (... snip many messages ...)
  Adam Aahil
  :(
  need your help bro i have to also setup on live server as well
  still trying ...
  not success
  after doing this my local apache is not restarting ..

  Adam Aahil
  when u get time plz let me know

Write a friendly explanation of why these support cases aren't a priority and how to build repro cases.

If this looks good, I plan to respond to anything that I can't reproduce in a few minutes with a link to this.

Test Plan: {F24759}

Reviewers: btrahan, chad

Reviewed By: chad

CC: vrana, aran

Differential Revision: https://secure.phabricator.com/D3981
2012-11-19 17:39:44 -08:00
Bob Trahan
b4758c765c fix feed story publishing for audit comments
Summary: we need to make sure we should publish to the auditor in a given audit request. write some custom logic for this as it is subtly different than other things like CC.

Test Plan: repro from T2087 produced expected results. further, former auditors who resigned did not get feed stories published.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2087

Differential Revision: https://secure.phabricator.com/D3987
2012-11-19 17:25:45 -08:00
Bob Trahan
1e743c9138 fix lightbox for when we have no $user or $request
Summary: defensive program wins all battles

Test Plan: lightbox still worked

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3975
2012-11-19 17:05:10 -08:00
Bob Trahan
1578986590 fix unit test data showing up in diff view
Summary: I am an idiot. :(  D3962 added the full set of properties and I derp'ed this part of the diff up

Test Plan: ask lesliepc16 to take a look

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: lesliepc16, aran, Korvin

Maniphest Tasks: T2091

Differential Revision: https://secure.phabricator.com/D3984
2012-11-19 14:52:01 -08:00
vrana
b29dfe436e Fix fatal in browse file if lintCommit is invalid
Test Plan: Set `lintCommit` to 'x' and browsed a file.

Reviewers: nh, epriestley

Reviewed By: nh

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3976
2012-11-19 12:06:58 -08:00
Espen Volden
874fb9b6d9 <LDAP: If available use DN from previously retrieved user>
Summary:
When searching for a user before logging in use the DN from the retrived user.
This allows you to use a less fine grained DN when searching for a user. For example dc=domain,dc=domain instead of ou=unit,dc=domain,dc=com.

Test Plan: Tested on local install with ldap.search-first disabled and enabled.

Reviewers: epriestley, yunake

Reviewed By: epriestley

CC: auduny, briancline, aran, Korvin, vsuba

Differential Revision: https://secure.phabricator.com/D3549
2012-11-17 04:47:17 -08:00
vrana
f47c0a3a06 Fix Diffusion lint counts under SVN
Summary: Also remove some columns.

Test Plan: Looked at SVN dir in Diffusion.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vsuba

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3949
2012-11-16 16:02:05 -08:00
vrana
ef8c43ac2a Simplify and optimize save_lint.php
Test Plan: Ran it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3933
2012-11-16 15:58:09 -08:00
Bob Trahan
5a58d168ed Differential - add unit and lint information to diff view
Summary:
see title. Note that fields that use customs storage don't work because I didn't think it made sense to load a revision object to get that data. Further, we don't have a revision id at some points, so its not clear what does / does not work...?

Also added a link to upsell this diff view as I had trouble finding it.

Test Plan: viewed some diffs

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: chad, aran, Korvin

Maniphest Tasks: T2026

Differential Revision: https://secure.phabricator.com/D3962
2012-11-16 11:48:17 -08:00
Chad Little
d4a022be6f Make default button text size 13px.
Summary: Makes buttons look 13px by default, 11 px small.

Test Plan: http://phab1.pushlabs.net/uiexample/view/PhabricatorButtonsExample/

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2078

Differential Revision: https://secure.phabricator.com/D3972
2012-11-16 11:19:12 -08:00
epriestley
ee2e85a0bb Fix several migration issues with the Task/Counter patch
Summary:
People hit three issues with D3914:

  - As per T2059, we applied a schema change from a `.php` patch, which currently does not work if you use a different user to make schema changes than for normal use.
    - Since the change in question is idempotent, just move it to a `.sql` patch. We'll follow up in T2059 and fix it properly.
  - Rogue daemons at several installs used old code (expecting autoincrement) to insert into the new table (no autoincrement), thereby creating tasks with ID 0.
    - Rename the table so they'll fail.
    - This also makes the code a little more consistent.
  - Some installs now have tasks with ID 0.
    - Use checks against null rather than against 0 so we can process these tasks.

The major issues this fixes are the schema upgrade failure in T2059, and the infinite loops in T2072 and elsewhere.

This isn't really a fully statisfactory fix. I'll discuss some next steps in T2072.

Test Plan: Created new tasks via MetaMTA/Differential. Ran tasks with `phd debug taskmaster`. Inserted a task 0 and verified it ran and archived correctly.

Reviewers: btrahan, vrana, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2072, T2059

Differential Revision: https://secure.phabricator.com/D3973
2012-11-16 10:19:22 -08:00
Bob Trahan
e40bcc8d2b update documentation for storage changes w/ .php files
Summary: no schema changes allowed in the .php files

Test Plan: viewed doc -- looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2059

Differential Revision: https://secure.phabricator.com/D3966
2012-11-16 07:22:31 -08:00
Bob Trahan
06384f5f87 fix mail handling error -- return empty array if we have no $addresses
Test Plan: pushing it live to test
2012-11-16 06:57:15 -08:00
Julius Seporaitis
2b00f5e8b6 Add support for S3 endpoint regions.
Summary:
Allows to use file storage in different Amazon S3 regions as well as it
should support different file storage services with S3 compliant API
(eg.: Bashos' Riak CS).

Test Plan:
1. Create S3 bucket in non-default AWS Region (e.g. EU/Ireland).
2. Set appropriate bucket policy to allow upload & download objects for the specified access credentials.
3. Set `amazon-s3.endpoint` in your configuration file to an appropriate value (e.g. `s3-eu-west-1.amazonaws.com` for EU region).

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3965
2012-11-16 04:08:14 -08:00
Ricky Elrod
bf4f74dbb3 Don't show deleted pages from the 'All Documents' panel.
Summary:
If a user is asking for a list of documents stored in Phriction, it's pretty
safe to assume that they mean documents that actually exist.

Test Plan:
Made a document, saw it listed in /phriction/list/all. Deleted it, and no longer
saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3951
2012-11-15 16:34:48 -08:00
Ricky Elrod
7fac80cb9a Don't show the delete button on a deleted document
Summary:
This doesn't actually contain any logic to prevent a user from deleting a
document twice, but it makes it significantly harder to do so.

Test Plan:
Went to edit a document, saw the delete button. Clicked it, then went back to
the edit view, and no longer saw the delete button.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3952
2012-11-15 15:56:34 -08:00
Nick Harper
90dedc16a0 Fix CSS for textareas in windows
Summary:
Windows browsers default to monospace textareas, which look bad. Let's
use the same font we're using everywhere else.

Test Plan:
load differential in firefox on windows and see that the comment box in
differential is no longer Courier New.

Reviewers: chad, epriestley

Reviewed By: epriestley

CC: btrahan, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3968
2012-11-15 15:18:59 -08:00
epriestley
39d476286f Minor, update Celerity map. 2012-11-15 14:27:50 -08:00
vrana
040fac06d4 Refactor freeform field specification
Summary:
I want to attach the task also to revision, not only to commit by mentioning it in summary.
This is a preparation for it, useful by itself:

* One query instead of N.
* Lower CRAP score, yay!

Refs T945.

Test Plan:
My Test Plan is really //plan// this time.
I want to update Phabricator in the minute when I commit this.

Reviewers: 20after4, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D3873
2012-11-13 11:41:15 -08:00
Bob Trahan
cd8a9c603e fix Maniphest search for null-like values edge case
Summary: wishlist has priority value of 0 which was messing things up. also fix search text so we can search for "0".

Test Plan: searched for stuff, got results

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1878

Differential Revision: https://secure.phabricator.com/D3948
2012-11-12 13:53:33 -08:00
Bob Trahan
f8737d15ca Differential - special-case "no reviewers" warning to show only for revions that need review
Summary: 'cuz who cares unless you need review?

Test Plan: noted the UI showed up appropriately to my new business logix

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2010

Differential Revision: https://secure.phabricator.com/D3958
2012-11-12 13:35:44 -08:00
Bob Trahan
3c11bf320f improve calendar status editing
Summary: make it so a given user can click to edit status from calendar view. also fix bug so when editing status existing "type" is selected

Test Plan: edited status from calendar view and observed "sporadic" status sticky

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2060, T2061

Differential Revision: https://secure.phabricator.com/D3957
2012-11-12 13:28:45 -08:00
Chad Little
7bdd0e7a3d More icons, black grey and white.
Summary: Added Celerity, Retina

Test Plan: Mostly Photoshop, need to test for realz.

Reviewers: epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Maniphest Tasks: T2013

Differential Revision: https://secure.phabricator.com/D3954
2012-11-12 13:20:15 -08:00
Chad Little
e529005004 Update icons for 14px and 28px transparent layout.
Summary: Used photoshop to produce 14 and 28 pixel icons.

Test Plan: View in photoshop, compress via ImageOptim

Reviewers: vrana, epriestley, btrahan

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3947
2012-11-09 16:13:41 -08:00
vrana
3017a1f077 Order Diffusion lint details 2012-11-09 15:40:18 -08:00
Bob Trahan
4a8ce1699b Create a "New Document" button in phriction
Summary: gives user a dialogue and they can fill out what comes after /w/

Test Plan: made some new wiki docs. played with garbage data and edit scenarios as well as vanilla create -- good ish

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1360

Differential Revision: https://secure.phabricator.com/D3946
2012-11-09 15:08:37 -08:00
Bob Trahan
8ee6cbe1d4 add "author" information to conduit call
Summary: 'cuz we need it in arcanist for T479 to commit as author

Test Plan: verified the return value was correct in conduit

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T479

Differential Revision: https://secure.phabricator.com/D3917
2012-11-09 13:33:58 -08:00
vrana
a316a0bbb3 Define DiffusionRequest::setPath()
Summary: Resolves T2056.

Test Plan: Browsed SVN repo.

Reviewers: epriestley

Reviewed By: epriestley

CC: ced, aran, Korvin

Maniphest Tasks: T2056

Differential Revision: https://secure.phabricator.com/D3943
2012-11-09 11:17:56 -08:00
vrana
4f65d4f344 Display list of lint problems in Diffusion
Test Plan:
/diffusion/ARC/lint/master/, saw links.
/diffusion/ARC/lint/master/?lint=SPELL0, saw two links.
/diffusion/ARC/lint/master/src/lint/linter/ArcanistFilenameLinter.php?lint=SPELL0, saw link.
Clicked on everything.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3931
2012-11-09 11:09:03 -08:00
vrana
1b70324815 Improve docs for changing schema
Test Plan:
  $ diviner .

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3937
2012-11-09 10:55:05 -08:00
epriestley
b942c35872 Minor, update Celerity map. 2012-11-09 10:04:57 -08:00
Chad Little
ead96f467b Rework buttons with new gradients, rounded corners.
Summary:
This adds a green/blue/grey gradient and new button CSS.

Updated.

Test Plan: Clicked through various pages in my install, but would like more feedback.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3919
2012-11-08 15:47:11 -08:00
vrana
726a4912bd Allow filtering by lint code in Diffusion
Test Plan:
/diffusion/ARC/lint/master/src/, clicked on count link.
/diffusion/ARC/browse/master/src/difference/?lint=XHP9, clicked on file name.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=, verified that all messages are displayed.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=XHP9.
/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php?lint=TXT3, verified that 0 messages are displayed.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3929
2012-11-08 15:44:37 -08:00
vrana
168bdaa872 Display lint overview in Diffusion
Summary: I will add links from /diffusion/ARC/lint/ in future diff.

Test Plan:
/diffusion/ - clicked on lint messages link.
/diffusion/ARC/ - clicked on lint messages link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3926
2012-11-08 15:41:54 -08:00
vrana
846a359d9a Display number of lint messages in Diffusion dir
Test Plan:
Went to https://secure.phabricator.com/diffusion/ARC/browse/.
Saw number of lint messages per dir, not terribly slow.
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/.
Saw number of lint messages per file.
Disabled lint, didn't see it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3921
2012-11-08 15:40:48 -08:00
vrana
47a184e2a5 Display saved lint messages in Diffusion browse file
Test Plan:
Looked at https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php.
Saw "Show 16 Lint Messages".
Clicked on it, saw the messages.
Clicked on "Hide Lint Messages".
Went to https://secure.phabricator.com/diffusion/ARC/browse/master/src/difference/ArcanistDiffUtils.php;5be54e.
Saw "Switch Commit to See Lint".
Clicked on it, saw the messages.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3920
2012-11-08 15:39:44 -08:00
vrana
23a046b3cd Allow saving lint errors to database
Summary: This saves lint errors to the path change of current commit. It requires pushed revision. It doesn't save difference from previous commit mentioned in T2038#comment-4 - I don't plan doing it after all, everything would be much more complicated and the amount of data saved with this approach isn't that bad.

Test Plan: Applied patch, ran script, verified DB.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2038

Differential Revision: https://secure.phabricator.com/D3899
2012-11-08 15:39:43 -08:00
vrana
d91305e518 Add external arrow to Search Owners
Test Plan: Displayed it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3930
2012-11-08 15:36:59 -08:00
vrana
2137b49d16 Link repo history from repo overview commits
Test Plan: Clicked on it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3928
2012-11-08 15:36:35 -08:00
Bob Trahan
bd1bc6d71a fix error where blank email addresses were sneaking in the stack
Summary: array_filter to the rescue

Test Plan: mostly lots of reasoning (as opposed to making a fake user with a blank email address to reproduce)

Reviewers: epriestley, chad

Reviewed By: chad

CC: aran, Korvin

Maniphest Tasks: T2052

Differential Revision: https://secure.phabricator.com/D3927
2012-11-08 12:21:50 -08:00
Chad Little
c5508c214e Merge branch 'master' of git://github.com/facebook/phabricator 2012-11-08 09:52:58 -08:00
epriestley
2e993f7561 Fix an issue where projects queried in "Any Projects" in Maniphest did not have their handles loaded
Summary:
See https://github.com/facebook/phabricator/issues/230.

If you searched for a project with the "Any Projects" field, we didn't explicitly include it in the list of handles to fetch. Usually this works fine because something else fetches the handle, but if you, e.g., search for a project that has no tasks, you get a fatal.

Test Plan:
Reproduced fatal described in report by performing a custom query for "Any Projects" using a project with no tasks; applied patch; query worked correctly.

Verified `$xproject_phids` and `$project_phids` are already queried.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3923
2012-11-08 09:05:38 -08:00
epriestley
c812d7d686 Add a simple button UIExample
Summary: For visualizing D3919.

Test Plan: {F22921}

Reviewers: chad, btrahan

Reviewed By: chad

CC: aran

Differential Revision: https://secure.phabricator.com/D3922
2012-11-08 08:22:08 -08:00
Bob Trahan
9966af50dd Delete PhabricatorRemarkupRuleProxyImage
Summary: don't need it now that uploading files is so easy. Plus it made for some buggy jonx if / when there were bad image links coupled with caching. In theory this is a lot less pretty though if folks linked to a bunch of files served elsewhere using images.

Test Plan: http://does-not-exist.com/imaginary.jpg rendered as a link!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2000

Differential Revision: https://secure.phabricator.com/D3908
2012-11-07 14:31:43 -08:00
Chad Little
26b7d57d7f Updates. 2012-11-07 13:49:15 -08:00
epriestley
7332599e03 Provide an IDS_COUNTER mechanism for ID assignment
Summary: See D3912 for discussion. InnoDB may reuse autoincrement IDs after restart; provide a way to avoid it.

Test Plan: Unit tests. Scheduled and executed tasks through `drydock lease --type host` and `phd debug taskmaster`.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3914
2012-11-07 13:33:07 -08:00
Bob Trahan
73bc34b26d Add support for differential field specifications to be indexed in search
Summary: ...and do so for a few fields -- summary, test plan, and revert plan.

Test Plan: added NATASHA and BULLWINKLE to summary and test plan of existing diff. Diff showed up in search!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T654

Differential Revision: https://secure.phabricator.com/D3915
2012-11-07 13:31:52 -08:00
Bob Trahan
e53ca45fd8 rebuild libary map 2012-11-06 15:43:44 -08:00
Bob Trahan
730cf80a36 Expose subscribers in search and some polish
Summary: was poking at T654 and noticed subscribers weren't exposed in search UI so I did so. Also make ponder a little less silly on the double handles load. Finally, stopped showing the "Examine Index" link to non admins since they can't click it. Note this introduces a UI oddity in that you Users and Phriction Documents don't currently have the subscribe functionality.

Test Plan: searched for subscribers in all applications - it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3907
2012-11-06 15:35:26 -08:00
Bob Trahan
fabf36a819 add arc unit data to table of contents in diff view
Summary: title

Test Plan: viewed a diff and verified nothing barfed.

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2026

Differential Revision: https://secure.phabricator.com/D3906
2012-11-06 15:33:56 -08:00
epriestley
c5e64166da Minor, older version of the linter went crazy. 2012-11-06 15:31:00 -08:00
epriestley
7e0ce08154 Make various Drydock CLI/Allocator improvements
Summary:
  - Remove EC2, RemoteHost, Application, etc., blueprints for now. They're very proof-of-concept and Blueprints are getting API changes I don't want to bother propagating for now. Leave the abstract base class and the LocalHost blueprint. I'll restore the more complicated ones once better foundations are in place.
  - Remove the Allocate controller from the web UI. The original vision here was that you'd manually allocate resources in some cases, but it no longer makes sense to do so as all allocations come from leases now. This simplifies allocations and makes the rule for when we can clean up resources clear-cut (if a resource has no more active leases, it can be cleaned up). Instead, we'll build resources like the localhost and remote hosts lazily, when leases come in for them.
  - Add some configuration to manage the localhost blueprint.
  - Refactor `canAllocateResources()` into `isEnabled()` (for config checks) and `canAllocateMoreResources()` (for quota checks, e.g. too many resources are allocated already).
  - Juggle some signatures to align better with a world where blueprints generally do allocate.
  - Add some more logging and error handling.
  - Fix an issue with log ordering.

Test Plan: Allocated some localhost leases.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3902
2012-11-06 15:30:11 -08:00
epriestley
0e774dac93 Make minor improvements to Drydock web interface
Summary: Consolidate some code and start on lease detail pages.

Test Plan: {F22783}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3901
2012-11-06 15:28:33 -08:00
vrana
19c840edf2 Better explain 'h' keyboard shortcut in Differential
Summary: Also move 'f' outside this group of commands.

Test Plan: Pressed '?'.

Reviewers: epriestley, alanh, frantic

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3903
2012-11-06 11:50:31 -08:00
vrana
10cf2bb4e2 Mark PhabricatorRepositorySvnCommitChangeParserWorker as final
Test Plan:
  $ git grep PhabricatorRepositorySvnCommitChangeParserWorker

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3897
2012-11-05 23:27:40 -08:00
Bob Trahan
5b1d73e5dd make remarkup savvier about fragments in phriction links
Summary:
use PhutilURI class to get the slug and the fragment, normalize the slug, and then glue it back together with another PhutilURI

fixes https://github.com/facebook/phabricator/issues/228

Test Plan: had a few links like [[ example/doc#title | wiki fun ]] and verified links generated were correct

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3894
2012-11-05 15:47:51 -08:00
Bob Trahan
4d79d462fb make is to when a user resigns from an audit they are no longer cc'd
Summary: do this by making sure to filter out those who've "resigned" from the email CC list

Test Plan: resigned from an audit and no longer got emails on updates

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2033

Differential Revision: https://secure.phabricator.com/D3890
2012-11-05 11:18:32 -08:00
vrana
ef85f49adc Delete license headers from files
Summary:
This commit doesn't change license of any file. It just makes the license implicit (inherited from LICENSE file in the root directory).

We are removing the headers for these reasons:

- It wastes space in editors, less code is visible in editor upon opening a file.
- It brings noise to diff of the first change of any file every year.
- It confuses Git file copy detection when creating small files.
- We don't have an explicit license header in other files (JS, CSS, images, documentation).
- Using license header in every file is not obligatory: http://www.apache.org/dev/apply-license.html#new.

This change is approved by Alma Chao (Lead Open Source and IP Counsel at Facebook).

Test Plan: Verified that the license survived only in LICENSE file and that it didn't modify externals.

Reviewers: epriestley, davidrecordon

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2035

Differential Revision: https://secure.phabricator.com/D3886
2012-11-05 11:16:51 -08:00
20after4
d7f6bd42d6 Use getProductionURI instead of getURI for emails.
Summary: 'TASK DETAIL' links point to the non-production uri.  Our daemons run in an environment that uses different baseUrl because we can't use https locally (https is provided by our load balancers)

Test Plan: check emails generated with a non-production environment. See that the TASK DETAIL link points to production url.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3877
2012-11-02 13:43:38 -07:00
Bob Trahan
041040c422 post feed stories to arbitrary uris via a new Worker
Summary: so folks can write applications and whatnot.

Test Plan: set feed.http-hooks to local dev instance (200) and localhost (500) in my conf. Verified succcess and retrying respectively.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T305

Differential Revision: https://secure.phabricator.com/D3874
2012-11-02 13:34:18 -07:00
vrana
f34246a723 Hide Edit Maniphest Tasks in commit with disabled Maniphest
Test Plan: Viewed commit with enabled/disabled Maniphest.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3871
2012-11-01 17:38:26 -07:00
epriestley
89b37f0357 Make various Drydock improvements
Summary:
Tightens up a bunch of stuff:

  - In `drydock lease`, pull and print logs so the user can see what's happening.
  - Remove `DrydockAllocator`, which was a dumb class that did nothing. Move the tiny amount of logic it held directly to `DrydockLease`.
  - Move `resourceType` from worker task metadata directly to `DrydockLease`. Other things (like the web UI) can be more informative with this information available.
  - Pass leases to `allocateResource()`. We always allocate in response to a lease activation request, and the lease often has vital information. This also allows us to associate logs with leases correctly.

Test Plan: Ran `drydock lease --type host` and saw it perform a host allocation in EC2.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3870
2012-11-01 16:53:17 -07:00
epriestley
3844be3f83 Minor, fix an MTA issue introduced in D3859.
Prior to D3859, getRequiredLeaseTime() was called before doWork(), which had the critical but subtle side effect of populating `$this->message`. Instead, make the population explicit. This restores email functionality.

Test Plan: ran `phd debug taskmaster` and verified email was delivered

Auditors: btrahan
2012-11-01 16:38:47 -07:00
epriestley
07dc943215 Modernize the drydock script
Summary: Add a bin/drydock symlink and break it into workflows. Nothing too special here.

Test Plan: Ran `bin/drydock wait-for-lease`, `bin/drydock lease`, `bin/drydock help`, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3867
2012-11-01 15:30:14 -07:00
Bob Trahan
afae26ad94 robustify Differential and Maniphest mailhandlers wrt attachments
Summary:
a few things

- make the parent mailhandler class not send "blank body" error if you have attachments
- make both differential and maniphest append a list of attachments to the body if any exist
- BONUS - made the cc stuff work in Maniphest

Test Plan: I haven't actually tested this yet. :(  i need to figure out how to send a mail with an attachment from the command-line and figured I'd serve this up first.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2012

Differential Revision: https://secure.phabricator.com/D3868
2012-11-01 15:18:06 -07:00
Bob Trahan
e0b9a63388 make Differential comment panel flexible width and nip a bit at other flexible width issues
Summary:
all sorts of stuff

 - made comment form width flexible
 - made margins element specific rather than part of differential-primary-pane
 - made box elements all veritically align left and right until code stuff
 - re-factored width calculaton stuff a bunch so only the code section has to suffer from max-width calculations; everything else can flex
 - made colspan 3 for rightmost table header element. this is so the "View Options" UI element ends up lining up correctly with the "Show All Lines" element just below

Test Plan: looked at revision view and changeset view and it all looked hot. note I did not test what things looked like with different word wrap values; that should still work given the re-factoring and not re-design here. also toggled haunted panel mode and it looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2006

Differential Revision: https://secure.phabricator.com/D3866
2012-11-01 13:30:37 -07:00
epriestley
0364ccdd5f Fix an issue where PhabricatorWorkerLeaseQuery may lease different tasks than it selects
Summary:
We lock tasks by setting `leaseOwner` to a unique value, but the value is currently unique-to-the-process rather than unique-to-the-query. This means that if a process leases a task, then leases another task, both tasks will have the same `leaseOwner`. This can cause an issue where we go to select the task we just leased and get the other task instead, if we aren't careful about the select construction.

We can avoid this by being clever and making sure the select is constructed correctly, but making the `leaseOwner` unique to the query is much simpler and more foolproof. This guarantees we always select only the rows we just leased.

Also remove `PhabricatorGoodForNothingWorker` since `PhabricatorTestWorker` fills its role of allowing things to be tested, and simplify the unit tests since we don't need to be clever about avoiding this issue any more.

Test Plan: Ran unit tests.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3862
2012-11-01 11:30:49 -07:00
epriestley
f0fdcf1a51 Undumb the Drydock resource allocator pipeline
Summary:
This was the major goal of D3859/D3855, and to a lesser degree D3854/D3852.

As Drydock is allocating a resource, it may need to allocate other resources first. For example, if it's allocating a working copy, it may need to allocate a host first.

Currently, we have the process basically queue up the allocation (insert a task into the queue) and sleep() until it finishes. This is problematic for a bunch of reasons, but the major one is that if allocation takes more resources (host, port, machine, DNS) than you have daemons, they could all end up sleeping and waiting for some other daemon to do their work. This is really stupid. Even if you only take up some of them, you're spending slots sleeping when you could be doing useful work.

To partially get around this and make the CLI experience less dumb, there's this goofy `synchronous` flag that gets passed around everywhere and pushes the workflow through a pile of special cases. Basically the `synchronous` flag causes us to do everything in-process. But this is dumb too because we'd rather do things in parallel if we can, and we have to have a lot of special case code to make it work at all.

Get rid of all of this. Instead of sleep()ing, try to work on the tasks that need to be worked on. If another daemon grabbed them already that's fine, but in the worst case we just gracefully degrade and do everything in process. So we get the best of both worlds: if we have parallelizable tasks and free daemons, things will execute in parallel. If we have nonparallelizable tasks or no free daemons, things will execute in process.

Test Plan: Ran `drydock_control.php --trace` and saw it perform cascading allocations without sleeping or special casing.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3861
2012-11-01 11:30:42 -07:00
epriestley
84ee4cd9f6 Factor out task execution and formalize permanent failures
Summary:
  - Clean up a TODO about permanent failures.
  - Clean up a TODO about failing tasks after too many retries.
  - Clean up a TODO about testing for bad leases.
  - Make the lease/retry implementation more flexible and natural.
  - Make completely bogus tasks fail permanently.
  - Make PhabricatorMetaMTAWorker use new `getWaitBeforeRetry()` (as intended), not hackily implement logic in `getRequiredLeaseTime()`.
  - Document worker hooks for failures and retries.
  - Provide coverage on everything.

Test Plan: Ran unit tests. Ran `bin/phd debug taskmaster`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3859
2012-11-01 11:30:23 -07:00
epriestley
88fad90c1c Move task leasing to a dedicated query
Summary: This simplifies the fairly thorny logic of leasing tasks a bit. I'm planning to introduce another callsite shortly for Drydock.

Test Plan: Ran `bin/phd debug taskmaster`, observed sensible queries and correct operation.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3855
2012-11-01 11:30:16 -07:00
Bob Trahan
a977b49e33 add ids and phids to maniphest.query
Summary: requires add withTaskPHIDs to maniphest query class.

Test Plan: queried via conduit by task id and task phid -- respective success!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T2017

Differential Revision: https://secure.phabricator.com/D3863
2012-11-01 10:47:45 -07:00
Edward Speyer
fe8351c930 Delete stale fixtures with bin/storage destroy
Summary:
When a PhabricatorTestCase dies after creating storage fixtures, it leaves
those storage fixtures around.  This doesn't happen often, but when it does
happen it's a pain to cleanup.  The --unittest-fixtures option helps automate
that cleanup.

Test Plan:
Ran it with --dryrun, then for real.  Became overwhelmed with a Zen like peace
after regarding the tidiness and beauty of SHOW DATABASES.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3858
2012-10-31 18:36:38 -07:00
Bob Trahan
ae616e82d3 add a few more email preferences for differential and maniphest
Summary: this makes notifications work better for folks who choose to handle things in Phabricator and not over email

Test Plan: had my test account and "real" account battle each other on a few tasks and divs. Noted that I received emails appropos to the respective settings.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1977

Differential Revision: https://secure.phabricator.com/D3856
2012-10-31 17:11:04 -07:00
epriestley
fe329b9738 Modernize worker task detail view
Summary: Make mobile-friendly and provide UI to cancel/retry tasks. Remove display of task data to arbitrary users, as it may be sensitive.

Test Plan:
{F22502}
{F22503}
{F22504}
{F22505}
{F22506}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3854
2012-10-31 15:22:32 -07:00
epriestley
5903ed650c Move completed tasks to an "archive" table and delete them in the GC
Summary:
Currently, when taskmasters complete a task it is immediately deleted. This prevents us from doing some general things, like:

  - Supporting the idea of permanent failure (e.g., after N failures just stop trying).
  - Showing the user how fast taskmasters are completing tasks.
  - Showing the user how long tasks took to complete.

Having better visibility into this is important to Drydock, which builds on the task system. Also, generally buff debug output for task execution.

Test Plan: Ran `bin/phd debug taskmaster`. Ran `bin/phd debug garbage`. Queued some tasks via various systems.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T2015

Differential Revision: https://secure.phabricator.com/D3852
2012-10-31 15:22:16 -07:00
Bob Trahan
4edf8ae2fc make "browse in diffusion" action work for commits in branches other than master
Summary: we do this by passing the "seenOnBranches" commit data detail through the stack

Test Plan: browse in diffusion link worked for non-master checkins under git

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1949

Differential Revision: https://secure.phabricator.com/D3853
2012-10-31 14:07:25 -07:00
epriestley
6c36efed72 Minor, update celerity map. 2012-10-31 12:25:53 -07:00
epriestley
8e65a04d98 Add "download" icon to action list view icon list
Summary: See D3849.

Test Plan: {F22492}

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1997

Differential Revision: https://secure.phabricator.com/D3850
2012-10-31 12:12:03 -07:00
Bob Trahan
9f51f1933f Bug fix for diffusion browse views for images and binary files
Summary: D3499 introduced some new hotness but broke these less common cases. add slightly updated ui for this.  Note we need a 'download' icon for this UI to not be horrendous.

Test Plan: viewed a binary file and an image in diffusion browse view

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1997

Differential Revision: https://secure.phabricator.com/D3849
2012-10-31 11:43:17 -07:00
epriestley
a7da4fad88 Add Drydock Application
Summary: Add an Application class for Drydock and move routing rules there.

Test Plan: Looked at /applications/, clicked around drydock.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3847
2012-10-31 09:57:57 -07:00
epriestley
1154447d06 Add PhabricatorFileQuery
Summary: This doesn't do anything useful yet but Pholio needs to access Files and I wanted to get the groundwork in place for eventual policy-awareness.

Test Plan: Will use in Pholio.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3829
2012-10-31 09:57:46 -07:00
epriestley
7b3f7ea8f7 Don't send the address verification email "From" the user in question
Summary: Sending these as the user doesn't make a ton of sense, and LLVM reports some issues with these emails getting caught in spam filters. Users expect these emails, so just send them from "noreply@example.com" or whatever is configured.

Test Plan: Sent myself a verification email, verified it came from a noreply@ address.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: klimek, aran

Maniphest Tasks: T1994

Differential Revision: https://secure.phabricator.com/D3843
2012-10-31 09:57:40 -07:00
Bob Trahan
7c99d52548 filter_phids => filterPHIDs
Summary: typo of sorts. should probably be philterPHIDs. :P

Test Plan: verified i spelled "filterPHIDs" correctly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1993

Differential Revision: https://secure.phabricator.com/D3846
2012-10-30 18:21:35 -07:00
Ricky Elrod
bf3f091896 Remove an erroneous 'd'
Reviewed by: epriestley
2012-10-29 16:30:56 -07:00
vrana
3688ac7479 Fix caching for synthetic inline comments
Test Plan: Looked at diff with several different lint errors, saw correct messages in their inline comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3827
2012-10-29 09:38:37 -07:00
epriestley
1163598acd Provide some guidance on creating backups
Summary: A user asked for some instructions, so I wrote up some documentation.

Test Plan: Read document. This is more or less how secure.phabricator.com backups work and the one time we had a data loss issue restoration worked reasonably well.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3825
2012-10-26 12:01:58 -07:00
Bob Trahan
5d5f8a7a91 whoops - forgot to remove the third slash on this comment from D3822 2012-10-25 16:38:14 -07:00
epriestley
846f01e221 Correct self-review check in Differential
Summary: This check is currently wrong -- the actor is only //coincidentally// the owner (and only most of the time). It also raises at parse time, preventing any user from parsing a message with their own name in the "Reviewers" field. Instead, check against the right owner PHID and raise it only if a revision is available. See https://github.com/facebook/arcanist/issues/54 and next diff.

Test Plan: Tried to add myself as a reviewer to revisions I own via web and Conduit, got rejected. Parsed a message with myself in the "Reviewers:" field, it worked correctly.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3820
2012-10-25 16:27:49 -07:00
Bob Trahan
731a6900bd upgrade repository delete function to full-blown workflow
Summary: fancy title. really just make the delete() method aware of related objects and build a quick workflow which calls delete(). also make commit delete savvy about audit requests.

Test Plan: deleted a repository per the instructions given to me in the web UI

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1416, T1958, T1372

Differential Revision: https://secure.phabricator.com/D3822
2012-10-25 16:23:41 -07:00
epriestley
da7940b0a8 Minor, fix a typo: "beteeen" -> "between"
Auditors: vrana
2012-10-25 11:49:03 -07:00
epriestley
5d1bd51627 Add a script to migrate files between storage engines
Summary: Quora requested this (moving to S3) but it's also clearly a good idea.

Test Plan:
Ran with various valid/invalid options to test options. Error/sanity checking seemed OK.

Migrated individual local files.

Migrated all my local files back and forth between engines several times.

Uploaded some new files.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1950

Differential Revision: https://secure.phabricator.com/D3808
2012-10-25 11:36:38 -07:00
vrana
92a2866fb2 Increase double click target in blame
Summary:
I need to select author or revision quite often.
It's currently almost impossible because double click opens the link and drag-and-dropping tries to move the link.

Test Plan: Double clicked in blame.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3816
2012-10-24 15:42:08 -07:00
Jakub Vrana
d506ffbd30 Add regression test for LiskDAO::__call()
Summary: D3606

Test Plan: Deleted `call()`, ran the test.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3814
2012-10-24 14:00:43 -07:00
Jakub Vrana
01de3dff81 Allow using StorageFixtureScopeGuard on Windows 2012-10-24 13:59:22 -07:00
Bob Trahan
60466d3bcc Create a status tool by giving /calendar/ some teeth
Summary: you can now add, edit, and delete status events. also added a "description" to status events and surface it in the big calendar view on mouse hover. some refactoring changes as well to make validation logic centralized within the storage class.

Test Plan: added, edited, deleted. yay.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T407

Differential Revision: https://secure.phabricator.com/D3810
2012-10-24 13:22:24 -07:00
epriestley
244b1302a0 Implement PhabricatorMarkupInterface in Diffusion/Audit comments
Summary: Followup to D3804. Makes Diffusion main comments (not just inlines) render properly with the modern markup pipeline.

Test Plan: Created previews and inline previews. Edited inlines. Saved comment, viewed comment. Verified caches were read and written using "Services" tab.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3805
2012-10-23 17:46:44 -07:00
epriestley
ddb1f181c1 Simplify lightboxing and fix a few things
Summary:
Minor tweaks to lightboxes.

  - With "position: fixed;", we don't need to do any of the scroll/resize stuff. Just remove it.
  - Make the lightbox go over the menu bar -- was it intentional that it wasn't?
  - Make 'jx-mask' use "position: fixed;" too.
  - Add a loading indicator.
  - In Differential/Maniphest/etc, a preview may bring in an image but won't bring in the CSS we need. The "real" fix is to ship CSS/JS with ajax, but that's really hard -- fake it by pulling in the right CSS any time we render a remarkup area.

I'm going to do a couple of other tweaks here but need to update JX.Mask.

Test Plan: Verified behavior is reasonable in Safari, Firefox, Chrome with multiple images / scroll / previews / resize.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3795
2012-10-23 17:34:43 -07:00
epriestley
fdf90b46eb Use modern two-stage markup cache (PhabricatorMarkupInterface) in Differential
Summary:
See T1963 for discussion of the Facebook-specific hack.

Differential currently uses a one-stage cache (render -> postprocess -> save in cache) rather than the two-stage cache (render -> save in cache -> postprocess) offered by `PhabricatorMarkupInteface`. This breaks Differential comments coming out of cache for the lightbox, and makes various other things suboptimal (status of handles like @mentions and embeds are not displayed accurately).

Instead, use the modern stuff.

Test Plan:
  - Created preview comments and inlines in Differential.
  - Edited a Differential inline.
  - Submitted main and inline Differential comments.
  - Viewed and edited Differential summary and test plan.
  - Created preview comments and inlines in Diffusion.
  - Submitted comments and inlines in Diffusion.
  - Verified Differential now loads and saves to the generalized markup cache (Diffusion is close, but main comments still hold a single-stage cache).
  - Verified old Differential comments work correctly with the lightbox.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1963

Differential Revision: https://secure.phabricator.com/D3804
2012-10-23 17:33:58 -07:00
epriestley
9dd9189283 Minor, move dialogs above masks. 2012-10-23 12:07:08 -07:00
epriestley
7749c5abf3 Mark notifications as read in Differential if we also sent an email
Summary: See D3789. Same thing for Differential.

Test Plan: Created a new revision and made a comment. Verified reviewer got popup notifications but the in-app notifications were delivered already marked as read.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3790
2012-10-23 12:03:11 -07:00
epriestley
6b39af4022 Mark Maniphest notifications read if we send the user an email
Summary:
See D3784, T1403. When we send a user an email and a notification from Maniphest, mark the notification as read.

(It would be nice to do the thing with `multiplexMail()` a little less hackily, but it gets very complicated to do correctly because we require handles but sometimes do not have an actor/user so I'm punting for now.)

Test Plan: Acted on a task, verified notification was marked read because I received an email.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3789
2012-10-23 12:02:40 -07:00
epriestley
696a1b22ba Make feed stories properly respect object policies
Summary:
  - When a feed story's primary object is a Policy object, use its visibility policy to control story visibility. Leave an exception for
  - Augment PhabricatorPolicyAwareQuery so queries may do pre-policy filtering without the need to handle their own buffering/cursor code. (We could slightly improve this: if a query returns less than a page of pre-filtered results we could keep getting pre-filtered results until we had at least a page's worth and then filter them all at once.)
  - Load and attach "required objects" to feed stories. We need this for policies anyway, and it will let us simplify story implementations by sourcing data directly from the object when we don't have some need to denormalize it (e.g., "title was changed from X to Y" needs to save the values of X and Y from when we published the story, but "user asked question X" can reflect the current version of the question).

Test Plan: Loaded main feed, project feed, notification menu / dropdown, notificaiton list, paginated things.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3783
2012-10-23 12:01:59 -07:00
epriestley
951864d388 Allow notifications to be published as read if the user also is getting an email
Summary: See discussion in T1403. Possibly we'll add a preference for this or something?

Test Plan: Not yet in use. See future diff.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3784
2012-10-23 12:01:40 -07:00
epriestley
51c4b199d0 Allow policy-aware queries to prefilter results
Summary:
Provides a simple way for policy-aware queries to pre-filter results without needing to maintain separate cursors, and fixes a bunch of filter-related edge cases.

  - For reverse-paged cursor queries, we previously reversed each individual set of results. If the final result set is built out of multiple pages, it's in the wrong order overall, with each page in the correct order in sequence. Instead, reverse everything at the end. This also simplifies construction of queries.
  - `AphrontCursorPagerView` would always render a "<< First" link when paging backward, even if we were on the first page of results.
  - Add a filtering hook to let queries perform in-application pre-policy filtering as simply as possible (i.e., without maintaing their own cursors over the result sets).

Test Plan: Made feed randomly prefilter half the results, and paged forward and backward. Observed correct result ordering, pagination, and next/previous links.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3787
2012-10-23 12:01:11 -07:00
epriestley
0b9101f3c5 Make lightbox close when the background is clicked
Summary: When you click the dark background, close the lightbox.

Test Plan: Clicked arrows, image, etc., to make sure it didn't close. Clicked background to close.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3801
2012-10-23 12:00:45 -07:00
epriestley
4596e3876b Improve scrolling behavior for lightboxes in Safari
Summary: Our "html { overflow-y: scroll; }" makes Safari flip out when we put "hidden" on body. Instead, put the scroll on `body` and then replace it with `hidden` when the lightbox is visible.

Test Plan: In Safari, the body scrollbar vanishes when the lightbox is active and scrolling no longer causes spasms.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3800
2012-10-23 12:00:37 -07:00
epriestley
70dc3f5004 Show all available action list icons in UIExamples
Summary:
Make the example page a little more useful by showing available icons.

Also replace the "new" image, it had a little arrow which I thought was a "+". Use the one with a "+".

Test Plan: {F21966}

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3794
2012-10-23 12:00:28 -07:00
epriestley
0c48c1f487 Make date control include times
Summary:
See discussion in T404. Basically, the problem with date-only controls is that they may behave unpredictably in the presence of timezones. When you say "This needs to be done by Oct 23", you probably mean "Oct 23 5PM PST" or something like that, but someone in China may see the "Oct 24" and hit the deadline in good faith but be 10 hours too late. T404 has more discussion and examples. There are ways to fake this, but they get more complicated if the guy in China needs to move the date forward 24 hours.

I think the best solution to this is to not have date-only controls, and always display the time. This makes it absolutley unambiguous what something means, because the guy in the US will set "Oct 23 5PM" and the guy in China will see that accurately in local time.

The downside is that it's slightly more visual clutter and work for the user to specify things precisely, but I added some hints (start/end of day, start/end of business) that will hopefully let us pick the right default in most cases.

Test Plan:
Set some dates.

{F21956}

This has a couple of edge case issues on resize and some not-so-edge-case issues on mobile, but should be good to build T407 on without API changes.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T404, T407

Differential Revision: https://secure.phabricator.com/D3793
2012-10-23 12:00:20 -07:00
epriestley
e0cc277d5f Fix mask positioning and use mask classes in lightbox
Summary: See D3795 / D3797. Also made the mask darker.

Test Plan: Mask now sizes properly on window resize in all browsers / mask uses.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3798
2012-10-23 11:39:33 -07:00
epriestley
1a8232f4c9 Fix an issue where excluded recipients are not respected
Summary: I broke this in D3778. We modify `$parameters` and then ignore it in favor of `$params` for the rest of the method. Unit tests work great since they're one level below this.

Test Plan: Verified "Send email about my own actions" behaved correctly.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3796
2012-10-23 10:48:03 -07:00
Bob Trahan
3ffc764141 Introduce lightbox view for images
Summary:
images attached to maniphest tasks and mentioned in remarkup anywhere now invoke a lightbox control that lets the user page through all the images.

lightbox includes a download button, next / prev buttons, and if we're not at the tippy toppy of hte page an "X" or close button.

we also respond to left, right, and esc for navigating.

next time we should get non-images working in here...!

Test Plan:
played with maniphest - looks good
made comments with images. looks good.
made sure multiple image comments worked.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, chad

Maniphest Tasks: T1896

Differential Revision: https://secure.phabricator.com/D3705
2012-10-22 19:06:56 -07:00
epriestley
31ac1cbf6e Prevent typos in feed publishing
Summary: See D3789. Moving away from constants means less safety; provide a runtime check at least.

Test Plan: Took some actions which caused feed stories to publish, verified they showed up.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3792
2012-10-22 17:18:15 -07:00
epriestley
90ccfe4da1 Clean up and expose filtered recipient lists for PhabricatorMetaMTAMail
Summary: Provide a public interface to get all the filtered recipients of an email. The intent is to pass this along to Notifications so it can mark notifications as read if the user is also receiving an email, possibly based on some preference (see T1403). This also simplifies the enormous sendNow() method a little bit.

Test Plan: Added unit tests, and sent a few mails that should cover most/all of these cases. They appeared to produce the correct recipients.

Reviewers: btrahan, vrana, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1403

Differential Revision: https://secure.phabricator.com/D3778
2012-10-22 16:25:43 -07:00
epriestley
c679b78270 Fix some Editor issues
Summary: The property is called 'actor', not 'user'. Extend from Phobject to catch this class of error automatically. Upgrade a couple of getActor() to requireActor().

Test Plan: Created new users.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3776
2012-10-22 16:25:31 -07:00
epriestley
cef6605b75 Add a generateNewTestUser() method to PhabricatorTestCase
Summary: I need this shortly and it seems like something we're likely to need more of in the future now that fixtures work.

Test Plan: Ran unit tests. Used this productively in an upcoming diff.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3775
2012-10-22 16:25:00 -07:00
epriestley
c0b9b6db54 Don't count "\r" or "\n" for purposes of linewrapping text in Differential
Summary: This should all go away at some point when we move to fluid layout, but don't be more annoying than necessary in the meantime.

Test Plan: Meta.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3788
2012-10-22 16:24:22 -07:00
vrana
89b9d56cbe Unlink Q1 - Q4
Summary:
Q1 to Q4 is used for parts of the year.

Also unlink all `[A-Z]0.*`, we don't route them anymore.

Test Plan:
Q0
Q1
Q10

Reviewers: epriestley, pieter

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3781
2012-10-22 13:00:16 -07:00
epriestley
c24f4411c1 Fix a string in PhabricatorObjectHandleData
Summary: This got copy/pasted at some point long in the past, it should clearly read "Task".

Test Plan: Looked at the rest of the strings.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3774
2012-10-22 11:31:37 -07:00
epriestley
e2c303c1af Add a post_max_size exception for drag and drop uploads
Summary: See comments.

Test Plan: Uploaded a small image in Safari via drag-and-drop.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3771
2012-10-22 10:54:23 -07:00
epriestley
680076497c Add setup check to detect attempts to install on a path
Summary:
We don't support this and say so in the documentation, but can check explicitly.

https://github.com/facebook/phabricator/issues/148

Test Plan: Set base-uri to stuff with/without paths, verified setup caught mistakes and gave useful errors.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3768
2012-10-22 10:51:16 -07:00
epriestley
38c83ef846 Defuse a "Host:" header attack
Summary:
Django released a security update recently dealing with malicious "Host" headers:

https://www.djangoproject.com/weblog/2012/oct/17/security/

We're vulnerable to the same attack. Plug the hole.

The risk here is that an attacker does something like this:

  # Register "evil.com".
  # Point it at secure.phabricator.com in DNS.
  # Send a legitimate user a link to "secure.phabricator.com:ignored@evil.com".
  # They login and get cookies. Normally Phabricator refuses to set cookies on domains it does not recognize.
  # The attacker now points "evil.com" at his own servers and reads the auth cookies on the next request.

Test Plan: Unit tests.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3766
2012-10-22 10:49:06 -07:00
epriestley
96b5d0e74a Generate Releeph GLYPHICON
Summary: Generate a gunsights stylesheet entry for use in Releeph.

Test Plan: None!

Reviewers: edward

Reviewed By: edward

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3773
2012-10-21 15:56:17 -07:00
epriestley
a3ffab6205 Use JX.Request.setRawData()
Summary:
See D3727.

@paulshen, these are the only callsites we have in Phabricator so we can remove `setFile()` once it's clear on the Facebook side.

Test Plan: Uploaded a file with drag and drop.

Reviewers: paulshen, vrana, mnml0

Reviewed By: mnml0

CC: aran

Differential Revision: https://secure.phabricator.com/D3769
2012-10-20 10:53:51 -07:00
vrana
b97cfed23a Pass key to aggregate exception
Summary: This information may be quite useful.

Test Plan: Uploaded file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3763
2012-10-20 07:33:42 -07:00
epriestley
67498f3334 Restore phutil_split_lines() to Differential
Summary:
Same as D3759 with a fix:

Previously, we would insert `null` to indicate a line that doesn't exist on one side of a diff, and then implode on "\n", so we'd get "\n" as a result.

In D3759, we'd insert `null` but implode on empty string, and get nothing as a result.

When a placeholder null is present, explicitly insert a newline.

Test Plan: D3759 plus examined a diff with removed lines on the left side prior to new lines on the right side.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3765
2012-10-20 07:24:27 -07:00
epriestley
468aeaef0d Revert "Use phutil_split_lines() in Differential"
This reverts commit f6cb51562e.

This has some bugs in normal diffs that I haven't immediately been able to figure out. I'll reapply it once I sort them out.

Auditors: vrana
2012-10-20 06:42:08 -07:00
epriestley
f6cb51562e Use phutil_split_lines() in Differential
Summary:
  - We currently treat "\r" as a newline, but should not because VCSes do not.
  - We get an extra empty line at the end of diffs created after D3442 because we now retain newlines.
  - Historically we've converted tab pre-cache, but do it post-cache instead so we can add prefs about it, as we should handle it better than we do (e.g., let the user set it to a different width, infer width from comments in the file, expand it to actual tab stops, or show it visually in some way).

Test Plan:
  - Verified diffs no longer have an empty line at the end.
  - Created a diff of a "\r" file and verified it displayed somewhat reasonably. All browsers treat "\r" as a real newline so it's not necessarily perfect, but we can clean that up later. Hopefully these files are exceedingly rare.
  - Created a file with tabs and verified it came out reasonably.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1857

Differential Revision: https://secure.phabricator.com/D3759
2012-10-20 06:13:24 -07:00
vrana
fd87a88d71 Fix static variable usage in Lisk
Summary:
See comment.
This can reveal some pretty bad bugs but HPHP handles this correctly so we already know about them.

Test Plan:
Added `phlog()` to `__call()` and observed what is defined for each method (under PHP). Also:

  class C {
    function __call($name, $args) {
      static $class;
      if (!$class) {
        $class = get_class($this);
      }
      return $class;
    }
  }

  class D extends C {
  }

  class E extends C {
  }

  $d = new D;
  $e = new E;
  var_dump($d->x());
  var_dump($e->x()); // Prints D under PHP!

See also D3754.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1261

Differential Revision: https://secure.phabricator.com/D3753
2012-10-20 05:04:38 -07:00
vrana
7b0c608df8 Fix symbol search in typeahead
Test Plan: Inputted 'Mac' to search field.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3754
2012-10-20 05:03:41 -07:00
epriestley
3a8be549d6 Don't choke on copy-pasted diffs which include commit messages
Summary: If you `git show` and copy/paste it into Differential, we die trying to save the DifferentialChangeset corresponding to the commit message (error: column "filename" can not be null). Instead, drop the message change for raw diffs.

Test Plan: Copy/pasted `git show` into Differential.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3740
2012-10-19 10:29:19 -07:00
vrana
e14930f860 Provide assist for Remarkup table
Summary: Can you please pick up the icon for it and regenerate sprites?

Test Plan:
Selected text, clicked on it.
Unselected text, clicked on it.

Reviewers: epriestley, chad

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3730
2012-10-17 18:15:29 -07:00
epriestley
2f64a01579 Add table icon to remarkup spritesheet
Summary: See D3730.

Test Plan: Looked at sprite.

Reviewers: vrana

Reviewed By: vrana

CC: chad, aran

Differential Revision: https://secure.phabricator.com/D3731
2012-10-17 18:10:38 -07:00
vrana
86063d3fa7 Don't hide filename in filetree on hover
Summary:
It currently looks like this:

{F21417, size=full}

Test Plan: Hovered file name in filetree.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3729
2012-10-17 17:35:47 -07:00
epriestley
09151b509e Raise a better error for trying to create an empty document in Phriction
Summary:
When you delete the content of a document in Phriction, we treat it as an attempt to delete the document.

In the case you're creating the document, we hit an exception trying to delete a document which doesn't exist yet.

Detect this case and raise a better error.

Test Plan: Tried to create an empty document, got a good error. Created a nonempty document. Edited a document to empty to delete it.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1920

Differential Revision: https://secure.phabricator.com/D3728
2012-10-17 15:13:03 -07:00
vrana
251446b928 Support simple table Remarkup in Phabricator
Summary: {F21402}

Test Plan: Generated docs, used it in comment.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3726
2012-10-17 14:18:38 -07:00
epriestley
679f530054 Respect phriction.enabled in config
Summary: Eventually we'll have a real "uninstall" sort of thing, but until we do we should keep respecting this flag.

Test Plan: Disabled the flag, saw Phriction vanish from the application list.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3724
2012-10-17 09:12:08 -07:00
epriestley
26f7425ee2 Allow blog resources to be served without Celerity
Summary:
Allow skins to serve arbitrary resources without needing to be mapped, so we can have a vibrant community of amateur skinners.

For "basic" skins, just put all the "css/" on the page always.

Includes an image to prove that works.

@vrana, pretty sure this has no impact outside of Phame but it does change Celerity so it might be to blame if there's any weirdness with static resources.

Test Plan:
{F21341}
{F21340}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3719
2012-10-17 08:37:05 -07:00
epriestley
b3ad8507af Allow simple template-based skin definitions
Summary:
Lower the barrier to entry for installing and creating skins, so we can kill Wordpress. You can now install skins by dropping them into a directory, and build either "advanced" (full phutil library) skins or "basic" (simple PHP templates) skins.

Next up is getting static resources working in an easy way for skins.

I put these in `externals/` for now so they don't get hit by lint.

Test Plan: Viewed the Pokeblog with the Oblivious skin.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3717
2012-10-17 08:36:48 -07:00
epriestley
44c6109bf2 Add cached summarization to PhamePost
Summary: Restore summarization. Use the remarkup cache, and try to do it somewhat-intelligently (pick the first paragraph that looks like it's text).

Test Plan:
{F21323}

{F21324}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3715
2012-10-17 08:36:33 -07:00
epriestley
83bbad8ba0 Move skins toward modularization
Summary:
Two high-level things happening here:

  - We no longer ever need to put meta-UI (content creation, editing, notices, etc.) on live blog views, since this is all in Phame now. I pulled this out.
  - On the other hand, I pushed more routing/control logic into Skins and made the root skin a Controller instead of a View. This simplifies some of the code above skins, and the theory behind this is that it gives us greater flexibility to, e.g., put a glue layer between Phame and Wordpress templates or whatever else, and allows skins to handle routing and thus add pages like "About" or "Bio".
  - I added a basic skin below the root skin which is more like the old root skin and has standard rendering hooks.
  - "Ten Eleven" is a play on the popular (default?) Wordpress themes called "Twenty Ten", "Twenty Eleven" and "Twenty Twelve".

Test Plan: Viewed live blog and live posts. They aren't pretty, but they don't have extraneous resources.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3714
2012-10-17 08:36:25 -07:00
epriestley
1105cfc3a8 Don't set mustcapture for falsey values
Summary: See discussion in D3722. Good catch -- I'd definitely say this is a bug.

Test Plan: Rendered two <div />s, one with mustcapture set to `true` and one to `false`. The first got `data-mustcapture`; the second did not.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3723
2012-10-17 08:35:57 -07:00
epriestley
b986f9f731 Restore a more surgical workflow/target check
Summary:
D3707 removed some overbroad rules for when we trigger workflows, but there is still one case we should check for -- an <a /> without workflow inside a <form /> with workflow. This occurs in, e.g., the "help" button in Remarkup.

If the node with workflow isn't a link, don't trigger workflow. This should allow the <a><img /></a> case to keep working properly.

Test Plan: Clicked "?" in remarkup bar.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3722
2012-10-17 08:28:37 -07:00
epriestley
602d94fd87 Fix a fatal in "create subtask"
Summary: This got clipped by the actor/email thing I think.

Test Plan: "Create Subtask" no longer fatals.

Reviewers: btrahan, vrana, hsb

Reviewed By: hsb

CC: aran, lesliepc16

Maniphest Tasks: T1918

Differential Revision: https://secure.phabricator.com/D3718
2012-10-16 13:39:35 -07:00
epriestley
9fa4c2d406 Separate "PhabricatorBarePageView" out of "PhabricatorStandardPageView"
Summary:
For Phame, we really want more than a chromeless page -- it shouldn't have Javelin or Phabricator styles on it.

Pull the bare infrastructure out of StandardPageView and make it available as BarePageView.

Test Plan: Viewed bare page in UIExamples, various non-bare pages.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3711
2012-10-16 10:33:47 -07:00
epriestley
c02a588b4e Remove "admin page" color/styles
Summary: These haven't had any effect since the redesign, and we're moving to a more granular policy model so it probably doesn't make sense to ever restore them.

Test Plan: Grepped for "admin" and removed all relevant code.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3710
2012-10-16 10:33:37 -07:00
epriestley
b9f84ebba8 Always use absolute URIs for static resources
Summary: I think this is simpler and better than making them conditional. In properly configured installs this should have no impact (they already use a CDN URI). In not-quite-properly configured installs this will add a trivial, highly-compressible number of bytes to the source. In all cases we have less code.

Test Plan: Loaded some pages, everything worked.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3709
2012-10-16 09:44:53 -07:00
epriestley
1a63938b33 Further improve various Phame UI things
Summary:
  - Better icons and action order.
  - "Move Post" action.
  - (Bugfix) Allow multiple blogs to be set to not having custom domains.
  - Make "Write Post" skip the "select a blog" step when coming from a blog view.
  - Sort blog list on "Write Post".
  - Show messages when a post is a draft or not on a blog.

Test Plan: Created posts, blogs, moved posts, preview/live'd posts, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3708
2012-10-16 09:44:43 -07:00
epriestley
9b15aa195e Improve various Phame UI things
Summary:
  - Clean up the menu selection states.
  - Nuke some unused code.
  - Show some more contextual error messages.
  - Improve/pht() some strings.

Test Plan: Looked at post/blog list, empty state of "new post".

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3706
2012-10-15 17:55:57 -07:00
Bob Trahan
2348b3b450 update celerity map again - i think i broke it 2012-10-15 15:41:41 -07:00
Bob Trahan
2ccf1a9e48 fix workflow to work with complicated content
Summary:
we were aggressively checking to make sure the event target was a workflow element. instead, just update the event target to the workflow element if necessary.

could probably just do this unconditionally as well.

Test Plan: D3705 works with this in place!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3707
2012-10-15 15:40:44 -07:00
epriestley
9c94bf1bea Improve Phame live blogs/posts
Summary: Make "View Live" work on Posts.

Test Plan: Clicked "View Live" on live/not-live posts/blogs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3703
2012-10-15 14:51:30 -07:00
epriestley
0c4eb79d3a Allow Phame posts to be loaded by handle
Summary: Primarily, this makes flagging work on them.

Test Plan: Flagged / Unflagged a post.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3702
2012-10-15 14:51:21 -07:00
epriestley
4de5e949ca Raise a better error in Phame when trying to set two blogs to the same domain
Summary: Currently the exception escapes to top level. Instead, intercept it and complain.

Test Plan: Tried to set two blogs to the same domain.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3701
2012-10-15 14:51:12 -07:00
epriestley
1ecbf23e1e Show PhamePost and PhameBlog content/descriptions on detail pages
Summary: Currently the new detail pages don't show this information. Show it, and use the remarkup cache for BLAZING OODLES OF PERFOARMSNECES!!~~~

Test Plan: See screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3700
2012-10-15 14:51:04 -07:00
epriestley
5fbb46df1c Allow PhabricatorPropertyListView to have associated content
Summary:
Some objects (like PhamePost and ManiphestTask) have a block of text/remarkup which serves as a description or core piece of content for the object.

Accommodate this in PhabricatorPropertyListView.

(This is primarily to let me do a reasonable first pass on this in Phame.)

Test Plan: Made example, will attach screenshot.

Reviewers: btrahan, chad

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3699
2012-10-15 14:50:53 -07:00
epriestley
0e07ef8d56 Mostly modernize post edit/detail UIs
Summary:
Still some big chunks left but this moves us a bit closer to getting everything device-ready.

Stuff not addressed here but which I'm planning to do soon:

  - Posts don't have a live URI yet.
  - Post detail pages don't actually show the post content. I'm going to tweak PhabricatorObjectPropertyListView for this since we need it some other places.
  - Some of the hinting about use/states is gone (e.g., "This post is a draft, publish it to make it live to the world."); I'm planning to restore it.
  - Left nav is still a bit of a mess with states/highlighting.

Major changes are:

  - If you click "New Post" you get a screen asking you to pick a blog to post to.
  - "Publish/Preview" and Unpublish are now separate actions from the post detail screen.
  - "Publish/Preview" renders a preview of the post in an iframe and gives you a "Publish" button.

Test Plan: Will attach screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3697
2012-10-15 14:50:45 -07:00
epriestley
c37202dd48 Modernize Phame post lists
Summary:
Use device UI for all post lists.

Left menu is a bit wonky but I'll clean that up shortly.

Test Plan: Will add screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3696
2012-10-15 14:50:37 -07:00
epriestley
b072e937b5 Modernize blog UI
Summary:
Cleans up some of the mess I made in D3694. Basically:

  - All blogs have an "internal" view with posts that uses mobile-friendly UIs, etc., so we don't have to do as much work with skins -- they just have to look pretty.
  - Blogs now have a separate "live" view that we use to handle domains / skins.
  - Simplified some views and use IDs in some URLs for consistency.
  - Delete a bunch of edge/blogger/multi-blog code that's now obsolete.

Test Plan: Will attach screenshots.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3695
2012-10-15 14:50:12 -07:00
epriestley
a50b8e39b1 Make posts 1:1 with blogs and implement policy controls
Summary:
This leaves the UI in a pretty rough state, but implements blog policy controls and queries, and 1:1 relationships between posts and blogs. Needs a bunch more cleanup but seemed like an okayish breaking point in terms of cohesiveness.

Posts have these rules:

  - Drafts are visible only to the author.
  - Published posts are visible to anyone who can see the blog they appear on.
  - Posts are only editable by the author.

...so we don't need any special policy UI or state to accommodate these rules.

Posts may have no blog if they're grandfathered in or you write a post to a blog and then lose the ability to see the blog. This is the messiest edge case -- specifically:

  - You write a post to blog A.
  - You publish the post.
  - I edit the "Visible To:" for blog A and set it to exclude you.

What we do in this case is let you see the post in "My Posts", but you can no longer see the blog and you'll see the post as not being part of a blog. We can maybe give you some UI to let you move it later or something.

Test Plan: Hit all (I think?) of the interfaces without issues. Definitely some UI problems still right now.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3694
2012-10-15 14:50:04 -07:00
epriestley
dbcf2e44e8 Make PhameBlogs respect policies
Summary:
Adds "can view" and "can edit" policies to blogs. Replaces "bloggers" with "can join".

This doesn't fully remove "bloggers" because I didn't want this to get too crazy/huge.

Test Plan: Created, edited, deleted blogs.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3693
2012-10-15 14:49:52 -07:00
epriestley
304599eab0 Use the default skin if a blog has a set but no-longer-available skin
Summary: I set one of my blogs to "phacility.com" based on `arc patch` and it now fatals since that's not a valid class anymore. :P Recover from these cases.

Test Plan: Viewed blog, no missing symbole exception.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3692
2012-10-12 18:05:55 -07:00
Bob Trahan
8355f3592f Add concept of "skins" to phame, and add a phacility skin
Summary:
introduce an abstract "PhameBlogSkin" class and instantiate two versions -- PhabricatorBlogSkin (Default) and PhacilityBlogSkin.

Most notable hack is including the directory /rsrc/images/phacility - this lets things "work" without messing around with the phacility.com CSS and instead just cutting and pasting most of the file.

Test Plan: played around with Phame a bunch. In particular, created a blog with a custom domain and the phacility skin. Verified it looked good and individual posts looked okay.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3687
2012-10-12 16:01:33 -07:00
vrana
421d2d6a08 Update docs for moved image macros
Test Plan: Followed the instructions.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3688
2012-10-12 14:25:21 -07:00
epriestley
141b3d2b8f Minor, make side nav filter view get trailing slashes correct regardless of input. 2012-10-12 13:21:16 -07:00
Dereckson
ce2c0543bf DifferentialCommentEditor::alterReviewers is now aware of differential.allow-self-accept setting
Summary: This allows users to add a revision's author as reviewer according Differential configuration using the 'Leap Into Action' form.

Test Plan: Tested on local install.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1885

Differential Revision: https://secure.phabricator.com/D3682
2012-10-12 07:41:45 -07:00
Dereckson
b7b783d771 Allow to push revisions to review by himself to Differential (bug T1879, change 1/2, Differential part)
Summary: Checks if the revision author is in reviewers only if differential.allow-self-accept is false.

Test Plan:
Tested locally pushing revisions with "arc diff" to a Phabricator
server with differential.allow-self-accept at true or false with
myself or not as reviewer.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1879

Differential Revision: https://secure.phabricator.com/D3673
2012-10-12 07:40:11 -07:00
epriestley
8798d2189e Prevent notice for missing configuration in PhabricatorIRCDifferentialNotificationHandler
Summary: Provide array() default so we don't foreach() over null in the case of a missing config (from @dctrwatson).

Test Plan: Will verify with @dctrwatson.

Reviewers: vrana, btrahan, dctrwatson

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3686
2012-10-11 15:00:25 -07:00
epriestley
16703fbf04 Add $type property to PhabricatorTypeaheadCommonDatasourceController
Summary: Fix an implicit property.

Test Plan: No more `[11-Oct-2012 14:44:26] WARNING: [pool www] child 72785 said into stderr: "NOTICE: PHP message: [2012-10-11 14:44:26] PHLOG: Wrote to undeclared property PhabricatorTypeaheadCommonDatasourceController::$type. at [/INSECURE/devtools/phabricator/src/aphront/AphrontController.php:65]"`

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3685
2012-10-11 15:00:18 -07:00
epriestley
29bdc3ffc5 Fix DifferentialRevisionEditor handling of actorPHID after D3645
Summary: `actorPHID` no longer gets set or exists.

Test Plan: Updated a revision without fataling.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3684
2012-10-11 14:34:16 -07:00
vrana
d6c12b6518 Document rebase background used in Differential
Summary:
Also fixed formatting.
Also linked docs.

Test Plan:
  $ diviner .

Reviewers: epriestley, wez, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3678
2012-10-11 10:01:09 -07:00
Roy Williams
8007d53473 Added a method on FieldSpec to get all diff properties
Summary: We need to be able to query for all properties matching a given pattern, as mentioned in D3676

Test Plan: Loaded Phabricator, ensured diff loaded, ensured field using all properties was able to enumerate them.

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3679
2012-10-10 16:54:08 -07:00
vrana
efed12400d Load all diff properties in revision view
Summary:
We need to load all properties with some prefix in one field.
We can't merge them in one property because there will be a race condition for update (we don't have API for load+update+save).

Instead of providing API for this and complicating the code even more, just load everything unconditionally.
It shouldn't waste much bandwith or memory because we use most of the properties anyway.
It also looked overengineered to me.

Test Plan: Displayed revision with fields using diff properties.

Reviewers: epriestley, royw

Reviewed By: royw

CC: aran, royw, Korvin

Differential Revision: https://secure.phabricator.com/D3676
2012-10-10 13:43:21 -07:00
Bob Trahan
d9c6e07f2c If users are on the email to Phabricator, do not send them the Phabricator reply.
Summary: When we receive an email, figure out if any of the other tos and ccs are users. If they are, pass their phids through the stach as "exclude phids" and exclude them from getting the email.

Test Plan: used the various applications (audit, differential, maniphest) and noted emails were sent as expected.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin, vrana

Maniphest Tasks: T1676

Differential Revision: https://secure.phabricator.com/D3645
2012-10-10 10:18:23 -07:00
vrana
b605878792 Properly name database in patch list
Summary:
Blames to D3659.
It's not that old (< 1 day) to fix it properly (add patch for dropping xhpast DB).

Test Plan:
  $ arc unit src/applications/calendar/storage/__tests__/PhabricatorCalendarHolidayTestCase.php

Reviewers: btrahan, epriestley

Reviewed By: btrahan

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3670
2012-10-09 15:15:36 -07:00
Wez Furlong
1b6eced757 avoid claiming that the source of a file move was unchanged
Summary:
sometimes we show moved files as unchanged, sometimes deleted,
and sometimes inconsistent with what actually happened at the
destination of the move.  Rather than make a false claim,
omit the 'not changed' notice if this is the source of a move.

Background: one of our users was confused by the source of a move
claiming to be unmodified when the destination of the move had
extensive modifications.

There may be a question about the quality of the data we keep/compute
about the changes, so maybe we could do a better or more consistent
job there (may just be nuances of the SCM in use); this approach
just smoothes that out and doesn't require fixing up the status
in pre-existing diffs.

Test Plan:
In the facebook phabricator, D594195#739ace1a and D590020#b97cfcfd
For others, find a diff that has moved files.
For the source of a move, we should now only show the "X moved to Y"
header and not the "unchanged" shield.

Reviewers: nh, vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3669
2012-10-09 14:16:21 -07:00
vrana
4b4e140f7b Make image macro name selectable
Test Plan: Double clicked near macro name.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3668
2012-10-09 13:38:34 -07:00
vrana
07db53b6f8 Optimize loading draft revisions
Summary:
This is killing us since D3615.

Maybe we should also change `differential_inlinecomment` index <commentID> to <commentID, authorPHID>.

Test Plan: Checked queries at **/differential/** with comment drafts.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3667
2012-10-09 12:01:34 -07:00
Bob Trahan
ce1a585166 Make celerity be able to render full uris
Summary: ...and use 'em in the phame blog case.

Test Plan: viewed blog.phabricator.dev and it actually looked right!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1373

Differential Revision: https://secure.phabricator.com/D3666
2012-10-09 09:31:20 -07:00
epriestley
9adfd11ed7 Minor, fix some missing dependencies for installs with notifications off. 2012-10-09 08:34:06 -07:00
epriestley
2532cb9613 Add mail keys to Ponder questions
Summary:
We need to go slightly farther to stub reply handler functionality for Ponder in at least some configurations, where we rely on the presence of a unique random key to generate per-object or per-object+user reply addresses.

This should probably be formalized in an interface since it's currently pretty ad-hoc.

Test Plan:
  - Made comments in Ponder under a per-user email configuration.
  - Ran migration, verified mail keys were generated.
  - Ran migration again (with --apply), verified existing questions were skipped.
  - Created a new question, verified mail key generation.

Reviewers: pieter

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1873

Differential Revision: https://secure.phabricator.com/D3665
2012-10-08 20:14:58 -07:00
epriestley
a18de93a8c Don't link files with no rendering changeset in DiffusionCommitChangeTableView
Summary:
When directories are added (e.g., on the `hg` initial commit, "/" is added) we don't render any diff for them but try to link to it in the table of contents.

Possibly we should render a diff saying "this directory was added", but stop it from complaining for now.

Test Plan: Looked at several hg and git commits which add directories to verify this gives us generally sensible behvior.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3663
2012-10-08 16:51:50 -07:00
Bob Trahan
6bbdd2609a Allow diffusion to load initial commits in Mercurial repositories
Summary: no parents - no problem - just diff that ish against "null"

Test Plan: initial commits were viewable in my test repos

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1689

Differential Revision: https://secure.phabricator.com/D3660
2012-10-08 16:35:34 -07:00
vrana
cbde56cdce Properly create xhpast database
Summary:
It isn't deleted by `storage destroy`.

This should be a no-op on current storage because we execute `CREATE DATABASE IF NOT EXISTS`.

Test Plan:
  $ bin/storage destroy --dryrun

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3659
2012-10-08 16:09:20 -07:00
epriestley
2bc9ac5e2e Show upload status, success and failures for drag-and-drop files in notifications
Summary: Currently, we do a poor job of communicating drag-and-drop upload errors. Show progress and success/failure in notifications.

Test Plan:
{F20671}

{F20672}

Uploaded files to maniphest attachments, remarkup text areas, Files tool.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3655
2012-10-08 15:23:05 -07:00
epriestley
e00d3b72fe Improve the implementation of Notifications
Summary:
Currently, you can't change a notification that's already shown. There's no reason for this.

(I'm planning to put file upload progress/errors in notifications.)

  - Make `setContent()` and `setDuration()` immediately affect the notification.
  - When there are more than 5 notifications, queue them up instead of dropping them.
  - Allow arbitrarily many classes to be added/removed.
  - Make the examples in the UIExamples tests more rich.

Test Plan:
  - Verified normal notifications continue to function as expected.
  - Played with the UIExamples notifications:
    - Verified the "update every second" notification udpated every second.
    - Verified the permanent alert notification was yellow and requires a click to dismiss.
    - Verified the interactive notification responds correctly to "OK" / "Cancel".
    - Verified the "click every 2 seconds" notification doesn't vanish until not clicked for 2 seconds.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3653
2012-10-08 15:22:29 -07:00
Pieter Hooimeijer
3440839c99 Hook Ponder to Subscriptions
Summary: Adding email aggro email aggro

Test Plan: Added some content; annoyed some coworkers.

Reviewers: epriestley, nh, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1808

Differential Revision: https://secure.phabricator.com/D3643
2012-10-08 14:47:21 -07:00
epriestley
cd9d78c107 Allow Fact analysis of commits
Summary: For immutable objects, just use the ID as a cursor.

Test Plan:
  - Analyzed commits from an empty cursor.
  - Checked that cursor was good.
  - Pulled some more commits.
  - Analyzed commits again, verified it only hit the new ones.
  - Verified the graph of "Count of CMIT" looked reasonable.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1866

Differential Revision: https://secure.phabricator.com/D3656
2012-10-08 13:27:06 -07:00
epriestley
4b6d3e1be9 Unconditionally enable drag-and-drop uploads for Remarkup text areas
Summary: Make these always work. Notably, this makes them work in Maniphest. Previously this was at odds with stuff fixed in D3651.

Test Plan: Dragged and dropped files into Remarkup in Maniphest.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3652
2012-10-08 13:26:57 -07:00
epriestley
8573a1e142 Make the drop target for file attachments smaller
Summary:
Currently, in Maniphest, if you drag-and-drop a file it always attaches. Instead, I want you to have two options:

  - Drag and drop to the attachment area to attach; or
  - drag and drop to the Remarkup panel to upload + inline.

For the first step, make the input have a clear drop target instead of it being the entire panel.

Test Plan: Attached files in Create Task, task view, meta mta send test.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3651
2012-10-08 13:26:41 -07:00
epriestley
85d6f7a66e Improve image thumbnailing and increase the size of Macro thumbnails
Summary:
Alternate proposal for D3635.

  - Works better with small images.
  - Produces a predictable thumbnail size.
  - Somewhat reasonable output on 3000x10 images.
  - Increase the size of Macro thumbnails to 240px.

Test Plan: {F20497}

Reviewers: vrana, chad

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3638
2012-10-08 13:26:10 -07:00
Pieter Hooimeijer
74644d5210 move ponder writes into editors; better search indexing
Summary:
* Moved the remaining `->save()` calls into editors
* for the `PonderQuestion`, separate `attachRelated` (needed for
  indexing and viewing) from `attachVotes` (needed for viewing
  but not indexing)
* Update the indexer to include comment and answer content
  in the search index.

Test Plan:
Stuff works as before. Also: add a comment or answer with some
easily-identifiable text and search for it; observe that
it gets indexed appropriately.

Reviewers: epriestley, nh, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1869

Differential Revision: https://secure.phabricator.com/D3654
2012-10-07 14:35:01 -07:00
epriestley
741469d7df Minor, fix a JS issue with help link in Remarkup assist. 2012-10-06 16:29:55 -07:00
epriestley
643d8070f1 Implement improved remarkup assistance panel
Summary:
  - I made a "?" icon for help/reference.
  - The `<>` icon was slightly too wide so I carved it down to 14x14.
  - All the icons are in `/Phabriactor/remarkup_icon_sources.psd` if you want to tweak anything.
  - Tooltips don't look like the mock but I'll tackle those separately.
  - Removed strikethrough.
  - Removed tag/image/text size for now since they don't have reasonable JS implementations yet.
  - I think everything else is accurate to the mock.

Test Plan:
Normal state:

{F20621, size=full}

Hover + Click states:

{F20622, size=full}

Clicked state:

{F20620, size=full}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1848

Differential Revision: https://secure.phabricator.com/D3650
2012-10-06 16:21:25 -07:00
epriestley
a7cdc312e6 Use new application icons and intended side nav icons
Summary: @chad, can you do the icon sheets based on 1.6? We're using a few icons not present in 1.5. I put the 1.6 "pro" source on Dropbox.

Test Plan:
Nav hover and selected states:

{F20598}

Launch hover state:

{F20596}

Reviewers: chad

Reviewed By: chad

CC: aran

Maniphest Tasks: T1856

Differential Revision: https://secure.phabricator.com/D3649
2012-10-06 14:48:46 -07:00
vrana
22cb8f5d08 Require canonical numbers in routes
Summary:
D03646 works, I don't want it to work.
Theoretically, it can cause us some troubles if we use this string in JS number context where 030 is 24.

Test Plan: D03646, D3646

Reviewers: epriestley, edward

Reviewed By: edward

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3646
2012-10-05 18:07:54 -07:00
vrana
3d6f3e1014 Allow editing macros
Summary: Attempt to edit macro said that there is a name conflict.

Test Plan: Edited macro.

Reviewers: wez, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3644
2012-10-05 14:14:07 -07:00
vrana
bf98ab5e92 Handle empty array argv in daemon log view 2012-10-05 13:20:44 -07:00
epriestley
5b74b8b765 Add basic "Subscriptions" application
Summary:
Basic infrastructure for generalizing subscriptions/CCs for T1808, T1514 and T1663.

  - Implement `PhabricatorSubscribableInterface` and you'll get a subscribe/unsubscribe button for free.
  - If there are any auto-subscribed users (like the question author) you can specify them; this makes more sense for Tasks and Revisions than Ponder probably, but maybe the author should be auto-subscribed.
  - Subscriptions are either "explicit" (the user clicked 'subscribe') or "implicit" (the user did something which causes them to become subscribed naturally). If a user unsubscribes, they'll no longer be added by implicit subscriptions. This may or may not be relevant to Ponder but is an existing Herald feature in Differential.
  - Helper method on PhabricatorSubscribersQuery to load subscribers.
  - This doesn't handle actually sending email, etc. I think that's all so application-specific that it doesn't belong here.
  - Now seems to work.

Test Plan:
{F20552}
{F20553}

Reviewers: pieter, btrahan

Reviewed By: pieter

CC: aran

Maniphest Tasks: T1663, T1514, T1808

Differential Revision: https://secure.phabricator.com/D3637
2012-10-05 13:18:05 -07:00
Wez Furlong
1fda844c9f Avoid fatal if a macro has no file
Summary:
Not sure how this triggers, but we have a macro that has no file
associated with it, and this caused a fatal on the /macro endpoint.

Test Plan: https://phabricator.fb.com/macro/?page=100

Reviewers: vrana, nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3642
2012-10-05 13:13:50 -07:00
epriestley
7c0f0807da Use action list and property list elements in Ponder
Summary: This is sort of silly as-is, but automatically exposes flagging and will give subscribe/unsubscribe and "Subscribers" a place to plug into shortly. For context, see D3637 and T1808.

Test Plan: {F20550}

Reviewers: pieter, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1808

Differential Revision: https://secure.phabricator.com/D3641
2012-10-05 13:12:31 -07:00
Bob Trahan
a754fdfca3 Create metamta.user-address-format configuration option
Summary: this lets users specify what "name" to use in email addresses

Test Plan: changed the conf setting in my local instance and used phabricator. observed name format changes

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1862

Differential Revision: https://secure.phabricator.com/D3639
2012-10-05 11:27:58 -07:00
vrana
c4aaa7291b Display full picture in image macro editing
Summary:
Users are complaining that they don't see how the image macro looks until they use it.
Click leads to edit form.
Display it there.

Test Plan:
Edited macro.
Attempted to create macro with duplicate name.

Reviewers: epriestley

Reviewed By: epriestley

CC: chad, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3636
2012-10-04 18:52:48 -07:00
vrana
dfe5ae08aa Handle empty argv in daemon log view
Summary: This could be empty probably for old logs

Test Plan: Ran the controller.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3633
2012-10-04 17:03:06 -07:00
vrana
511a8bae34 Optimize feed query
Summary:
This was killing us. `EXPLAIN` after:

<table>
<tr><th>id</th><th>select_type</th><th>table</th><th>type</th><th>possible_keys</th><th>key</th><th>key_len</th><th>ref</th><th>rows</th><th>Extra</th></tr>
<tr><td>1</td><td>SIMPLE</td><td>story</td><td>index</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td></td><td>201</td><td> </td></tr>
<tr><td>1</td><td>SIMPLE</td><td>ref</td><td>ref</td><td>chronologicalKey</td><td>chronologicalKey</td><td>8</td><td>phabricator_feed.story.chronologicalKey</td><td>1</td><td>Using index</td></tr>
</table>

Test Plan: /feed/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3628
2012-10-04 16:07:39 -07:00
epriestley
5578ccdff2 Expose "withAnyProjects()" in the UI
Summary:
Add an "Any Projects" field to the custom search UI.

This is starting to get ugly but we'll do a design pass on it before toooo long.

Test Plan: {F20423}

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3632
2012-10-04 15:31:14 -07:00
epriestley
5cbc4fe7e1 Rename ManiphestTaskQuery::withProjects() to withAllProjects()
Summary: After D3630, make the API more clear: withAllProjects() vs withAnyProjects()

Test Plan: Loaded project page, maniphest task query, reports, filtered by project and "noproject". Grep.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3631
2012-10-04 15:31:04 -07:00
epriestley
030726b144 Improve implementation of ManiphestTaskQuery
Summary:
Currently, we have a single `projectPHIDs` field, and a separate flag which makes it act like AND or OR.

This is silly. Make two separate methods for setting `AND` vs `OR` projects. This also simplifies the implmentation.

This doesn't change the UI or any behavior (yet), it just makes the API more usable.

Test Plan: Loaded homepage, "All Projects" task view, verified queries made sense and returned correct results. Grepped for changed method name.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1610

Differential Revision: https://secure.phabricator.com/D3630
2012-10-04 15:30:51 -07:00
Bob Trahan
689c98c47c Update database.schema doc to include how to upgrade the schema
Summary: plus update the phid section a little

Test Plan: read it, looked good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1287

Differential Revision: https://secure.phabricator.com/D3629
2012-10-04 15:26:16 -07:00
vrana
5bde6c71ce Declare used properties
Summary: Also fix couple of other errors.

Test Plan: Executed controllers.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3627
2012-10-04 14:46:06 -07:00
Bob Trahan
84ddc4a0c9 Add a defaulty priority configuration flag for maniphest tasks
Summary: instance-wide this setting be

Test Plan: made a new task and noted the default priority honored what was in btrahan.conf

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1842

Differential Revision: https://secure.phabricator.com/D3626
2012-10-04 14:19:37 -07:00
epriestley
ea32c541e4 Remove all optimistic lock code from Lisk
Summary: We never use this and almost certainly never will. It's been in Lisk for ~7 years but is a solution in search of a problem. It causes a conflict with any DAO that has a `version` column.

Test Plan: Browsed around, performed inserts and updates. Edited a Phriction document.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran, leslie.chong

Differential Revision: https://secure.phabricator.com/D3625
2012-10-04 13:55:43 -07:00
vrana
fe355f7905 Fix typo in route 2012-10-04 13:52:06 -07:00
Bob Trahan
4c86893108 allow arcanist projects to be deleted via the ui
Summary: tricky part is purging symbols at that time too. override "delete" method to get there, use transactions, etc.

Test Plan: deleted an arcanist project - it worked!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, mbishopim3

Maniphest Tasks: T1738

Differential Revision: https://secure.phabricator.com/D3613
2012-10-04 13:25:58 -07:00
epriestley
36d02b6c79 Fix a use of $method in Conduit which is not available in scope
Summary:
This got refactored at some point and lost access to $method. Also make the error a little more helpful.

See https://groups.google.com/forum/?fromgroups=#!topic/phabricator-dev/05voYIPV7uU

Test Plan:
  $ arc list --conduit-uri=http://local.aphront.com:8080/
  Exception
  ERR-CONDUIT-CORE: Invalid parameter information was passed to method 'conduit.connect', could not decode JSON serialization. Data: xxx{"client":"arc","clientVersion":5,"clientDescription":"orbital:\/INSECURE\/devtools\/arcanist\/bin\/..\/scripts\/arcanist.php list --conduit-uri=http:\/\/local.aphront.com:8080\/","user":"epriestley","host":"http:\/\/local.aphront.com:8080\/api\/","authToken":1349367823,"authSignature":"54bc136589c076ea06f8e5fb77c76ea7d57aec5b"}
  (Run with --trace for a full exception trace.)

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3622
2012-10-04 09:30:32 -07:00
vrana
58206a146f Fix displaying gap context when showing first lines
Summary: Show First 20 Lines doesn't display gap context and emits error.

Test Plan: Showed first 20 lines, last 20 lines, middle 20 lines - saw context and no error.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3616
2012-10-04 09:07:47 -07:00
vrana
a185b1b4a7 Include comment drafts in revision draft query
Summary: Previously, only inline comment drafts were included.

Test Plan:
**/differential/** - verified that there are drafts where they weren't before.

Checked executed queries.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3615
2012-10-04 09:07:22 -07:00
vrana
12df076157 Improve error message printed in SEV
Summary:
D3542 caused a SEV for us.
Make it better for future.

Test Plan: SEV

Reviewers: btrahan, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3614
2012-10-03 20:47:35 -07:00
vrana
7e7a029481 Liberate 2012-10-03 18:23:46 -07:00