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

536 commits

Author SHA1 Message Date
Ryan McElroy
846d625ed0 [differential] gmail-compatible emails
Summary:
Gmail ignores text inside of [square brackets] when deciding what to group
together. This diff does two things to create the right behavior for gmail:

  1. put the verb text inside of [square brackets] so different verbs don't
  break gmail threading.
  2. Add the Diff ID to the email thread, so different diffs with the same name
  don't group together.

Furthermore, to aid in distinguishing who is doing what when the from field
can't be spoofed, this diff adds the usename just before the verb. This works
quite well in the english language. For example:

  [Differential] [rm requested a review of] D1: [admin] Create arcconfig for
code reviews
  [Differential] [rm commented on] D1: [admin] Create arcconfig for code reviews

It's almost like a complete sentence. All it's missing is a period.

Test Plan:
Did it live on my test setup. Received emails with subjects that looked right.
Verified that gmail grouped the emails despite the different actions taking
place (tested: comments, planned changes, request review).

Reviewed By: epriestley
Reviewers: epriestley, jungejason
CC: aran, epriestley, rm
Differential Revision: 251
2011-05-08 02:04:16 -07:00
tuomaspelkonen
1c2222f26f Revert "Make DifferentialChangesetParser explicitly map display to storage for comments"
This reverts commit a0af5b6643.
2011-05-06 18:32:28 -07:00
epriestley
1ed915aef2 Detect edits which don't actually change projects in Maniphest tasks
Summary:
Be smarter about detecting when projects haven't actually changed so we don't
create silly transactions which just reorder them or change (entirely arbitrary)
dictionary keys.

Test Plan:
Edited a task with several projects and swapped their order, didn't get a bogus
project transaction.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: anjali, sandra, aran, tuomaspelkonen, epriestley
Differential Revision: 249
2011-05-06 18:10:53 -07:00
epriestley
870f4bfe73 Fix GitHub OAuth Registration for users without a name
Summary:
Github allows you to have an account without a real name. The OAuth controller
actually handles this fine, mostly, except that it calls a bogus method. Also
there is some null vs empty string confusion.

Test Plan:
Deleted my name on Github and then registered for an account on Phabricator.

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, aran
CC: anjali, aran, tuomaspelkonen
Differential Revision: 247
2011-05-06 18:09:44 -07:00
epriestley
4e70c434fd Fix Maniphest fatal when editing a task without changing anything
Summary:
Transaction editor attempted to do things with an empty transaction array, just
skip editing ops if nothing changed.

Test Plan:
Edited a Maniphest task without changing anything.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: sandra, anjali, aran, tuomaspelkonen
Differential Revision: 248
2011-05-06 18:01:00 -07:00
epriestley
a0af5b6643 Make DifferentialChangesetParser explicitly map display to storage for comments
Summary:
This is a followup to D228. Basically, we use "changeset" (and, implicitly,
changesetID) for way too much stuff now.

One thing it can't possibly capture is the complete, arbitrary mapping between
the left and right sides of the displayed diff and the places we want to store
the left and right side comments. This causes a bunch of bugs; basically adding
inline comments is completely broken in diff-of-diff views prior to this patch.
Make this mapping explicit.

Note that the renderer already passes this mapping to
DifferentialChangesetParser which is why there are no changes outside this file,
I just didn't finish the implementation during the port.

This has the nice side-effect of fixing T132 and several other bugs.

Test Plan:
Made new-file and old-file comments on a normal diff; reloaded page, verified
comments didn't do anything crazy.

Expanded text on a normal diff, made new-file and old-file comments; reloaded
page, verified comments.

Repeated these steps for a previous diff in the same revision; verified
comments.

Loaded diff-of-diffs and verified expected comments appeared. Made new left and
right hand side comments, which almost work, see below.

NOTE: There is still a bug where comments made in the left-display-side of a
diff-of-diffs will incorrectly be written to the right-storage-side of the
right-display-side diff. However, this is an issue with the JS (the PHP is
correct) so I want to pull it out of scope for this patch since I think I need
to fix some other JS stuff too and this improves the overall state of the world
even if not everything is fixed.

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, aran, ola
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 237
2011-05-06 15:01:52 -07:00
epriestley
dd8232b766 Hint 'arc' commands in Differential UI
Summary:
Point users toward 'arc amend', 'arc commit', 'arc patch' and 'arc export' since
no one is going to read 'arc help'.

There's kind of a tradeoff here where we're wasting a fair amount of UI space
for expert users with the patch/export hints but I think it's probably okay
since there's really no other way to figure out that these features exist.

Note that the "export" command given isn't complete (it needs --git or
--unified), but it will give you a useful error message when you run it, telling
you to specify --git or --unified. If it turns out users get confused by this,
let me know.

Test Plan:
Loaded a revision and looked at it. Faked it into 'accepted' status.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, aran, jungejason
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 242
2011-05-06 13:59:45 -07:00
epriestley
7ebd0d1efe Provide a web interface to view raw source text in Differential
Summary:
Add links to the 'standalone view' to grab the raw source text. I think this
operation is rare enough that it's okay to hide it like this. I changed
'Standalone View' to 'View Standalone / Raw' to improve discoverability.

This also fixes the broken Standalone View links in Diffusion by no longer
rendering them.

Test Plan:
viewed old and new sources for a changeset

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran, tuomaspelkonen
Differential Revision: 243
2011-05-06 13:36:59 -07:00
epriestley
7566f50d8f Enable prefilling of some Maniphest fields in task creation
Summary:
This came up in discussions with both ccheever and fratrik so I prototyped a
"send screenshot to maniphest" feature, which needs this:

https://www.facebook.com/video/video.php?v=892599296749

Test Plan:
Sent screenshot to maniphest.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: ccheever, fratrik, aran, epriestley
Differential Revision: 240
2011-05-06 10:55:30 -07:00
tuomaspelkonen
ebbd57771f Missing optional Conduit arguments do not throw errors anymore.
Summary:
ConduitAPIRequest::getValue call for optional arguments which are
not given added a line to the error log file.

Test Plan:
Tested that Conduit API calls were working from Conduit console.

Reviewed By: epriestley
Reviewers: jungejason, epriestley
Commenters: jungejason
CC: epriestley, aran, jungejason
Differential Revision: 236
2011-05-05 19:09:19 -07:00
epriestley
25dee6ecd2 Support email replies in Phabricator
Summary:
Provides support for per-user x per-object unique reply-to email addresses, plus
SMTP integration.

This does not actually make Phabricator use these in outbound email.

Test Plan:
Used test console to validate in-Phabricator routing and handling.

Piped emails into the "mail_handler.php" script to validate mail parsing.

Configured sendmail and sent mail to Phabricator.

Technically I haven't conducted all parts of this test on the same machine since
I lost the will to configure more SMTP servers after configuring phabricator.com

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 226
2011-05-05 14:58:57 -07:00
epriestley
19b23e2dd0 Fix repository deletion
Summary:
I never actually wrote this controller.

Test Plan:
Deleted a repository via web UI.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
Commenters: aran
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 231
2011-05-05 13:01:45 -07:00
epriestley
af06bfb1cc Make Changeset ID for render cache explicit
Summary:
DifferentialChangesetParser currently takes the Changeset object to mean a bunch
of different and mutually conflicting things implicitly:

  - Changeset ID is used to access the render cache.
  - Changeset ID is also used to tell the ajax endpoint what to render when
clicking "show more".
  - Changeset object has the actual changes.
  - Changeset ID and "oldChangesetID" are used to choose where to show inline
comments and how to attach new ones.

This indirectly causes a bunch of problems, like T141 and T132. Move toward
making all these separate things explicit. I want to have the changeset object
only mean the actual changes to display.

Test Plan:
Looked at changesets and verified the render cache was accessed correctly (and
not accessed in other cases).

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, tuomaspelkonen
Differential Revision: 228
2011-05-05 11:12:50 -07:00
epriestley
85b09c5ccb Make "Ignore All" the default whitespace mode
Summary:
This mode was fixed in D174 by grglr and is the best mode for almost all changes
once nonbroken, so make it the default.

This is also the mode which takes advantage of the render cache.

Test Plan:
Loaded a revision, got "Ignore All" as the default mode, and revision rendering
wasn't silly/broken.

Reviewed By: tuomaspelkonen
Reviewers: grglr, jungejason, tuomaspelkonen, aran
CC: aran, tuomaspelkonen
Differential Revision: 229
2011-05-05 11:12:09 -07:00
epriestley
7eefbfaa51 Add <tr /> tags to Maniphest task summary tables
Summary:
That's not how tables work!

Test Plan:
Load maniphest, do not receive a zillion console warnings in Safari.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 227
2011-05-05 11:05:07 -07:00
epriestley
03ebbccbc9 Restore image proxying to Remarkup
Summary:
Previously, Remarkup allowed you to paste in an image URI and get an inline
image. However, it did this by hotlinking the image which isn't so hot in an
open source product.

Restore this feature, but use image proxying instead. The existing image macro
code does most of the work.

There is a mild security risk depending on the network setup so I've left this
default-disabled and made a note about it. It should be safe to enable for
Facebook.

Test Plan:
Pasted in image and non-image links, got reasonable behavior. Verified proxying
appears to work. Verified that file:// shenanigans produce 400.

Reviewed By: tuomaspelkonen
Reviewers: aran, jungejason, tuomaspelkonen
Commenters: cpiro
CC: aran, cpiro, tuomaspelkonen
Differential Revision: 214
2011-05-03 18:49:06 -07:00
epriestley
b75960c578 Web editor/browser for image macros
Summary:
Restores the old "pokedex" feature and allows easy definition of new macros.

Only good can come of this!

Critical feature!!

Test Plan:
nyancat

Reviewed By: tuomaspelkonen
Reviewers: aran, bh, tomo, jungejason, tuomaspelkonen
CC: aran, tuomaspelkonen
Differential Revision: 220
2011-05-03 15:50:40 -07:00
elynde
72dec7cd25 Faster Query for Differential Updates
Summary:
The old query was effectively

SELECT DISTINCT revision.* FROM `differential_revision` revision
        JOIN `differential_relationship` relationship ON
(relationship.revisionID = revision.id
            AND relationship.objectPHID in
('PHID-USER-a113b9ae4ee9524d0a20'))
          OR revision.authorPHID = 'PHID-USER-a113b9ae4ee9524d0a20'
        LEFT JOIN `differential_viewtime` viewtime ON
viewtime.viewerPHID in ('PHID-USER-a113b9ae4ee9524d0a20')
          AND viewtime.objectPHID = revision.phid
          AND GREATEST(1304022277, IFNULL(viewtime.viewTime, 0)) <
revision.dateModified
        ORDER BY dateModified DESC;

I'm not a db performance expert but it looks like the problem is that we
have to scan all revisions

  mysql> EXPLAIN SELECT DISTINCT revision.* FROM `differential_revision`
revision         JOIN `differential_relationship` relationship ON
(relationship.revisionID = revision.id             AND relationship.objectPHID
in ('PHID-USER-a113b9ae4ee9524d0a20'))           OR revision.authorPHID =
'PHID-USER-a113b9ae4ee9524d0a20'         LEFT JOIN `differential_viewtime`
viewtime ON viewtime.viewerPHID in ('PHID-USER-a113b9ae4ee9524d0a20')
AND viewtime.objectPHID = revision.phid           AND GREATEST(1304022277,
IFNULL(viewtime.viewTime, 0)) < revision.dateModified         ORDER BY
dateModified DESC;

+----+-------------+--------------+-------+--------------------+------------+---------+-------+--------+------------------------------------+
  | id | select_type | table        | type  | possible_keys      | key        |
key_len | ref   | rows   | Extra                              |

+----+-------------+--------------+-------+--------------------+------------+---------+-------+--------+------------------------------------+
  |  1 | SIMPLE      | revision     | ALL   | PRIMARY,authorPHID | NULL       |
NULL    | NULL  | 254127 | Using temporary; Using filesort    |
  |  1 | SIMPLE      | viewtime     | ref   | PRIMARY            | PRIMARY    |
66      | const |     17 | Distinct                           |
  |  1 | SIMPLE      | relationship | index | PRIMARY,objectPHID | objectPHID |
72      | NULL  | 966900 | Using where; Using index; Distinct |

+----+-------------+--------------+-------+--------------------+------------+---------+-------+--------+------------------------------------+

The new query is a lot faster

  mysql> EXPLAIN SELECT revs.* FROM ( (SELECT revision.* FROM
`differential_revision` revision WHERE revision.authorPHID in
('PHID-USER-a113b9ae4ee9524d0a20'))       UNION       (SELECT revision.* FROM
`differential_revision` revision JOIN differential_relationship rel WHERE
rel.revisionId = revision.Id AND rel.objectPHID =
'PHID-USER-a113b9ae4ee9524d0a20')) as revs     LEFT JOIN `differential_viewtime`
viewtime ON viewtime.viewerPHID = 'PHID-USER-a113b9ae4ee9524d0a20' AND
viewtime.objectPHID = revs.phid    WHERE GREATEST(1304022277,
IFNULL(viewtime.viewTime, 0)) < revs.dateModified   ORDER BY revs.dateModified;

+----+--------------+------------+--------+--------------------+------------+---------+-----------------------------------------+------+--------------------------+
  | id | select_type  | table      | type   | possible_keys      | key        |
key_len | ref                                     | rows | Extra
   |

+----+--------------+------------+--------+--------------------+------------+---------+-----------------------------------------+------+--------------------------+
  |  1 | PRIMARY      | <derived2> | ALL    | NULL               | NULL       |
NULL    | NULL                                    | 3021 | Using filesort
   |
  |  1 | PRIMARY      | viewtime   | ref    | PRIMARY            | PRIMARY    |
66      | const                                   |   17 | Using where
   |
  |  2 | DERIVED      | revision   | ref    | authorPHID         | authorPHID |
67      |                                         | 1040 | Using where
   |
  |  3 | UNION        | rel        | ref    | PRIMARY,objectPHID | objectPHID |
66      |                                         | 3822 | Using where; Using
index |
  |  3 | UNION        | revision   | eq_ref | PRIMARY            | PRIMARY    |
4       | phabricator_differential.rel.revisionID |    1 |
   |
  | NULL | UNION RESULT | <union2,3> | ALL    | NULL               | NULL
| NULL    | NULL                                    | NULL |
     |

+----+--------------+------------+--------+--------------------+------------+---------+-----------------------------------------+------+--------------------------+

Test Plan:
Loaded differential updates with new query, made sure page loaded quickly. Ran
the query from the command-line, it took about .4 seconds.

Reviewed By: Girish
Reviewers: tuomaspelkonen, jungejason, Girish
Commenters: btrahan
CC: aran, btrahan, elynde, Girish
Differential Revision: 181
2011-05-03 15:00:46 -07:00
elynde
2e96565f67 Faster 'All Revisions and Reviews' Query
Summary:
The 'All Revisions and Reviews' Query takes about 2 seconds when I run
it from the mysql command-line:

SELECT revision.*
FROM `differential_revision` revision LEFT JOIN
`differential_relationship` relationship
ON revision.id = relationship.revisionID
AND relationship.relation = 'revw'
WHERE revision.authorPHID in ('PHID-USER-a113b9ae4ee9524d0a20') OR
relationship.objectPHID in ('PHID-USER-a113b9ae4ee9524d0a20')
GROUP BY revision.id ORDER BY dateModified DESC

2419 rows in set (2.05 sec)

This takes about 0.1-0.2 seconds. Just dug into this because I guess
phabricator is haven't a bunch of mysql timeouts.

I don't know what the hell I'm doing; this is just faster

Test Plan:
Loaded 'All Revisions and Reviews' in sandbox

  http://phabricator.dev1577.snc6.facebook.com/differential/filter/related/

Made sure it had same results as the version in prod

  https://phabricator.fb.com/differential/filter/related/

Still slow to generate all that html

Reviewed By: epriestley
Reviewers: epriestley, aran, tuomaspelkonen, jungejason
CC: aran, epriestley
Differential Revision: 182
2011-05-03 11:51:03 -07:00
epriestley
6229cdadd8 Improve web tools for viewing daemons
Summary:
- Provides an "all daemons" view to look at more than the first 15 daemons.
  - Provides a "combined log" view with a large page size, to quickly look at
the log across all the daemons, making it easier to find issues when you have a
bunch of the same daemon and only one is having issues.
  - When viewing the web console on the same host as a daemon, show whether it's
running or not.

Test Plan:
Clicked the various daemon log interfaces.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran
Differential Revision: 215
2011-05-03 06:38:12 -07:00
epriestley
8370f93048 Make X-Herald-Rules header sticky
Summary:
This isn't terribly elegant but it solves the problem without loss of
generality. We can pursue a more finessed solution later if it seems prudent.

Test Plan:
Created a revision matched by a blanket herald rule, and then commented on it.
Comment email had X-Herald-Rules header in it.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran
Differential Revision: 218
2011-05-03 06:06:57 -07:00
tuomaspelkonen
8c031db32b Added a link from a diff view to diff's revision if there is one.
Summary:
The diff view page should point to the revision, if the diff has
already been attached to one. The form to select the revision was also
removed in this case.

Let's me know if it should be possible to reattach a diff to a different
revision.

Test Plan:
Tested that a new diff created with '--preview' option was not attached to
any revision. After attaching the diff manually, made sure that the diff view
page
showed the link to the revision correctly.

Reviewed By: epriestley
Reviewers: jungejason, epriestley
CC: aran, epriestley
Differential Revision: 216
2011-05-02 18:34:33 -07:00
epriestley
fc2a2a8d09 Enable Pygments in actual source list renders
Summary:
I only actually enabled it in Remarkup previously.

Test Plan:
Created a python diff, got syntax highlighted.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran, epriestley
Differential Revision: 202
2011-05-02 14:26:24 -07:00
epriestley
59cd14bc61 Add a pager to "Files"
Summary:
Adds a pager control to the "Files" tool so you can page through files if there
are >100.

Test Plan:
Set page size to a smaller number, paged through files.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran
Differential Revision: 211
2011-05-02 13:39:46 -07:00
jungejason
c728e4f7da Open database connection with 'w' instead of 'r' for writing
Summary:
there are several places we open an 'r' connection but use it
for writing. Fix them.

Test Plan:
ran parse_one_commit.php against one revision which executes
the code with problem. It used to throw exception. Now it works fine.

Reviewed By: Girish
Reviewers: tuomaspelkonen, Girish
Commenters: aran
CC: aran, Girish
Differential Revision: 213
2011-05-02 13:31:12 -07:00
epriestley
6bec3d2e4f Simplify and demuddle MetaMTA send pathways
Summary:
I pretty shortsightedly made sending a side effect of save() in the case that a
server is configured for immediate sending. Move this out, make it explicit, and
get rid of all the tangles surrounding it.

The web tool now ignores the server setting and only repsects the checkbox,
which makes far more sense.

Test Plan:
Sent mails from Maniphest, Differential, and the web console. Also ran all the
unit tests. Verified headers from Maniphest.

Reviewed By: rm
Reviewers: aran, rm
CC: tuomaspelkonen, rm, jungejason, aran
Differential Revision: 200
2011-05-02 03:07:30 -07:00
epriestley
2f96095014 Use %s and %b in GitCommitMessageParserWorker, not %B
Summary:
See T129, some older git doesn't have %B and we can reasonably fake it with %s
and %b.

Test Plan:
Reparsed all of the Phabricator repository with this worker, commit messages
look fine.

Reviewed By: rm
Reviewers: rm, aran, jungejason, tuomaspelkonen
CC: aran, rm
Differential Revision: 209
2011-05-02 01:26:18 -07:00
epriestley
260b40b84a Plug the establishConnection() Lisk isolation hole
Summary:
Currently you can still punch through Lisk isolation by calling
establishConnection(), and we do that all over the place. Rename getConnection()
to establishConnection() so that all existing callers are safe, and rename
establishConnection() to establishLiveConnection() so that it's not surprising
when this fails to stub in unit tests.

Not wedded to the name if anyone thinks "establishExternalConnection" or
something is clearer.

Test Plan:
Loaded site, browsed around, ran unit tests.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran
Differential Revision: 201
2011-05-01 08:05:02 -07:00
epriestley
72e33c9e5a Fix a threading issue with Amazon SES
Summary:
Amazon SES does not allow us to set a Message-ID header, which means
that threads are incorrect in Mail.app (and presumably other applications
which respect In-Reply-To and References) because the initial email does not
have anything which attaches it to the rest of the thread. To fix this, never
rely on Message-ID if the mailer doesn't support Message-ID.

(In the Amazon SES case, Amazon generates its own Message-ID which we can't
know ahead of time).

I additionally used all the Lisk isolation from the other tests to make this
testable and wrote tests for it.

I also moved the idea of a thread ID lower in the stack and out of
DifferentialMail, which should not be responsible for implementation details.

NOTE: If you push this, it will cause a one-time break of threading for
everyone using Outlook since I've changed the seed for generating Thread-Index.
I feel like this is okay to avoid introducing more complexity here.

Test Plan:
Created and then updated a revision, messages delivered over Amazon
SES threaded correctly in Mail.app. Verified headers. Unit tests.

Reviewed By: rm
Reviewers: aran, tuomaspelkonen, jungejason, rm
Commenters: aran
CC: aran, rm, epriestley
Differential Revision: 195
2011-04-30 22:26:07 -07:00
epriestley
0e06cd85b7 Pygments support for Phabricator
Summary:
Thread a config option through, see D197.

Test Plan:
Source code gets highlighted.

Reviewed By: aran
Reviewers: aran, tomo, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 198
2011-04-30 22:01:02 -07:00
epriestley
b3397030e6 Fix Differential "unsubscribe" so it properly blocks resubscription
Summary:
DifferentialRevision stores this field as a dictionary but the
Editor incorrectly passed it to Herald as a raw value array. Ideally the
property should be called unsubscribedDict or something but I'm increasingly
thinking we're going to centralize subscriptions for Adjutant or some similar
system so I'm disinclined to pursue the schema change just yet. I provided an
explicit raw-value-oriented API, at least.

Test Plan:
With two accounts, A and B: created universal Herald CC rule with
user B, created a revision with user A, had user B unsubscribe, had user A
update the revision. User B was not resubscribed.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: ola, aran, epriestley
Differential Revision: 188
2011-04-29 22:31:51 -07:00
epriestley
864e0d8a2f Fix XSS hole in inline comment editing
Summary:
Thanks to erling for the report. This was XSSable, although you could
only get yourself.

Test Plan:
Made a comment like "</textarea><h1>" and edited it before and after
the patch. Proper behavior with this patch.

Reviewed By: aran
Reviewers: erling, jungejason, tuomaspelkonen, aran
CC: aran
Differential Revision: 187
2011-04-29 20:27:25 -07:00
epriestley
78d33b1771 Silence an undeclared variable warning
Summary:
If you don't have a custom renderer, this variable does not get set
and emits a warning when you try to read it.

Test Plan:
Loaded page before and after change, warnings went away (lines
145 and 154 in old file).

Reviewed By: aran
Reviewers: tuomaspelkonen, aran
CC: jungejason, aran, epriestley
Differential Revision: 186
2011-04-29 20:27:02 -07:00
adonohue
c2893d8670 Hook for database configuration plugin
Summary:
This permits individual deployments to better configure their
database configuration, e.g. to allow more dynamic configuration that reacts
to database moves or master/slave replication.

Test Plan:
Browse

Reviewed By: epriestley
Reviewers: Girish, epriestley
CC: aran, epriestley
Differential Revision: 183
2011-04-29 19:41:16 -07:00
grglr
3f3304fd61 Differential whitespace mode IGNORE ALL now shows correct indentation
Summary:
Fixed buggy and incomplete logic for handling IGNORE ALL mode properly.
A subparser is used to parse the non-ws-ignoring changeset while a
ws-ignoring changeset is handed off to the original parser.  At a later
step, the original parser queries the subparser for its lines of text
(which are formatted properly due to being in non-ws-ignoring mode) and
uses them to replace the text in the ws-ignoring diff.

Task ID: 549940

Test Plan:
-turn off caching temporarily (the cached view is still indented
improperly)
-visit http://phabricator.dev1943.facebook.com/D242591
-note aligned, but not completely highlighted, indentation right above the
comments complaining about
indentation issues

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran
Commenters: epriestley
CC: aran, epriestley, grglr
Differential Revision: 174
2011-04-28 16:10:59 -07:00
gpatangay
4a2981252f [phabricator] Add mysql slave and read-only database connections
Summary:
Add ability to define mysql slaves and then use that connection on 'r'
connection modes. 'w' connections go to the master server.

Test Plan:
- php -l and checkModule
 - worked in my devbox

Reviewed By: jungejason
Reviewers: dpepper, tuomaspelkonen, jungejason
CC: jungejason, aran
Revert Plan:
sure

Differential Revision: 175
2011-04-28 15:27:19 -07:00
elynde
6fb24ba4a4 Merge branch 'master' of github.com:facebook/phabricator 2011-04-28 14:45:30 -07:00
elynde
bd0a4c0d04 Differential Updates View
Summary:
This adds a new view to differential called Updates.

The high-level goal of Updates is to enabled differential to be
effectively used without email notifications. I've tried doing things
like automatically deleting differential emails where I'm in the 'to'
line since they show up on the main diffential page but then there's
always the chance an important diff flies by without me seeing it. Also,
sometimes someone comments on a diff post-commit but differential
doesn't surface those diffs.

I re-created a test db on my devserver using mysqldump to get data on
revs > 230000 so I would have some test data. We need to add a simple
viewtime table but I didn't want to do that in production. Here's the
table:

  CREATE TABLE differential_viewtime (
    viewerPHID varchar(64) not null,
    objectPHID varchar(64) not null,
    viewTime int unsigned not null,
    PRIMARY KEY (viewerPHID, objectPHID)
  );

Issues:
  -Once we turn this on, all diffs will be 'unviewed'. What do you think
about a 'Clear All' button or something?
  -Maybe we should add a pager

This feature would be insanely useful, let me know what you think.

Test Plan:
Loaded Updates in my sandbox

  http://phabricator.dev1577.snc6.facebook.com/differential/filter/updates/

Clicked a diff, then went back, made sure diff disappeared from Updates
list

Reviewed By: tuomaspelkonen
Reviewers: epriestley, jungejason, tuomaspelkonen
Commenters: epriestley
CC: epriestley, elynde, tuomaspelkonen
Differential Revision: 169
2011-04-28 14:40:41 -07:00
adonohue
f910c379ce Modify whitespace default implementation
Summary:
Take Tuomas's first diff. Sorry, my bad on diff feedback.

Test Plan:
Load D240353 without any options and make sure 'ignore-trailing'
selected.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen
CC: epriestley, aran, tuomaspelkonen
Differential Revision: 172
2011-04-28 09:22:02 -07:00
tuomaspelkonen
2b0b39c4e4 Differential defaults to 'ignore-trailing' until indentation issues are solved.
Summary:
'ignore-all' is very confusing, especially for Python, because the indentation
is incorrect.

Test Plan:
Tested loading D240353 without any options and made sure 'ignore-trailing' was
selected and the diff looked correct.

Reviewed By: aran
Reviewers: jungejason, simpkins, aran, dpepper
Commenters: dpepper
CC: grglr, aran, dpepper, tuomaspelkonen
Differential Revision: 171
2011-04-27 18:55:46 -07:00
jungejason
ad4a497355 Enable differential.find handle empty input.
Summary:
return empty array when the query input is empty.

Test Plan:
send empty input.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen
CC: tuomaspelkonen
Differential Revision: 167
2011-04-26 23:59:40 -07:00
jungejason
a9e2e51b98 Enable updating task->revision assoc
Summary: add a conduit method to enable querying revisions' phid from
their revision_IDs, and another one to update the task->revision assoc.

Test Plan: for querying revision_phid method, tested empty, one, and two
revisions in the query. For the one to update the task->revision assoc,
I have another diff in facebook which verified it add and remove assoc
correctly.

Reviewers: tuomaspelkonen, epriestley

CC:

Differential Revision: 165
2011-04-26 19:14:47 -07:00
tuomaspelkonen
afedb711d9 Added commit information to 'getrevision' conduit call.
Summary:
differential.getrevision now returns commits for a given revision.
URI is also return in differential.getrevision.

Test Plan:
Tested from Conduit Console UI that the calls were working
correctly.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, simpkins, dpepper, jungejason
Differential Revision: 163
2011-04-25 15:32:33 -07:00
tuomaspelkonen
6a0234fed3 Added differential revision reviewers information to differential.getrevision
conduit call.

Summary:
The reviewer information was not available for revisions before this.

Test Plan:
Tested with Conduit Console that correct reviewers were returned.

Reviewed By: jungejason
Reviewers: jungejason
Commenters: epriestley
CC: epriestley, tuomaspelkonen, jungejason
Differential Revision: 160
2011-04-25 15:02:35 -07:00
tuomaspelkonen
9367c41a28 Tasks can be defined in the commit message (Phabricator part).
Summary:
Phabricator did not support giving the task ids in the commit message.
Currently there is no default implementation for this, but there is a
Facebook specific implementation. At some point default implementation
for Maniphest tasks to revisions will be added.

Test Plan:
Tested with the Facebook specific implementation that task ids are
recognized in the commit message and tasks are automatically attached
to revisions.

The task attached to this revision was added from the commit message.

Reviewed By: jungejason
Reviewers: jungejason, epriestley
CC: dpepper, edward, gpatangay, tuomaspelkonen, jungejason
Differential Revision: 240996
2011-04-22 18:40:16 -07:00
Aizat Faiz
74777227a3 Merge branch 'master' of github.com:facebook/phabricator 2011-04-21 17:23:57 -07:00
Aizat Faiz
a8296c5a54 Display file name in <title> for easier browsing of code
Summary:
Having the filename in the <title> will make it easier to browse through many
many tabs of diffusion

Test Plan:
Open up a file or directory in diffusion and ensure that it shows only the file
name.

Reviewed By: tuomaspelkonen
Reviewers: epriestley, tuomaspelkonen, jungejason
Commenters: epriestley
CC: epriestley, aizatto, tuomaspelkonen
Differential Revision: 150
2011-04-21 17:22:47 -07:00
Adam Simpkins
d4576262db add a getrevision conduit method
Summary:
Add a method to get the information about a revision, including its full
list of diffs.

We could add an option to just return the diff IDs if we wanted.  For my
use case, I need the full set of information for each diff, so fewer
round trips is better.  This is also how the old json.php page used to
work.

Test Plan:
Tuomas tested it in his sandbox.

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, epriestley
CC: tuomaspelkonen
Differential Revision: 156
2011-04-20 21:02:32 -07:00
bhiller
dbb01cfe63 Merge branch 'master' of github.com:facebook/phabricator 2011-04-20 18:51:58 -07:00
bhiller
15e71e9bf4 [differential] Prevent un-closeable overlay
Summary:
Currently if I go to leave an inline comment and then decide
against it and hit <tab>-<enter>, the inline comment edit dialog closes
but the overlay doesn't disappear due to a JS error around trying to
access the markup property of null. This fixes that by setting the
payload to an array with empty markup so that the JS works and the
overlay disappears.

Test Plan:
clicked on the line number column, then pressed ok and
confirmed the dialog closed, the overlay disappeared and there were no
JS errors. also tested that for clicking the reply link and when editing
an existing inline comment.

Reviewed By: aran
Reviewers: epriestley, aran
CC: aran, bh
Revert Plan:
OK

Differential Revision: 154
2011-04-20 18:50:57 -07:00
leon
dcb2e43960 Removing reordering code that wasn't needed
Summary:
Remove reordering code for package array as it's ordered in the first place

Test Plan:
Called API through conduit console, still works

Reviewed By: epriestley
Reviewers: epriestley, tuomaspelkonen
CC: ju, dpepper, epriestley
Blame Revision:
126

Differential Revision: 141
2011-04-20 17:07:46 -07:00
leon
bff6aef87a Adding conduit API method to find owner for the affected file
Summary:
Adding method that given a path will go up the folder hierarchy until it finds
the owning package
and return owners for that package.

Task ID: #403724

Test Plan:
Tried the new API call through console on various path combinations

Reviewed By: epriestley
Reviewers: epriestley, dpepper, tuomaspelkonen
CC: epriestley, Leon
Revert Plan:
n/a

Tags: bootcamp, Push Efficiency

- begin *PUBLIC* platform impact section -
Bugzilla: #
- end platform impact -

Differential Revision: 126
2011-04-20 17:07:12 -07:00
tuomaspelkonen
6baeda8aad Added a conduit method for getting all the diffs for a revision.
Summary:
Loading all diffs for a differential revision is needed by at least
perflab.

Test Plan:
Created a simple script that queried the conduit and made sure that
it returned correct values.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, jungejason
Differential Revision: 155
2011-04-20 16:31:48 -07:00
tuomaspelkonen
a6c770217d Fixed whitespace options in Differential.
Summary:
Whitespace options could not be selected and the 'ignore_all' was not working.

Test Plan:
Made sure that whitespace is ignored correctly and selected option is handled
correctly.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, jungejason, tuomaspelkonen
Differential Revision: 149
2011-04-19 23:07:44 -07:00
tuomaspelkonen
01844087cd Added a conduit method for querying revision feedback.
Summary:
Push tools needs information about differential revision comments. Added
a method that returns the needed information.

Test Plan:
Tested that /intern/push/merges shows correct information.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, jungejason
Differential Revision: 152
2011-04-19 19:34:23 -07:00
tuomaspelkonen
1c3e21dda1 Fixed replies to go on the correct side of the diff in Differential.
Summary:
Replies to comments went always to the left side of the diff. There
was a confusion between 'is_new' and 'on_right'. Database wants the
information if the reply is on the left or on the right. The database
does not care if the comment is a reply or an original comment.

The code looks a bit confusing, because the database field is called
'isNewFile' and that is used to determine, which side the comment
applies to.

Test Plan:
Tested that every of combination of new comment/reply to the left/right side
worked when editing and after submitting the comment.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, jungejason
Differential Revision: 148
2011-04-18 17:15:00 -07:00
tuomaspelkonen
ecc32e4d08 Only table of contents are shown for large diffs by default.
Summary:
Differential used to only show diffs for the first 100 files. Now all
the files are shown in the table of contents and there is a link to
the standalone view for every file. The inline diffs can still be
seen, if user clicks "Show All Files Inline".

Inline comments can also be added in the standalone view, but there is
no form to submit them. The revision page must be reloaded to able to
submit the inline comment.

Test Plan:
Changed the limit to three for testing purposes and checked that a diff of
mine with 5 files had the links to the standalone views. Made sure that
adding a comment in a standalone view worked and that after reloading the
revision page the comment was visible. Changed the limit back to 100 and
made sure that my diff had all the files inline and that the anchor links
were working.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, simpkins, jungejason, tuomaspelkonen
Differential Revision: 147
2011-04-18 16:26:08 -07:00
tuomaspelkonen
ebdcedc87f Better error messages for nonexistent CCs, reviewers, etc. in arc
Summary:
The existing message is confusing and might cause people to think
that there is something wrong in the field name, e.g., 'CC' instead
of the value.

Test Plan:
Tested by putting random crap in CC and Reviewers and made sure the
error message was using the new format.

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: mdevine, jungejason
Differential Revision: 145
2011-04-15 15:23:59 -07:00
jungejason
825748586b Create timeline events for comments
Summary: to enable publishing to internfeed, we create timeline events
for the comments.

Test Plan: create a test revision, comments on it and check if it
creates a timeline event with correct data at /daemon/timeline.

Reviewers: epriestley,tuomaspelkonen

CC:

Differential Revision: 144
2011-04-14 22:18:01 -07:00
tuomaspelkonen
40554e2d8a Removed broken inline comment anchors.
Summary:
Inline comment anchros were present for all different diffs inside a
revision. They were only working for the current diff. Removed the
links that were for different diffs.

I couldn't get the automatic linking to other diffs working, probably
because the anchors didn't work when the page was reloaded. This is also
a bit confusing if the diff changes when clicking on anchor.

We might want to carry all the comments along in the future, but I
don't think it's needed at the moment.

Test Plan:
Tested on a revision, which had inline comments for differerent diffs
that only the comments for the latest diff had anchors when the page
was loaded. Changed the diff manually on the page and made sure the
anchors for that diff were working correctly and the anchors for the
latest diff were not available.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 142
2011-04-14 19:03:41 -07:00
adonohue
acd1cc8d22 "Reply" for inline comments
Summary:
"Reply" for inline comments

Test Plan:
Add consecutive and overlapping new inline comments and replies.

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 143
2011-04-14 18:31:21 -07:00
tuomaspelkonen
28155a5115 Fixed Differential quotes rendering. (phabricator)
Summary:
When quoting someone's text in differential, the text was not properly
rendered. Now the quoted text is rendered nicely and it's easy to locate.

Test Plan:
Disabled the inline cache, Checked that quotes in D211086 are rendered
correctly. Started writing a new comment starting with '>' and made
sure the new comment was rendered correctly while writing it.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, tuomaspelkonen, epriestley
Differential Revision: 138
2011-04-14 16:20:46 -07:00
adonohue
9757edb268 Fix "Resign as Reviewer" to appear only when actually a Reviewer
Summary: Is this an appropriate place to say "herp derp?"

Test Plan: Check for Resign as Reviewer for the following table
                          waiting for review | accepted | committed
Am actually reviewer
Am not reviewer but CC'ed
Unrelated

Reviewers: epriestley

CC:

Differential Revision: 140
2011-04-14 15:14:44 -07:00
epriestley
bc1be958bd Allow GitCommitChangeParser to parse 'T' (type change) messages in
git history.
2011-04-14 14:16:53 -07:00
epriestley
6e713ad784 Don't reveal oauth application token information
Summary:
There's an OAuth diagnostics page at /oauth/facebook/diagnose/, which
shows some diagnostic information. Currently, it attempts to establish an
application token session and shows the token if it is successful. An attacker
could use this to do vaguely nefarious things (retreive application statistics,
I think?).

This interface was originally admin-only but then I threw out the very silly
admin mode patch I had at the time and we currently have no admin mode, and
thus this interface is public. This token isn't useful in diagnosis anyway,
so don't reveal it.

Test Plan:
Visited oauth diagnostics page, no token revealed

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason
CC: tuomaspelkonen
Differential Revision: 136
2011-04-14 13:32:49 -07:00
epriestley
ca7a0de1cf Prevent a race in Phabricator workers
Summary: See D133. Workers can also be subject to the same race, invert the
row relationship in the same way.

Test Plan: Launched repository master daemons and some taskmasters and used
the Daemon console to veify that they were able to process tasks. Manually
checked the database to make sure data got linked correctly and that new data
was inserted correctly.

Reviewers: jungejason

CC: tuomaspelkonen

Differential Revision: 135
2011-04-14 12:09:56 -07:00
epriestley
ee1e2da8fb Avoid Timeline race condition
Summary: While I should fix the transactional stuff, that patch is going to be
tricky and transactions have some performance implications. This is a simple
fix which prevents the race.

Instead of having the data point at the event ID, have the event point at a
data ID. Insert the data first, then insert the event with the right data
pointer. This is super simple and prevents the race issue.

Test Plan:
  - Ran the schema upgrade script, verified that the database was
    correctly upgraded. Was also prompted to stop daemons.
  - Ran 'repository-launch-master', verified that the discovery daemons were
    able to discover new commits and insert events for them. Verified the
    committask daemon was consuming events and converting them into tasks.
  - Verified new tasks looked correct in the database.
  - Browsed web interface.

Reviewers: jungejason

CC: tuomaspelkonen

Differential Revision: 133
2011-04-14 10:12:10 -07:00
tuomaspelkonen
f7fe75f756 Image macros for Phabricator!
Summary:
Added long waited image macro support for differential and others.

Test Plan:
Tried a couple of different macros and made sure they appear nicely
in the comment preview. Made sure that the normal comments are shown
correctly.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, tuomaspelkonen, epriestley
Differential Revision: 129
2011-04-13 20:08:13 -07:00
epriestley
d4fb7f578e Allow new Conduit clients by default.
Summary:
There's no reason to default-reject clients since they can just
pretend to be arc anyway. If they're speaking the right protocol, let them
communicate over Conduit.

Test Plan:
Changed arc to identify as 'arczsdba', ran an arc command.

Reviewed By: simpkins
Reviewers: simpkins
CC: simpkins
Differential Revision: 132
2011-04-13 19:31:01 -07:00
tuomaspelkonen
2bd51fd125 Implemented "Plan Changes" action for differential.
Summary:
Old differential allowed users to plan changes for their own revisions.
This feature is now available in Phabricator version of differential.

Test Plan:
Tested by selecting "Plan Changes" for one of my own aceepted revisions.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 130
2011-04-13 16:58:22 -07:00
epriestley
ef5456b15f First cut at diffusion.getcommits method 2011-04-13 16:39:55 -07:00
epriestley
d7c27dafd2 Add config flags for Differential action link stuff. 2011-04-13 12:12:02 -07:00
epriestley
bed2120b86 Fix systemAgent stuff. 2011-04-12 19:00:54 -07:00
epriestley
21d522d9fe Basic create_user script plus rough system agent support. 2011-04-12 18:34:53 -07:00
adonohue
6d20a57ce0 Instant subscribe/unsubscribe
Summary:
No workflow dialog when subscribing or unsubscribing from a Differential
Revision

Test Plan:
Repeatedly subscribe and unsubscribe to a revision. Enter refractory period due
to
speed of page gen.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 128
2011-04-12 18:25:46 -07:00
epriestley
43449e49c0 Very basic system agent support. 2011-04-12 18:19:25 -07:00
epriestley
703fd47bd7 Sessionless auth, sort of a mess. 2011-04-12 18:06:25 -07:00
tuomaspelkonen
79b32afeec Added possibility to define custom action links and properties in differential.
Summary:
There was a need to add old facebook specific action links and properties
back to differential.

Test Plan:
Tested that all the facebook specific links work for multiple
different revisions.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, tuomaspelkonen, epriestley
Differential Revision: 127
2011-04-12 16:23:57 -07:00
tuomaspelkonen
ea455376e6 Added a link to the actual object in Herald transcript.
Summary:
We were showing all kinds of information about the object in object
transcript, but there was no link to the actual object.

Test Plan:
Checked that links were working correctly for both differential and
commit objects.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 125
2011-04-12 11:35:26 -07:00
epriestley
1bba2c9913 Fix XSS in path names of inline comment list. 2011-04-11 20:28:30 -07:00
tuomaspelkonen
2b77cea45f Removed extra space from Maniphest email subject line.
Summary:
Like the title says.

Test Plan:
grep for ':  ' didn't reveal any other similar problems.

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: jungejason
Differential Revision: 121
2011-04-11 12:47:10 -07:00
epriestley
461f608b5c Fix diff-of-diffs to respect the right-hand-side diff. 2011-04-11 12:32:29 -07:00
adonohue
f9a59c9f49 Enable "Resign as Reviewer" from Differential Revision View UI
Summary:
Enable "Resign as Reviewer" from Differential Revision View UI

Test Plan:
Look at revision that I am a reviewer on and that I am not.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 120
2011-04-11 10:53:01 -07:00
epriestley
a2a6509dc8 Restore linking of Diffusion commits. 2011-04-11 03:02:19 -07:00
epriestley
63748f6e05 Explicitly enforce transaction load order in Maniphest. 2011-04-11 02:45:53 -07:00
epriestley
22767b80af Make files coming out of the Files tool cacheable, since this improves
performance (e.g., for profile images) and you need to know a highly entropic
PHID to access a file in the first place, plus installs should generally be
doing HTTPS.
2011-04-11 02:24:39 -07:00
epriestley
675ce22bf4 Allow Maniphest and Differential object lists to be filtered by user. 2011-04-11 02:06:13 -07:00
epriestley
fb020ae27d Improve unit test detail panel in Differential. 2011-04-10 17:47:47 -07:00
epriestley
75b11d6d7d Lint and unit star support.
Test plan: quack

Differential Revision: 35
2011-04-10 17:19:01 -07:00
epriestley
689eb11ff3 Don't send a blank "COMMITS" field for mark-committed revisions. 2011-04-10 14:36:04 -07:00
epriestley
24d01d39c6 Improve linebreak / paragraph behavior. 2011-04-10 14:09:45 -07:00
epriestley
a7ac8a04e0 Improve workflow for missing arcanist certificates. 2011-04-10 13:08:47 -07:00
epriestley
c0629f5ff1 Declown todo.com/herald. 2011-04-10 12:39:05 -07:00
epriestley
e6c5d6c8ae Properly support mailing lists, with actual testing! 2011-04-10 10:16:14 -07:00
epriestley
69bfd8e598 Allow mailing lists to be referenced by name in commit messages. 2011-04-10 09:41:10 -07:00
epriestley
9d4d258a0b Fix up newline formatting in Differential emails a bit. 2011-04-10 09:08:11 -07:00
epriestley
fa38b70ba6 Fix message IDs and Herald URIs. 2011-04-10 08:46:39 -07:00
epriestley
17ea3cfab5 Link to commits when sending Differential Commit notifications.
Wholly untested. Unlikely to work.
2011-04-10 08:31:18 -07:00
epriestley
3dcf902a39 In Herald commit notification emails, put a space between the
(author, reviewer) and Differential revision title.
2011-04-10 08:02:14 -07:00
epriestley
2c1ed9fd17 Render the cache correctly in DifferentialRevisionCommentView. 2011-04-09 22:34:41 -07:00
epriestley
dd1d593786 Don't send the action cue, use production URIs. 2011-04-09 22:33:31 -07:00
epriestley
540c2ec3df Add /status/ 2011-04-08 11:13:51 -07:00
jungejason
cca849c762 Fix 'Transcript' links in Differential
Summary:
add filtering for MetaMTA transcripts, add Herald
transcripts, also fixed PhabricatorObjectHandleData to support commits.
Note that paging in the transcripts pages will be in a different diff.

Test Plan:
test the transcripts for both MetaMTA and Herald.

Reviewed By: epriestley
Reviewers: epriestley, tuomaspelkonen
CC: jungejason, epriestley
Differential Revision: 114
2011-04-08 01:10:05 -07:00
tuomaspelkonen
c797f9511a Users cannot attach diffs to revisions they don't own anymore.
Summary:
Users were able to accidentally update revisions they didn't own. Now
it is impossible to update a revision that belongs to someone else or
has been marked as committed.

Test Plan:
Tested that normal workflow works as previously, but after running
'arc amend', running 'arc diff' fails.

Manually changed the revision number in the git commit message and tried
to update something that belongs to Jason -> Failed.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley, tuomaspelkonen
Differential Revision: 112
2011-04-07 23:28:58 -07:00
epriestley
22297b71a0 Close the loop on Diffusion commits posting back to Differential. 2011-04-07 21:59:42 -07:00
epriestley
ed1eead587 Revision has getTitle() now, not getName(). 2011-04-07 21:22:41 -07:00
epriestley
68687a059a Reintegrate Herald with Differential. 2011-04-07 20:59:51 -07:00
epriestley
5e9d053f8e Provide $request->getUser() for Conduit API Requests
Summary:
Allow Conduit methods to retrieve the authoritative, logged-in user
identity.

Test Plan:
Ran user.whoami (an authenticated method) and got my info back. Ran
conduit.connect (an unauthenticated method) and the world did not explode.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen
CC: tuomaspelkonen, epriestley
Differential Revision: 113
2011-04-07 20:16:37 -07:00
tuomaspelkonen
a6b873692f 100-file cutoff for Diffusion
Summary:
If there are more than 100 changed files in a single commit in
Diffusion, only the first 100 changes will be shows. There is a warning
sign about this and a button that will reload the same page with all the
changes visible.

Test Plan:
Tested that everything worked as expected with commits over and under 100
commits.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 110
2011-04-07 16:56:25 -07:00
epriestley
361ec78b03 Add missing includes from XHPAST parse bug. 2011-04-06 23:14:58 -07:00
epriestley
aa0ff43999 xhpastview 2011-04-06 22:43:56 -07:00
epriestley
9630123d6a Use pull-frequency to determine pull frequency, not some sort of random
algorithm that backs off to 15m which is crazy.
2011-04-06 19:36:48 -07:00
tuomaspelkonen
a34cb4bb12 Added button for showing/hiding copies in Diffusion history view
Summary:
By default, indirect events in Diffusion SVN history views were visible.
Now they are invisible, but the visiblity can be changed using a button
in the top right corner.

Test Plan:
Tested on multiple different files that the history is shown correctly after
the page is loaded, after the button is clicked once and after the button is
clicked the second time.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley, tuomaspelkonen
Differential Revision: 106
2011-04-06 19:08:11 -07:00
epriestley
e92b1fee9f Show child changes in last-modified view. 2011-04-06 19:06:00 -07:00
epriestley
40083bfa0e Allow Herald to be disabled while importing a repository so we don't send a
billion zillion emails.
2011-04-06 16:28:20 -07:00
tuomaspelkonen
d6d8598d68 Tasks can be searched with task id in differential Task Selector
Summary:

Task selector didn't support searching tasks with their IDs, e.g., 'T17'.
This was confusing, because in the task list the task ID was visible, but you
could not search them.

Test Plan:

* Checked that searching 'T<task_id>' works with all the filters
* Checked that using multiple task IDs in the same query works
* Check that mixing task IDs and free text works

Reviewers: epriestley

CC: jungejason

Differential Revision: 105
2011-04-06 15:42:30 -07:00
epriestley
1910f43364 Fix LastModified query under SVN to ignore indirect changes. 2011-04-06 12:28:16 -07:00
epriestley
11ea93260a Sync up UUIDs and create project configs. 2011-04-05 21:55:04 -07:00
epriestley
bb79418615 Don't send sandbox URIs in Herald messages. 2011-04-04 14:23:03 -07:00
epriestley
d0c9db125b Fix a herald rule editor warning. 2011-04-04 14:13:57 -07:00
epriestley
cc66c4890d Commit + Herald integration. 2011-04-04 14:13:14 -07:00
epriestley
06ae6e488b Typeahead lists by name, not by email. 2011-04-04 11:30:01 -07:00
epriestley
6c32a99012 Automatically redirect 404's that wouldn't be 404s if they had a trailing slash
to their trailing-slash counterparts.
2011-04-04 10:29:46 -07:00
epriestley
71b2f4a567 Fix a minor path encoding issue with git branches. 2011-04-03 23:42:33 -07:00
epriestley
736f629a07 Lint stragglers. 2011-04-03 23:38:02 -07:00
epriestley
2834e9f6ce HeraldCommitAdapter and some related junk. 2011-04-03 23:23:36 -07:00
epriestley
e407b2311e Typeahead, handle and herald integration for packages. 2011-04-03 22:23:31 -07:00
epriestley
66388e87d8 Owners tab thingie for navs. 2011-04-03 22:15:47 -07:00
epriestley
a54f1395c2 Owners search. 2011-04-03 22:12:22 -07:00
epriestley
23f882a0ee Some owners write workflows. 2011-04-03 22:03:27 -07:00
epriestley
5038ab850c Some owners read workflows. 2011-04-03 19:20:47 -07:00
epriestley
65e1386753 owners 2011-04-03 15:50:51 -07:00
epriestley
4993bb9a9b AphrontListFilterView, for list filtering. 2011-04-03 15:50:06 -07:00
epriestley
1b2140d7a4 Unmuck some issues with viewing HEAD changes. 2011-04-02 17:12:41 -07:00
epriestley
8f5d01d451 Get rid of +x on a bunch of nonexecutable files because I failed to set
"create mask" on SMB. :/
2011-04-02 16:47:20 -07:00
epriestley
811a0910e0 Pull handles for the standalone browse view. 2011-04-02 16:44:19 -07:00
epriestley
e4cd939734 Do author PHID lookups in Diffusion views. 2011-04-02 16:39:41 -07:00
epriestley
c2f10f19b1 Fix some daemon ish. 2011-04-02 15:02:06 -07:00
epriestley
1f88e08761 Move 'phd parse-commit' to a dedicated script; allow message parsing tasks to
be executed in isolation, provide a script to requeue all message reparses,
stop parse-commit from inserting side-effect tasks.
2011-04-02 13:23:22 -07:00
epriestley
29ce4ed83f Paginate the user list view. 2011-04-02 09:58:42 -07:00
jungejason
313da1d5eb Support blame on blame for svn
Summary:
add the column for the blame on blame for svn. We will support
git once we have the 'parent' info of the commits saved in the database
for git.

Test Plan:
in svn it should work. In git is doesn't break things.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 95
2011-04-01 20:11:08 -07:00
epriestley
82fffe466a Add basic detail-parser functionality. 2011-04-01 17:11:55 -07:00
jungejason
d23696a457 Add image support for diffusion file view
Summary:
render image as an image tag in diffusion view.

Test Plan:
1. Image shows up correctly. 2. Non-image file still works
fine.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 94
2011-04-01 16:20:36 -07:00
jungejason
64cd4f969d Add color to diffusion blame and improve plain view
Summary:
query the database to get the epoch info for the commits, then
calculate the color depending on the epoch (the newer the commit, the
dark its color). Also improved the plain blame view for git, as the
git-blame doesn't produce a good display by default. Now we format the
output it from the data we fetches from the database.

Test Plan:
verify both git and svn browsing page work for 'plain',
'plainblame', 'highlighted' and 'highlightedblame' view.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley, jungejason
Differential Revision: 93
2011-04-01 10:25:36 -07:00
epriestley
3369147cab Paginate Diffusion history views, respect 'pagesize' parameter. 2011-03-31 18:46:53 -07:00
epriestley
f76c3bbc22 AphrontPagerView and UIExamples. 2011-03-31 17:06:33 -07:00
epriestley
d3766cad98 Minor tweaks to Preferences
Summary:
Get rid of HPHP-only syntax, add a header and width restriction.

Test Plan:
Looked at /preferences/, saved preferences.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen
CC: tuomaspelkonen
Differential Revision: 92
2011-03-31 16:07:14 -07:00
tuomaspelkonen
6b8c2d110a Merge branch 'preferences' 2011-03-31 14:30:32 -07:00
tuomaspelkonen
123fdabb75 Removed "PHID Types" storage object and interface components
Summary:
Removed because code wasn't used or really needed.

Test Plan:
* Tested that "PHID List" and "PHID Lookup" pages work correctly.
* Tested that new PHIDs can be allocated with the predefined set of types

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 88
2011-03-31 14:01:13 -07:00
tuomaspelkonen
28fe9f4eca User preferences ported from tools
Summary:

Internal tools, e.g., differential and diffusion  have user defined
preferences for monospaced font and the option for showing either the
name of the tool or the glyph of the tool in the title.

These preferences were ported to phabricator. These preferences can be
modified in /preferences/ and they both affect diffusion and differential
at the moment.

Test Plan:

* Created an empty database
* Loaded /preferences/ and modified the monospaced font and clicked save
* Confirmed that the same page was loaded with the message that preferences
  have been saved and that the example text used the user defined font

* in /preferences/ changed the option to show tool names as plain text and
  clicked save
* Confirmed that the same page was loaded with '[Preferences]' in the title
  instead of a glyph

* These same tests were also executed for differential and diffusion

Reviewers: epriestley
CC: jungejason

Differential Revision: 91
2011-03-31 13:44:20 -07:00
epriestley
c795aaea29 Make the branch table somewhat more useful. 2011-03-31 01:07:51 -07:00
epriestley
34e8d902c7 Restore "Shortcuts" feature to Diffusion. 2011-03-31 00:33:44 -07:00
epriestley
c99df1f4eb Add more change metadata to SVN and git. 2011-03-30 23:27:06 -07:00
epriestley
e25c58ed9c Restore some commit metadata to browse views. 2011-03-30 22:41:31 -07:00
epriestley
e6cf7a9cb0 More Diffusion junk. 2011-03-30 22:08:41 -07:00
epriestley
793df0cfc5 Throw a proper 404 page when accessing a task which does not exist. 2011-03-30 21:38:24 -07:00
epriestley
b266b570d8 Use remarkup engine for commit info. 2011-03-30 21:37:28 -07:00
epriestley
e994e69a6f Limit the amount of damage we cause to ArcanistDiffParser. 2011-03-30 19:32:51 -07:00
epriestley
60918c9a9e Improved change view support. 2011-03-30 19:22:11 -07:00
epriestley
5063e978f1 Basic DiffusionGitDiffQuery. 2011-03-30 18:17:36 -07:00
epriestley
3d5f03607b Rough cut of Diffusion change view. 2011-03-30 17:36:32 -07:00
jungejason
51a6ce65aa Show blame info in diffusion.
Summary:
Show blame info. This is part of the task of "Port Diffusion's
Browse File view to Phabricator". The color for git repository is not
implemented yet.

Test Plan:
it would work for both git and svn.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 87
2011-03-30 16:07:57 -07:00
epriestley
f249ffc882 Fix Remarkup styling in Maniphest and Differential
Summary:
This makes some of the line spacing, paragraph spacing and layout
less terrible. In particular, fixes code blocks inside Differential inline
comments.

Test Plan:
Looked at Maniphest Tasks, Differential Revisions and Differential
inline comments with various flavors of remarkup in them.

Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason
CC: jungejason
Differential Revision: 89
2011-03-29 22:02:02 -07:00
Tuomas Pelkonen
aa5c82df75 Solving an unassigned task assigns it to the user.
Summary:
Also commenting on a task will add the user to CCs if not there already.

Test Plan:
Tested manually with UI that everything works as expected:

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 85
2011-03-29 16:59:27 -07:00
tuomaspelkonen
31dda42903 Changed 'Comment' to 'Clowncopterize' in Differential
Summary:
Back to the authentic roots.

Test Plan:
Verified that the button had the correct text in the UI.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 86
2011-03-29 16:09:21 -07:00
epriestley
63a3edb29f Make SVN commit parsers actually parse commits again. 2011-03-27 00:39:29 -07:00
epriestley
637207aedf Random local changes from production. 2011-03-26 23:54:47 -07:00
epriestley
fa8f168bd0 Allow commits to be marked as 'bad' so they won't be parsed. Useful if you work
at a company where someone deleted the entire repository *cough cough*.
2011-03-26 23:52:09 -07:00
epriestley
1a11297dd6 Allow parsing of rare extra-broken non-UTF8 messages. 2011-03-26 23:20:16 -07:00
epriestley
c22124db85 Improve daemon console. 2011-03-26 22:55:29 -07:00
jungejason
1844a6f728 Get the correct uri_path for a diffusion request.
Summary: there is a bug in getting the uri path. When the user clicks
a line number twice, the new rev number and the line number is attached
to the end of the original uri instead of substituting it.

Test Plan: clicking line number multiple times, for both git and svn.

Reviewers: epriestley

CC:

Differential Revision: 84
2011-03-26 00:17:14 -07:00
jungejason
431552c357 Add syntax highlight to diffusion.
Summary:
use XHPAST parser to parse the file, and generate a table for
the code to highlight it.  This is part of the task of "Port Diffusion's
Browse File view to Phabricator".

Test Plan:
browse file, try commit version, line number functionality.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 83
2011-03-25 17:41:51 -07:00
epriestley
370ba966db Rough cut of herald transcripts and Differential adapter. 2011-03-24 21:32:26 -07:00
epriestley
0b68b0f5bc Very rough cut at Herald test console. 2011-03-24 13:49:21 -07:00
epriestley
6c31ce4980 Herald CSS, plus edit/save/delete. 2011-03-24 11:07:36 -07:00
epriestley
deb12c9fe8 Some herald improvements. 2011-03-22 20:43:19 -07:00
epriestley
3c0a822d65 Improve search result formatting slightly. 2011-03-22 17:42:12 -07:00
epriestley
08fc13598d Improve search relevance. 2011-03-22 17:19:52 -07:00
epriestley
b060f0a80f Herald JS basics. 2011-03-22 17:08:08 -07:00
epriestley
9c5e7bb71d Horrendously rough cut of Herald rule editor. 2011-03-22 15:28:09 -07:00
epriestley
e8c960910c Herald 'new rule type' interface. 2011-03-22 14:35:11 -07:00
epriestley
75fcf56b67 Rough cut of Herald home controller. 2011-03-22 13:50:08 -07:00
epriestley
084c79d85a Herald skeleton. 2011-03-22 13:22:55 -07:00
jungejason
daf7a07064 Add dropdown and make plain text view style.
Summary:
part of the task of "Port Diffusion's Browse File view to
Phabricator"

Test Plan:
view the plain view style

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 80
2011-03-22 13:12:55 -07:00
Slawek Biel
4c9850278c [Differential: removing reviewed/reviewers check from the parser]
Summary:
As we've discussed the check is not needed.

Test Plan:
- php -l

Reviewed By: epriestley
Reviewers: jungejason, epriestley
CC: epriestley
Revert Plan:
sure

Other Notes:

Differential Revision: 81
2011-03-22 12:34:29 -07:00
epriestley
2eb30aed9e Improve search/phid flexibility. 2011-03-21 23:37:05 -07:00
epriestley
afe0079819 Improve awkward Diffusion query plans. 2011-03-20 17:46:02 -07:00
epriestley
01a20c0480 Fix various parsing bugs in Differential. 2011-03-19 14:42:17 -07:00
jungejason
e4fa1523bd Use PhabricatorDaemon for sending emails.
Summary:
Make PhabricatorMetaMTADaemon extend PhabricatorDaemon.

Test Plan:
send mail with the new daemon.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 74
2011-03-17 18:40:17 -07:00
jungejason
6aa006b903 Make conduit-uri info easier to be copied into arcrc
Summary:
add the conduit URI and the username together with the arc
certificate to the setting page.

Test Plan:
run arc diff to make sure it still works after copying the
generated test into the .arcrc file.

Reviewed By: epriestley
Reviewers: epriestley
CC: epriestley
Differential Revision: 73
2011-03-15 21:52:48 -07:00
epriestley
0d292abbf0 Prevent daemons from spinning when they hit duplicate key exceptions. 2011-03-15 14:36:01 -07:00
epriestley
14a172d707 Make GitDiscovery terminate, maybe? 2011-03-15 14:25:47 -07:00
epriestley
bb144542d3 Diffusion/phd/console improvements. 2011-03-15 13:38:14 -07:00
jungejason
4194e78943 Remove phabricator.conduit-uri config setting
Summary:
We have phabricator.conduit-uri in the config setting, but it
is always the phabricator uir appended with '/api'. So we just remove
this setting.

Test Plan:
test arc diff to make sure it still work.

Reviewed By: epriestley
Reviewers: epriestley
CC: jungejason, epriestley
Differential Revision: 71
2011-03-14 12:32:28 -07:00
epriestley
5970f9a0ec Get rid of git.path configuration, this is really an artifact of my system
being broken and probably macports' fault.
2011-03-14 09:43:06 -07:00
epriestley
4196bfb3ef Minor fixes. 2011-03-14 07:43:13 -07:00
epriestley
a3cd33da19 Lint stragglers. 2011-03-13 22:12:34 -07:00
epriestley
b5db12b6b2 Browse / git improvements. 2011-03-13 22:03:30 -07:00
epriestley
7963d7fa06 Lint & packaging. 2011-03-13 20:15:24 -07:00
epriestley
426754dd4d Improve Diffusion commit view featureset. 2011-03-13 20:12:46 -07:00