1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-22 10:18:48 +02:00
Commit graph

1752 commits

Author SHA1 Message Date
epriestley
7b50b2fbdc Use subprocess output streaming to improve performance of Git commit discovery
Summary:
Improve performance of large discovery tasks in Git by using subprocess streaming, like we do for Mercurial.

Basically, we save the cost of running many `git log` commands by running one big `git log` command but only parsing as much of it as we need to. This is pretty complicated, but we more or less need it for mercurial (which has ~100ms of 'hg' overhead instead of ~5ms of 'git' overhead) so we're already committed to most of the complexity costs. The git implementation is much simpler than the hg implementation because we don't need to handle all the weird parent rules (git gives us to them easily).

Test Plan:
Before, `discover --repair` on Phabricator took 35s:

  real	0m35.324s
  user	0m13.364s
  sys	0m21.088s

Now 7s:

  real	0m7.236s
  user	0m2.436s
  sys	0m3.444s

Note that most of the time is spent inserting rows after discover, the actual speedup of the git discovery part is much larger (subjectively, it runs in less than a second now, from ~28 seconds before).

Also ran discover/pull on single new commits in normal cases to verify that nothing broke in the common case.

Reviewers: jungejason, nh, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1401

Differential Revision: https://secure.phabricator.com/D2851
2012-06-25 15:21:48 -07:00
epriestley
ca31e3e84b Add a --repair flag to "bin/repository discover"
Summary:
If a repository is missing commits because they mysteriously vanished, there's no reasonable way to get them back right now. Provide a way to ignore the state in the database and rediscover the entire repository unconditionally.

We don't queue any reparses or anything, but when I move reparse into this script we can hook things up or something. This generally shouldn't be too important anyway.

Test Plan: Ran `repository discover --repair` on Phabricator.

Reviewers: jungejason, nh, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2850
2012-06-25 12:35:47 -07:00
epriestley
13d96e6377 Introduce "bin/repository" for repository management
Summary:
Nothing new or exciting here yet, just moving the random scripts/repositories/ things to bin/repository. Also add `repository list`.

(Console stuff comes from D2841.)

Test Plan: Ran `repository list`, `repository pull`, `repository discover`, `repository discover --verbose`, `repository help`.

Reviewers: jungejason, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2849
2012-06-25 12:35:37 -07:00
Daniel Fullarton
37df05c7a5 T1354 : Resize profile pics (specifically to handle github v3 api)
Reviewed by: epriestley
GitHub Pull: https://github.com/facebook/phabricator/pull/140
2012-06-25 06:29:19 -07:00
linead
e683236793 Extract ldap auth from password auth completely 2012-06-24 18:12:56 -07:00
epriestley
bedc9acf98 Minor, fix XSS in task description change notifications. 2012-06-24 15:15:34 -07:00
epriestley
a705f336a3 Add vebose logging to PhutilRepositoryPullDaemon
Summary: Add verbose logging. This logging is activated by setting "phd.verbose" in the config, running "phd debug", or explicitly in scripts/repository/pull.php and scripst/repository/discover.php

Test Plan:
  >>> orbital ~/devtools/phabricator $ ./scripts/repository/discover.php GTEST
  Discovering 'GTEST'...
  <VERB> PhabricatorRepositoryPullLocalDaemon Discovering commits in repository 'GTEST'...
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '()_+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '_+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch', at 774c7737b2d560a291697126bf4513204ccf661a.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch-1', at dc97539bee07293f95990d71f4638335a2531d69.
  <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
  <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch-2', at 1acfaec313c46dd3caa90448800181fb91b0270f.

Reviewers: jungejason

Reviewed By: jungejason

CC: aran

Differential Revision: https://secure.phabricator.com/D2843
2012-06-24 15:06:40 -07:00
Jason Ge
de46a2550c Fix auto-close in a repo with missing commits in Phabricator db
Summary:
After adding more error logging: https://secure.phabricator.com/differential/diff/5295/, discover.php prints the output: https://secure.phabricator.com/P427

The problem is that there are gaps in the commits and revisions in Phabricator's DB for the repo. For some git commits, both the phabricator commits and the differential revision are missing (because of a mysterious DB data loss. nharper should be able to recover it); for some other git commits, the phabricator commits are missing (probably also because of the daba loss mentioned above). This can also happen if the git commits were too big to be parsed by phabricator.

Because of the gap, the pull daemon detects them as new autoclose commits on the branch
  (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$267)
  (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$592)

Then tries to update it
  (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$616)
and will fail because the commit doesn't exist in the DB.
  (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$341)
After the exception is thrown, all the commits just detected are not marked as 'seenOnBranches', so they won't be marked as closed by the CommitMessageParserWorker.

This also explains the weird behavior where the parsing of the commits is always paused for 15 minutes and then gets started again. The parsing pauses because the process listed at https://secure.phabricator.com/P427 takes quite some time to finish before it can record tha tasks. The parsing happens all the time because the process will be executed again and again.

A better fix might be to put all the missing commits in the repository_badcommit table and check against it.

Test Plan: will run 'discover.php FBCODE' to test it.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: nh, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2846
2012-06-23 09:47:20 -07:00
vrana
43121f6858 Provide a Conduit method to get inline comments
Summary:
See D2855 for usage.

This has a drawback that inlines without a comment (synthetic comments) are not attached anywhere.
I don't like adding more and more methods so I've chosen this solution.
Plus comments and inline comments are often useful together.

Test Plan: Called the method on a revision with inline comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: vii, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2844
2012-06-23 09:34:14 -07:00
vrana
d7b8bc892b Display revision number in history
Test Plan:
Displayed repository.
Displayed repository history.
Wondered that we actually have bunch of commits without a revision.
Displayed blame.
Didn't display merge commit.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2840
2012-06-22 17:10:45 -07:00
Jason Ge
969dcc5bae handle svn and hg for auto-close
Summary: in svn and hg (for now), no branch used.

Test Plan: will test live

Reviewers: epriestley

CC: nh, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2839
2012-06-22 17:05:06 -07:00
epriestley
c42f767e37 Destroy changeset parse cache when destroying a revision
Summary: When we delete a DifferentialChangeset, also delete the cache if it exists.

Test Plan:
Destroyed a revision, verified cache was destroyed. See marked line below.

        $ ./scripts/differential/destroy_revision.php D1 --trace
        >>> [0] <connect>
        <<< [0] <connect> 1,324 us
        >>> [1] <query> SELECT * FROM `differential_revision` WHERE `id` = 1
        <<< [1] <query> 517 us

            Really destroy 'D1: asdb' forever? [y/N] y

        >>> [2] <connect>
        <<< [2] <connect> 633 us
        >>> [3] <query> START TRANSACTION
        <<< [3] <query> 183 us
        >>> [4] <query> SELECT * FROM `differential_diff` WHERE revisionID = 1
        <<< [4] <query> 560 us
        >>> [5] <query> SAVEPOINT Aphront_Savepoint_1
        <<< [5] <query> 197 us
        >>> [6] <query> SELECT * FROM `differential_changeset` WHERE diffID = 3
        <<< [6] <query> 672 us
        >>> [7] <query> SAVEPOINT Aphront_Savepoint_2
        <<< [7] <query> 188 us
        >>> [8] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 6
        <<< [8] <query> 946 us
        >>> [9] <query> DELETE FROM `differential_hunk` WHERE `id` = 6
        <<< [9] <query> 335 us
  ****  >>> [10] <query> DELETE FROM `differential_changeset_parse_cache` WHERE id = 6
        <<< [10] <query> 1,464 us
        >>> [11] <query> DELETE FROM `differential_changeset` WHERE `id` = 6
        <<< [11] <query> 313 us
        >>> [12] <query> SAVEPOINT Aphront_Savepoint_2
        <<< [12] <query> 151 us
        >>> [13] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 7
        <<< [13] <query> 226 us
        >>> [14] <query> DELETE FROM `differential_hunk` WHERE `id` = 7
        <<< [14] <query> 164 us
        >>> [15] <query> DELETE FROM `differential_changeset_parse_cache` WHERE id = 7
        <<< [15] <query> 318 us
        >>> [16] <query> DELETE FROM `differential_changeset` WHERE `id` = 7
        <<< [16] <query> 189 us
        >>> [17] <query> SELECT * FROM `differential_diffproperty` WHERE diffID = 3
        <<< [17] <query> 500 us
        >>> [18] <query> DELETE FROM `differential_diffproperty` WHERE `id` = 1
        <<< [18] <query> 179 us
        >>> [19] <query> DELETE FROM `differential_diff` WHERE `id` = 3
        <<< [19] <query> 211 us
        >>> [20] <query> DELETE FROM `differential_relationship` WHERE revisionID = 1
        <<< [20] <query> 391 us
        >>> [21] <query> DELETE FROM `differential_commit` WHERE revisionID = 1
        <<< [21] <query> 397 us
        >>> [22] <query> SELECT * FROM `differential_comment` WHERE revisionID = 1
        <<< [22] <query> 448 us
        >>> [23] <query> DELETE FROM `differential_comment` WHERE `id` = 1
        <<< [23] <query> 212 us
        >>> [24] <query> DELETE FROM `differential_comment` WHERE `id` = 2
        <<< [24] <query> 160 us
        >>> [25] <query> SELECT * FROM `differential_inlinecomment` WHERE revisionID = 1
        <<< [25] <query> 549 us
        >>> [26] <query> SELECT * FROM `differential_auxiliaryfield` WHERE revisionPHID = 'PHID-DREV-orsh7alzcj764ubv2f34'
        <<< [26] <query> 531 us
        >>> [27] <query> SELECT * FROM `differential_affectedpath` WHERE revisionID = 1
        <<< [27] <query> 5,676 us
        >>> [28] <query> DELETE FROM `differential_revision` WHERE `id` = 1
        <<< [28] <query> 442 us
        >>> [29] <query> COMMIT
        <<< [29] <query> 324 us
        OK, destroyed revision.

Reviewers: csilvers, btrahan

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2835
2012-06-22 16:16:44 -07:00
vrana
a7a978d1f3 Link revision from blame
Summary: I need this much more than commit but it can be useful too.

Test Plan: Displayed blame, clicked on the link.

Reviewers: epriestley

Reviewed By: epriestley

CC: john, aran, Korvin, phunt

Differential Revision: https://secure.phabricator.com/D2820
2012-06-22 12:48:46 -07:00
vrana
c5c0324e1b Send several X-Differential-CC headers
Summary: People want to create filters checking if they are in CC which is almost impossible with multiplexing in Outlook.

Test Plan: Sent e-mail with multiple CCs, verified headers.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2829
2012-06-22 11:10:23 -07:00
Jason Ge
a75da4efac Revert "run record commit if its the first time seen"
Summary: This reverts commit 22e606d49e.

Test Plan: none

Reviewers: epriestley, nh

Reviewed By: nh

CC: nh, vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2833
2012-06-21 20:26:07 -07:00
Jason Ge
22e606d49e run record commit if its the first time seen
Test Plan: test live.

Reviewers: nh

Reviewed By: nh

CC: epriestley, aran

Differential Revision: https://secure.phabricator.com/D2832
2012-06-21 19:47:25 -07:00
Jason Ge
06c976b738 check commit before calling its method
Summary: it's calling pull daemon's failure. This is actually Nick's fix.

Test Plan: Nick already manually ran it on daemon machine.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2828
2012-06-21 18:36:31 -07:00
epriestley
083cd5fd9d Add a "Mark All Read" button for notifications
Summary: Adds a button to mark everything as read.

Test Plan: Clicked button.

Reviewers: btrahan, jungejason, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2812
2012-06-20 13:51:19 -07:00
epriestley
addc2c8764 Determine unread count correctly when rendering notification panel
Summary:
Currently, when rendering the panel we count the number of unread notifications in the last 15, but this means we can never render a number larger than 15. If the user has more unread notifications than that, or unread notifications older than the most recent 15, there will be a flash of the higher number and then it will update to the lower number afterward.

Instead, count all unread notifications. This uses the same method used to render both numbers.

Test Plan: Loaded a page, checked the menu, nothing exploded.

Reviewers: btrahan, jungejason, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2811
2012-06-20 13:20:41 -07:00
epriestley
a4e2eb3d8c Add a "differential.createrawdiff" Conduit method
Summary:
"differential.creatediff" requires a mostly-parsed diff, but there's no reason we can't make DifferentialDiffs out of raw diffs.

This mainly serves to lower the adoption barrier if getting "arc" distributed is too much of a hassle.

Test Plan: Made a diff out of a raw block of diff text.

Reviewers: ffx, vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2751
2012-06-20 12:35:04 -07:00
Bob Trahan
921b5dada1 Enable image macros on the wiki
Summary: D2230 did the heavy lifting spoken of in the comment this diff deletes. Also remove 'macro' => false.

Test Plan: Added an image macro to a wiki document and it showed up

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1023

Differential Revision: https://secure.phabricator.com/D2668
2012-06-20 12:06:35 -07:00
vrana
21656f0971 Include only whole days in Differential stats
Summary: This prevents "8 active days" for last week.

Test Plan: `strtotime('1 week ago 24:00')`

Reviewers: john, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2794
2012-06-20 11:57:26 -07:00
epriestley
8ddfdb26e9 Publish feed stories about commits
Summary: When stuff gets committed, publish feed stories about it.

Test Plan: {F13061}

Reviewers: jungejason, vrana, voldern

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T1322

Differential Revision: https://secure.phabricator.com/D2805
2012-06-20 06:03:44 -07:00
epriestley
74e39bfe41 Provide basic documentation about Aphlict
Summary: Hopefully this is helpful? Also fixed a thing that wasn't using config.

Test Plan: Read documentation. Sent myself a notification over the server.

Reviewers: jungejason

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2804
2012-06-19 18:37:58 -07:00
epriestley
d277908842 Minor, avoid branch loop nonsense for repositories not set to autoclose. See IRC. 2012-06-19 15:05:22 -07:00
vrana
606ca2831c Use pht() for plural 2012-06-19 15:04:36 -07:00
Nick Harper
4b10707d4d Add user.enable conduit method
Test Plan: enabled a disabled user

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2800
2012-06-19 14:36:08 -07:00
vrana
bf10eaf81c Wrap Differential property changes 2012-06-19 14:15:40 -07:00
epriestley
e48830eecb Don't rediscover an entire branch when a new commit appears at HEAD
Summary:
The autoclose logic is currently doing a little too much work. We want to parse each commit at most twice:

  # When it first appears in the repository.
  # When it first appears on an autoclose branch.

These two events might not be distinct (i.e., it might first appear on an autoclose branch).

Currently, to discover commits initially appearing on autoclose branches, we check each branch, determine if it's an autoclose branch or not, and determine if the HEAD is already a known commit on an autoclose branch. This is correct so far, and allows us to ignore branches which either haven't changed or have commits at HEAD which we've already examined.

However, if an autoclose branch has a new commit, we start working backward through it. Prior to this patch, we only stop when we hit commits that we've already discovered lie on this branch. If the branch is new, none of the commits will be discovered on it (they're discovered in general, and likely discovered on other autoclose branches, but not discovered on this branch), so we'll parse all the way back to the root.

Instead, we want to stop when we hit commits that we've already discovered on //any// autoclose branch.

So do that.

Test Plan: Pushed a new branch, then pushed a new commit at HEAD. Ran discovery, verified we rediscovered only 1 commit, not every commit in history.

Reviewers: vrana, jungejason, aurelijus

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1389

Differential Revision: https://secure.phabricator.com/D2798
2012-06-19 13:47:01 -07:00
epriestley
d4b6b095cb Provide a script to completely destroy revisions
Summary:
Someone may or may not have accidentally uploaded secrets to Differential. Provide an administrative mechanism to permanently destroy a revision.

Also fix some of the transaction handling code.

Test Plan:
  $ ./scripts/differential/destroy_revision.php --trace D1
  >>> [0] <connect>
  <<< [0] <connect> 1,060 us
  >>> [1] <query> SELECT * FROM `differential_revision` WHERE `id` = 1
  <<< [1] <query> 473 us

      Really destroy 'D1: asdbas' forever? [y/N] y

  >>> [2] <connect>
  <<< [2] <connect> 628 us
  >>> [3] <query> START TRANSACTION
  <<< [3] <query> 190 us
  >>> [4] <query> SELECT * FROM `differential_diff` WHERE revisionID = 1
  <<< [4] <query> 510 us
  >>> [5] <query> SAVEPOINT Aphront_Savepoint_1
  <<< [5] <query> 122 us
  >>> [6] <query> SELECT * FROM `differential_changeset` WHERE diffID = 1
  <<< [6] <query> 307 us
  >>> [7] <query> SAVEPOINT Aphront_Savepoint_2
  <<< [7] <query> 241 us
  >>> [8] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 1
  <<< [8] <query> 212 us
  >>> [9] <query> DELETE FROM `differential_hunk` WHERE `id` = 1
  <<< [9] <query> 216 us
  >>> [10] <query> DELETE FROM `differential_changeset` WHERE `id` = 1
  <<< [10] <query> 154 us
  >>> [11] <query> SAVEPOINT Aphront_Savepoint_2
  <<< [11] <query> 118 us
  >>> [12] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 2
  <<< [12] <query> 194 us
  >>> [13] <query> DELETE FROM `differential_hunk` WHERE `id` = 2
  <<< [13] <query> 179 us
  >>> [14] <query> DELETE FROM `differential_changeset` WHERE `id` = 2
  <<< [14] <query> 163 us
  >>> [15] <query> SAVEPOINT Aphront_Savepoint_2
  <<< [15] <query> 105 us
  >>> [16] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 3
  <<< [16] <query> 211 us
  >>> [17] <query> DELETE FROM `differential_hunk` WHERE `id` = 3
  <<< [17] <query> 159 us
  >>> [18] <query> DELETE FROM `differential_changeset` WHERE `id` = 3
  <<< [18] <query> 152 us
  >>> [19] <query> SAVEPOINT Aphront_Savepoint_2
  <<< [19] <query> 124 us
  >>> [20] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 4
  <<< [20] <query> 191 us
  >>> [21] <query> DELETE FROM `differential_hunk` WHERE `id` = 4
  <<< [21] <query> 155 us
  >>> [22] <query> DELETE FROM `differential_changeset` WHERE `id` = 4
  <<< [22] <query> 149 us
  >>> [23] <query> SELECT * FROM `differential_diffproperty` WHERE diffID = 1
  <<< [23] <query> 242 us
  >>> [24] <query> DELETE FROM `differential_diffproperty` WHERE `id` = 1
  <<< [24] <query> 196 us
  >>> [25] <query> DELETE FROM `differential_diff` WHERE `id` = 1
  <<< [25] <query> 169 us
  >>> [26] <query> DELETE FROM `differential_relationship` WHERE revisionID = 1
  <<< [26] <query> 178 us
  >>> [27] <query> DELETE FROM `differential_commit` WHERE revisionID = 1
  <<< [27] <query> 164 us
  >>> [28] <query> SELECT * FROM `differential_comment` WHERE revisionID = 1
  <<< [28] <query> 221 us
  >>> [29] <query> DELETE FROM `differential_comment` WHERE `id` = 1
  <<< [29] <query> 172 us
  >>> [30] <query> SELECT * FROM `differential_inlinecomment` WHERE revisionID = 1
  <<< [30] <query> 296 us
  >>> [31] <query> SELECT * FROM `differential_auxiliaryfield` WHERE revisionPHID = 'PHID-DREV-ooky7ozqukpmwget32oc'
  <<< [31] <query> 308 us
  >>> [32] <query> SELECT * FROM `differential_affectedpath` WHERE revisionID = 1
  <<< [32] <query> 4,173 us
  >>> [33] <query> DELETE FROM `differential_revision` WHERE `id` = 1
  <<< [33] <query> 231 us
  >>> [34] <query> COMMIT
  <<< [34] <query> 686 us
  OK, destroyed revision.

Reviewers: csilvers, vrana, jungejason

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2796
2012-06-19 11:52:50 -07:00
Edward Speyer
83a5f1479d Arrayish fields should always return arrays
Summary:
Array-like fields in HerladCommitAdapter should always return things of
type array.  If they return array(...) or null, then array_*() functions
sporadically break.

Test Plan:
Ran a PhabricatorRepositoryCommitHeraldWorker for a troublesome commit.
Failed before; fails no more.

Reviewers: epriestley, jungejason

Reviewed By: epriestley

CC: aran, Korvin, vdt

Maniphest Tasks: T1385

Differential Revision: https://secure.phabricator.com/D2793
2012-06-19 11:18:38 -07:00
vrana
c762050b7c Get rid of file_get_contents($uri)
Summary: It requires `allow_url_fopen` which we don't check in setup and our installation is about to disable it.

Test Plan:
Login with OAuth.
/oauth/facebook/diagnose/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2787
2012-06-18 17:45:45 -07:00
mkedia
a5b5128be9 Add path support to differential.query
Summary:
Allows clients to select open differential revisions that
affect a set of paths.

Test Plan:
http://phabricator.mkedia.dev2975.facebook.com/conduit/method/differential.query/ with

paths: [["E", "tfb/trunk/www/html/intern/css/tabloid"]]
status: "status-open"

(internal facebook repo, obvi)

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: vrana, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2788
2012-06-18 17:43:22 -07:00
vrana
2a09563533 Always use HTTPSFuture in elasticsearch.
Test Plan: Search elasticly.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2685
2012-06-18 15:16:46 -07:00
epriestley
76df7970ec Show notification text for non-reload notifications
Summary:
Show all notifications, but make the non-reload ones transient.

Depends on D2781, D2780

Test Plan: {F12986}

Reviewers: jungejason, vrana

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2782
2012-06-18 14:08:10 -07:00
epriestley
8cd0997965 Add a list of all notifications
Summary: Add a "View All Notifications" link and page.

Test Plan: Viewed all notifications

Reviewers: jungejason, vrana

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2780
2012-06-18 14:07:38 -07:00
vrana
656c82f9b8 Fix principal error in makeChangesWithContext()
Summary: `array_fill()`, contrary to `range()`, doesn't accept the last element but the number of elements.

Test Plan: Reparsed commit not changed after the last diff but rebased which was previously reported as changed.

Reviewers: jungejason, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2783
2012-06-18 13:52:45 -07:00
vrana
e84f9f9ec9 Send Differential e-mails in user's language
Summary:
Works this way:

- Select users' language with multiplexing.
- Select default language otherwise (it can be different from current user's language).
- Build body and subject for each user individually.
- Set the original language after sending the mails.

Test Plan:
- Comment on a diff of user with custom translation.
- Set default to a custom translation. Comment on a diff of user with default translation.
- Set default to a default translation. Comment on a diff of user with default translation.

Repeat with/without multiplexing.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D2774
2012-06-18 12:41:09 -07:00
Jason Ge
112acf11cf Enable 'jumping to toc' on diffusion commit page
Summary:
Diffusion page is sharing the keyboard shortcuts code with
Differential page. But since the toc (Changes) panel doesn't have id
'differential-review-toc', the 'jumping to toc' doesn't work. The fix is
to add the ID. I don't like adding 'Differential' to the Diffusion page.
Later we should refactor the code to extract the shared components out of Differential.

Test Plan:
verified that 't' worked on the diffusion commit page.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: hwang, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2500
2012-06-18 11:09:25 -07:00
20after4
fea67c9858 Partial fix for owners bug where a package's repository doesn't exist.
Summary: Avoid requesting a non-existent repository...

Test Plan: Delete a repo that has an associated owners package. Then verify that the owners list page no longer throws an exception.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1372

Differential Revision: https://secure.phabricator.com/D2776
2012-06-18 06:04:36 -07:00
epriestley
513abf00cf Add a server status page for notification server
Summary:
  - Add a /notification/status/ page which shows server status.
  - Remove various test controllers and routes.
  - Make the "no notifications" message look better.
  - Move port/URI configuration to config file.

Test Plan: Started server, hit /notification/status/, saw server status.

Reviewers: allenjohnashton, ddfisher, keebuhm, jungejason

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2756
2012-06-17 11:35:18 -07:00
epriestley
cdd3683ed7 Allow applications to call Conduit directly
Summary:
Sorry this took so long, had a bunch of stuff going on today.

Separate the actual core part of making conduit calls from the controller, so the application can make conduit calls without needing to invoke HTTP or redo auth. Generally, this lets us build more parts of the application on top of Conduit, as appropriate.

This diff can be simplified, but I wanted to unblock you guys first. I'll followup with a cleanup patch once I have a chance.

Test Plan: Ran unit tests, ran calls from the conduit API console, and ran calls over arc.

Reviewers: nodren, 20after4, btrahan, vrana

Reviewed By: 20after4

CC: aran, svemir

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D2718
2012-06-17 08:47:09 -07:00
epriestley
3e18acef9f Minor, use self:: instead of static:: for PHP 5.2 compatibility. See https://github.com/facebook/phabricator/issues/133 2012-06-17 08:46:22 -07:00
Jonathan Lomas
92fac31215 Fixes broken search if no task ids created by D2771.
Summary: I forgot to handle the case where there was no task ids entered in D2771, but this corrects that issue.

Test Plan: Search with no task ids...

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1365

Differential Revision: https://secure.phabricator.com/D2773
2012-06-16 06:27:35 -07:00
vrana
5b6713f3c1 Allow revision action links using VS diff
Test Plan: Created action link using VS diff, selected VS diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2770
2012-06-15 20:12:50 -07:00
Jonathan Lomas
7629d44175 Strip non-integers out of task id entries
Test Plan: search in task ids for `t123, 456, pickles` (assuming 123 and 456 exist), and you will see 123 and 456 listed.  This is done in the buildQueryFromRequest function, so it would process a hand-written GET string just fine too.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T1365

Differential Revision: https://secure.phabricator.com/D2771
2012-06-15 17:38:49 -07:00
epriestley
957f9e2ec5 Add an administrative tool for deleting users
Summary:
Allow administrators to delete accounts if they jump through enough hoops.

Also remove bogus caption about usernames being uneditable since we let admins edit those too now.

Test Plan: Tried to delete myself. Deleted a non-myself user.

Reviewers: csilvers, vrana

Reviewed By: csilvers

CC: aran

Maniphest Tasks: T1184

Differential Revision: https://secure.phabricator.com/D2767
2012-06-15 17:02:20 -07:00
epriestley
31fcd78c76 Add "verified" or "unverified" to role output in user.query
Summary: See discussion in rP2f138d0501887fd0aca0f8536176f092880f662c.

Test Plan: Ran `user.query` on verified and unverified users.

Reviewers: csilvers, vrana

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2768
2012-06-15 17:00:26 -07:00
epriestley
14648d6d7a Provide more informative messages when autoclosing revisions
Summary: This has been a point of some confusion, make the messages more explicit.

Test Plan:
Added var_dump() stuff and ran on some commits:

  $ ./scripts/repository/reparse.php --message rP9fc54f4dfb61f7338cb1cfe819bc72d2a3404264
  Running 'PhabricatorRepositoryGitCommitMessageParserWorker'...
  string(58) "Closed by commit rP9fc54f4dfb61 (authored by @epriestley)."
  $ ./scripts/repository/reparse.php --message rP444c634b6c6612fc7b36ddffab8023ef67372ab9
  Running 'PhabricatorRepositoryGitCommitMessageParserWorker'...
  string(83) "Closed by commit rP444c634b6c66 (authored by Ben Rogers, committed by @epriestley)."
  $ ./scripts/repository/reparse.php --message rP22d12fe499e3ecb62392397f2ac2a91768c974aa
  Running 'PhabricatorRepositoryGitCommitMessageParserWorker'...
  string(52) "Closed by commit rP22d12fe499e3 (authored by vrana)."
  $ ./scripts/repository/reparse.php --message rPe51958159483cd0acf00adcff51edf8717b4a23b
  Running 'PhabricatorRepositoryGitCommitMessageParserWorker'...
  string(85) "Closed by commit rPe51958159483 (authored by David Fisher, committed by @epriestley)."

Reviewers: csilvers, vrana

Reviewed By: csilvers

CC: aran

Differential Revision: https://secure.phabricator.com/D2765
2012-06-15 17:00:08 -07:00
vrana
2f85be0243 Add 'description' to Diff dict 2012-06-15 16:16:03 -07:00
Evan Priestley
2ffc924fb5 Merge pull request #131 from floatingLomas/1305-filter-tasks-by-name
Add fulltext search to Maniphest custom query screen.
2012-06-15 16:10:32 -07:00
Jonathan Lomas
60da804d3d Add query limit of PHP_INT_MAX and handle the case where there are no fulltext results. 2012-06-15 15:42:31 -07:00
vrana
8a9da4b8d0 Add 'creationMethod' to Diff dict
Summary: We need it.

Test Plan: Ran 'differential.getdiff', saw it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2766
2012-06-15 15:30:19 -07:00
vrana
e9779b2db1 Bring back desciption to Maniphest attachment 2012-06-15 15:25:18 -07:00
vrana
ba9b4f5b66 Optimize SQL queries in differential.getdiff
Test Plan:
Verified that the method retuns the same output.
Verified the number of SQL queries.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2764
2012-06-15 15:15:23 -07:00
Jonathan Lomas
f91fc70b14 Add fulltext search to Maniphest custom query screen.
Summary: Allow fulltext search on custom query screen using the same fulltext search as the search page.

Test Plan: Enter search terms - with and without additional filters - see the expected results.  Don't enter search terms - with or without additional filters - and see the expected results.

Reviewers: epriestley

CC: aran, Korvin

Maniphest Tasks: T1305

Differential Revision: https://secure.phabricator.com/D2763
2012-06-15 14:57:15 -07:00
Ben Rogers
444c634b6c Allows branches to appear in diffusion with out triggering closing things from the commit message
Summary: Implemented it how it was suggested in ticket comments

Test Plan: create a revision in a branch, push that branch up, verify it's visible in diffusion and also that revision is not closed, then merge and push to master, verify that revision closed

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, 20after4

Maniphest Tasks: T1210

Differential Revision: https://secure.phabricator.com/D2706
2012-06-15 14:10:15 -07:00
vrana
22d12fe499 Mark 'closed' as translatable
Summary:
This is to allow conservative people to bring back the old manners.

NOTE: It doesn't mark all occurrences but I think that's good enough. We will eventually mark them all.

Test Plan: Translated 'closed', displayed closed revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, asukhachev

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D2760
2012-06-15 11:52:03 -07:00
vrana
9e3eb37a90 Use array_mergev() 2012-06-14 20:40:02 -07:00
vrana
48ebcf0679 Allow user override translation and implement PhutilPerson
Test Plan:
Altered database.
Wrote a custom translation and selected it in preferences.
Verified that the text is custom translated.
Set language back to default.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D2757
2012-06-14 18:33:00 -07:00
vrana
ec819c068c Delete methods unused since D2664 2012-06-14 18:23:47 -07:00
vrana
0acb7734cd Use pht()
Summary:
This is the first step in Phabricator internationalization.
It adds a translation selector and calls it at startup.
Installations can add custom selectors to override some texts.
We can add official translations in future.

Next step is to allow user to choose his translation which will override the global one.

This is currently used only for English plurals.

Test Plan: Displayed a diff with unit test error, verified that it says 'Detail' or 'Details' and not 'Detail(s)'.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1139

Differential Revision: https://secure.phabricator.com/D2753
2012-06-14 16:25:20 -07:00
vrana
892a2d1b61 Make Thread-Topic human readable
Summary:
Some e-mail clients display this header and it needs to be constant.

This is somehow involved but I doubt that there is a simpler solution.

Test Plan:
Applied SQL patch.
Commented on revision, commented on commit, changed package.
Verified that the `Thread-Topic` has constant and human readable value.

Reviewers: epriestley

Reviewed By: epriestley

CC: ola, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2745
2012-06-14 11:36:34 -07:00
Svemir Brkic
7463f9b3a9 Only get phid if project exists
Summary: If a project phriction page already exists, but object does not, avoid a fatal error.

Test Plan: See https://github.com/facebook/phabricator/issues/123

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2749
2012-06-14 10:43:17 -07:00
epriestley
2d7705ea30 Apply AMAZING DESIGN SKILLS to notification menu
Summary:
I am a fancy designer!

{F12665} {F12666}

Test Plan: Opened/closed menu. Viewed with-notification-count and without-notification count states.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran, chad, joe

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2735
2012-06-14 06:13:53 -07:00
epriestley
86040227b0 Improve Aphlict server
Summary:
  - Move to port 22280 by default.
  - Warn when running as non-root.
  - Allow subscription and publish/admin ports to be configured.
  - Allow server to drop root after binding to 843.
  - Allow log path to be configured.
  - Add /status/ admin URI which shows server status.
  - Return HTTP 400 Bad Request for other requests, instead of hanging.
  - Minor formatting cleanup.

Test Plan:
Ran without root:

  $ node aphlict_server.js

...got a good error message. Ran with --user:

  $ sudo node aphlict_server.js --user=epriestley

...verified server dropped permissions. Ran with --port / --admin. Hit /status/ with GET, got status. Hit other URLs with GET, got 400.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran

Differential Revision: https://secure.phabricator.com/D2737
2012-06-14 06:12:54 -07:00
epriestley
9a4243b4b3 Minor, fix MailImplementationTestAdapter constructor. See D2706. 2012-06-14 05:50:15 -07:00
David Fisher
e519581594 "Please Refresh" Notifications
Summary:
Based off D2704. Adds humane.js and a bit of plumbing. Currently does
not seem to load notification.css (which causes notifications not to display)
for reasons entirely opaque to me.

Test Plan:
tried locally. currently works except for the actual display due to
css loading difficulties

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2705
2012-06-13 17:28:58 -07:00
Alan Huang
d5e61f5250 Let the viewer collapse/expand individual files in a diff.
Summary:
Added a dropdown menu button and the keyboard shortcut 'h' to the
web diff view. These hide or show the annotated code display.

Test Plan:
Viewed an example diff that changed a large number of source files
and played around with keyboard shortcuts. Everything seemed to
work as expected.

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D2714
2012-06-13 16:52:42 -07:00
epriestley
d119b051e8 Add a basic notification UI element
Summary: This is //extremely// basic but dead simple and should cover us for v1, I think. Let me know what features you need.

Test Plan: Used UI example page.

Reviewers: allenjohnashton, ddfisher, keebuhm

Reviewed By: ddfisher

CC: aran, ender

Maniphest Tasks: T944

Differential Revision: https://secure.phabricator.com/D2732
2012-06-13 15:00:24 -07:00
epriestley
c868ec7d11 Extend ManiphestAction from ManiphestConstants, not PhrictionConstants
Summary: Bad copy/paste.

Test Plan: arc liberate

Reviewers: svemir, allenjohnashton

Reviewed By: svemir

CC: aran

Differential Revision: https://secure.phabricator.com/D2738
2012-06-13 14:41:43 -07:00
Espen Volden
726041584f Made it possible to login using LDAP
Summary: Made it possible to link and unlink LDAP accounts with  Phabricator accounts.

Test Plan:
I've tested this code locally and in production where I work.
I've tried creating an account from scratch by logging in with LDAP and linking and unlinking an LDAP account with an existing account. I've tried to associate the same LDAP account with different Phabricator accounts and it failed as expected.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, auduny, svemir

Maniphest Tasks: T742

Differential Revision: https://secure.phabricator.com/D2722
2012-06-13 08:58:46 -07:00
epriestley
d73a6d3dcd Fix username route for new "._-" usernames
Summary: We allow ".", "_" and "-" in usernames now, but not in the route.

Test Plan: Went to /p/.-_/, got 404'd at the route level before and now make it to the profile controller.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1348

Differential Revision: https://secure.phabricator.com/D2729
2012-06-13 08:39:02 -07:00
vrana
371419344a Revert D2542
Summary: Not required after D2730.

Test Plan: `arc diff` with invalid reviewer in commit message.

Reviewers: nh

Reviewed By: nh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2733
2012-06-12 17:33:10 -07:00
vrana
3718e49f9c Display link to change since last diff in Differential update e-mail
Test Plan: Updated revision, clicked on the link.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2731
2012-06-12 15:23:02 -07:00
epriestley
06371bc2cd Upgrade to GitHub v3 API
Summary: GitHub dropped support for the v2 API today, which breaks login and registration. Use the v3 API instead.

Test Plan: Registered and logged in with GitHub. Verified process pulled email/photo/name/username correctly.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2726
2012-06-12 12:13:27 -07:00
vrana
80de8c93c9 Stabilize Thread-Topic
Summary: NOTE: This can break current ongoing conversations.

Test Plan: Commented on a revision and checked the header in the e-mail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1340

Differential Revision: https://secure.phabricator.com/D2723
2012-06-12 10:58:41 -07:00
epriestley
375c921bb0 Minor, fix issue with defaults: wildcard and repeat default to array and may not have a different default. 2012-06-12 07:05:57 -07:00
vrana
2e484e257d Fix lint errors found by Nemo
Summary:
See also:

- https://github.com/tpyo/amazon-s3-php-class/pull/33
- https://github.com/stripe/stripe-php/pull/13

Test Plan: Ran a script analyzing sources by HPHP.

Reviewers: btrahan, jungejason, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2713
2012-06-11 19:09:42 -07:00
vrana
2793828795 Refactor setting e-mail subjects
Summary:
It seems that Outlook and Mail.app mostly ignores the threading headers and thread primarily by subject.
They are also very picky about the Re: part in the header.
I guess that's because users of these clients often hit Reply when they want to create a new message to the sender of an e-mail.

We need both of these applications to work with the same setting because we don't use multiplexing to prevent sending multiple e-mails to people in lists.
I also believe that the default behavior should just work in most setups.

I've tried several different combinations of putting "Re:" and none of them seems to always work in both clients.

This diff at least adds more abstraction to the code which should prevent copy/paste errors (two fixed by this diff!).

Test Plan: Sent several e-mails with varying subject, verified that they look as before in Outlook and Mail.app.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2709
2012-06-11 19:07:21 -07:00
David Fisher
f8f195b329 Make Notifications Realtime
Summary:
Adds the node.js Aphlict server, the flash Aphlict client, and some
supporting javascript. Built on top of - and requires - D2703 (which is still
in progress).  Will likely work with no modification on top of the final
version, though.

The node server is currently run with

   sudo node support/aphlict/server/aphlict_server.js

Test Plan: tested locally

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2704
2012-06-11 17:51:12 -07:00
Nick Harper
865680ad30 Don't throw an exception if the author of a tag can't be found
Summary:
It's possible to have a tag with no tagger (or git used to allow this),
so some tags (like 26791a8bcf0e6d33f43aef7682bdb555236d56de in the linux
kernel) were causing trouble.

Test Plan:
opened diffusion to a page where I was previously getting a red box complaining
about being unable to parse the output of git for-each-ref.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, vrana

Differential Revision: https://secure.phabricator.com/D2711
2012-06-11 16:53:52 -07:00
vrana
a0b57cefb7 Declare that revision was closed by committer, not author
Summary: D2703#13 is confusing - it looks like that @allenjohnashton took the action but it was @epriestley.

Test Plan: I don't have a repro so I tested this block standalone.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2707
2012-06-11 11:30:27 -07:00
vrana
11b3c6a4d5 Display e-mail preferences even if user can't change them
Test Plan: Displayed e-mail preferences with and without multiplexing.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2699
2012-06-11 09:51:36 -07:00
John-Ashton Allen
a11deec4d4 Adds the UI dropdown panel
Summary:
Add a dropdown to display notificaitons.  Right now
there is nothing real time about it, but we do update the panel
when the user clicks.  This panel is only displayed if the
install has notifications enabled and you have them enabled in
your preferences (not using them by default).

Test Plan: Turn off notifications for user1, left them on for user2.  Did things from user1 and from user2 on task both were cc'd on.  user2 recieved all notifications, user1 recieved nothing.  Made new user, made sure everything was switched off by default.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: keebuhm, ddfisher, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2703
2012-06-11 09:42:55 -07:00
David Fisher
a57f5d1562 fixed overlong differential feed story titles
Summary:
Previously, the comment and/or summary would be added to the title. This
is incorrect behavior.

Test Plan: observed change

Reviewers: epriestley

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2701
2012-06-10 17:38:30 -07:00
John-Ashton Allen
1f3b058daa Implemented fallback for unimplemented notifications with silly message.
Summary:
Most notifications are not implemented, a fallback message should
be displayed for these cases.

Test Plan: Commented out renderNotificationView in PhabricatorFeedStoryManiphest and watched the notifications render.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: ddfisher, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2700
2012-06-08 20:25:00 -07:00
epriestley
b695558223 Minor, remove abstract method until subclasses implement it. 2012-06-08 19:47:02 -07:00
epriestley
4d6df7dc14 Minor, fix insertNotifications() for unmigrated callsites. See discussion in rP3a6ee79190b709d84ff79865d1c1d6234e5c102a. 2012-06-08 19:16:31 -07:00
Keebuhm Park
284d7b6a46 Minor fixes to maniphest feed/notification
Summary:
Added `renderNotificationView()` abstract function to `PhabricatorFeedStory` base class.
Fixed duplicate line in `PhabricatorFeedStoryManiphest` class.
Fixed spacing/formatting in `ManiphestTransactionEditor`.

Test Plan: No functional changes

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: allenjohnashton, ddfisher, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2698
2012-06-08 19:11:53 -07:00
Keebuhm Park
c67f45734d Notification implementation for Differential
Summary: The notification implementation has been extended to Differential. Appropriate changes have been made to the Differential editors and Differential feed story.

Test Plan: Tested out various actions available for Differential and confirmed that the notifications get delivered correctly and feed is generated.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: allenjohnashton, ddfisher, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2696
2012-06-08 18:45:40 -07:00
Keebuhm Park
be0e16ff7d Fixed losing full size feed for maniphest task creation
Summary: After D2571, feed for maniphest task creation was being generated non-full-size. Fixed this by properly getting the maniphest action from story data.

Test Plan: Feed seems to work fine and the feed for task creation is full-sized.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: allenjohnashton, ddfisher, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2691
2012-06-08 14:31:10 -07:00
Keebuhm Park
d90a6cfbd1 Move files in notification one level up.
Summary: Moved the files in notification one level up to match the rest of code base. And ran arc liberate.

Test Plan: Made sure __phutil_library_map__ points to the right files.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: allenjohnashton, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2688
2012-06-08 13:00:42 -07:00
macvicar
1d94d49c17 [elasticsearch] Add timeout to API calls
Summary:
Default of 300 seconds is more than likely too much in most cases.
Provide the option to override.

Test Plan:
Blocked ElasticSearch with iptables
Set timeout to 5 seconds and make sure we error early

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2678
2012-06-08 12:16:49 -07:00
John-Ashton Allen
ec37ce3db7 Add more detailed story actions for maniphest.
Summary:
TransactionType gives us more information than
update, open, close, assign.  We can display those in feed/notifications along with and comments on the actions.

Test Plan: did on local machine tested out.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: ddfisher, keebuhm, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2683
2012-06-08 11:28:49 -07:00
vrana
e962ad97fe Switch lint and unit fields in revision
Summary: D809#6

Test Plan: Displayed revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2682
2012-06-08 09:10:25 -07:00
John-Ashton Allen
3a6ee79190 Adds base notification application
Summary: First diff in a series of diffs to add notifications to Phabricator. This is the notification application ONLY. This commit does not include the changes to other applications that makes them add notifications. As such, no notifications will be generated beyond the initial database import.

Test Plan: This is part of the notifications architecture which has been running on http://theoryphabricator.com for the past several months.

Reviewers: epriestley, btrahan, ddfisher

Reviewed By: epriestley

CC: allenjohnashton, keebuhm, aran, Korvin, jungejason, nh

Maniphest Tasks: T974

Differential Revision: https://secure.phabricator.com/D2571
2012-06-08 06:32:02 -07:00
vrana
692296a4d4 Add newline to Differential review request e-mail 2012-06-07 23:59:45 -07:00
vrana
5752faecce Display Arcanist project in Differential e-mails
Summary:
I need this information quite often.
I don't know how many people are working on a single project and this information will be useless for them but I guess it won't hurt much?

Test Plan: Commented on accepted revision.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2674
2012-06-07 23:16:23 -07:00
vrana
bed3a9817b Merge author and committer
Summary: These columns holds the same value in most cases which irritates me.

Test Plan: Displayed history with same author and committer, emulated different committer.

Reviewers: hsb, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2671
2012-06-07 17:33:34 -07:00