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

1362 commits

Author SHA1 Message Date
epriestley
764d3d1c65 Make "pcntl" script error more explicit
Summary: This may make it easier to debug problems with CLI + pcntl

Test Plan: Added a syntax error to the script and got more useful output

Reviewers: johnduhart, jungejason, tuomaspelkonen, aran

Reviewed By: johnduhart

CC: aran, johnduhart

Differential Revision: 869
2011-08-29 10:07:25 -07:00
moos3
69f7581582 Fixed the missing space after the : for vote 2011-08-23 22:03:56 -04:00
moos3
003694458b fixes 2011-08-23 21:21:00 -04:00
moos3
dd9b15600a added the support for slowvote links from the bot 2011-08-23 21:17:27 -04:00
epriestley
fd0f4d9c52 Delay sending JOIN command until after MOTD finishes for IRC bot
Summary: Do JOIN in the protocol handler, after we receive 376 ("end of motd").

Test Plan: Ran bot, it joined a channel after receieving a 376 command.

Reviewers: moos3, codeblock, aran, jungejason, tuomaspelkonen

Reviewed By: moos3

CC: aran, moos3

Differential Revision: 855
2011-08-23 14:12:30 -07:00
Richard
9192a0ecf8 Added the ability for SSL to be fined in the irc_config.json file, if not there we assume that its false and continue on our way. if "ssl":true is in the config then we are going to use ssl:// to make the connection use openssl. 2011-08-22 15:20:57 -07:00
moos3
2d677d3992 added the ability for the irc nick to have a identify password. just add "nickpass":"password" to your irc_config.json file and it will identify on connect" 2011-08-22 15:20:57 -07:00
Richard
fbef90c4c6 Added the ability to support Irc Bots that need to login into private IRC Servers. Requires the following to be added to the config.json file
"user":"authenticationusername",
"pass":"thisuserspassowrd",

This will allow people with internal irc servers to use this if they control access from ldap for irc.
2011-08-22 11:12:34 -07:00
epriestley
6dc193d3d9 Fully update library map. 2011-08-18 09:52:36 -07:00
epriestley
74f3112b1c Allow daemons to perform writes unconditionally. 2011-08-16 13:43:51 -07:00
epriestley
68c30e1a71 Provide a setting which forces all file views to be served from an alternate
domain

Summary:
See D758, D759.

  - Provide a strongly recommended setting which permits configuration of an
alternate domain.
  - Lock cookies down better: set them on the exact domain, and use SSL-only if
the configuration is HTTPS.
  - Prevent Phabriator from setting cookies on other domains.

This assumes D759 will land, it is not effective without that change.

Test Plan:
  - Attempted to login from a different domain and was rejected.
  - Logged out, logged back in normally.
  - Put install in setup mode and verified it revealed a warning.
  - Configured an alterate domain.
  - Tried to view an image with an old URI, got a 400.
  - Went to /files/ and verified links rendered to the alternate domain.
  - Viewed an alternate domain file.
  - Tried to view an alternate domain file without the secret key, got a 404.

Reviewers: andrewjcg, erling, aran, tuomaspelkonen, jungejason, codeblock
CC: aran
Differential Revision: 760
2011-08-16 13:21:46 -07:00
epriestley
3aa17c7443 Prevent CSRF uploads via /file/dropupload/
Summary:
We don't currently validate CSRF tokens on this workflow. This allows an
attacker to upload arbitrary files on the user's behalf. Although I believe the
tight list of servable mime-types means that's more or less the end of the
attack, this is still a vulnerability.

In the long term, the right solution is probably to pass CSRF tokens on all Ajax
requests in an HTTP header (or just a GET param) or something like that.
However, this endpoint is unique and this is the quickest and most direct way to
close the hole.

Test Plan:
  - Drop-uploaded files to Files, Maniphest, Phriction and Differential.
  - Modified CSRF vaidator to use __csrf__.'x' and verified uploads and form
submissions don't work.

Reviewers: andrewjcg, aran, jungejason, tuomaspelkonen, erling
Commenters: andrewjcg, pedram
CC: aran, epriestley, andrewjcg, pedram
Differential Revision: 758
2011-08-16 13:19:10 -07:00
epriestley
fa49c6c52d Provide a "reference-with-full-name" syntax for Remarkup
Summary:
Provide a {T123} syntax which pulls in the entire name of an object, not just a
link to it. A major use for this is organizing projects using wiki pages. Since
handle links show object status now, this lets you organize stuff in an ad-hoc
way and get a reasonable overview of it. We can make handles richer in the
future, too.

The performance on this isn't perfect (it adds some potential single gets) but I
think it's okay for now and I don't want to make remarkup engine even more
complex until the preprocess/postprocess stuff has had a chance to settle and
I'm more confident it works.

In Differential and Maniphest we'll also incorrectly cache the object
state/name, but that'll fix itself once I move the cache code to use
preprocess/postprocess correctly.

Test Plan:
  - See https://secure.phabricator.com/file/view/PHID-FILE-5f9ca32407bec20899b9/
for an example.
  - Generated and looked over the documentation.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran, hunterbridges
CC: skrul, aran, jungejason, epriestley
Differential Revision: 784
2011-08-06 12:55:16 -07:00
epriestley
6cd58b17b4 Refactor Phabricator mention rule to do data fetching in post processing
Summary:
This accomplishes two goals:

  - Data fetching is now grouped across blocks.
  - Demonstrates that D737 actually works.

Test Plan: Used @mentions in Phriction preview, they rendered properly. Verified
only one service call was being made across blocks.
Reviewed By: jungejason
Reviewers: hunterbridges, jungejason, tuomaspelkonen, aran
CC: aran, jungejason, epriestley
Differential Revision: 738
2011-08-05 08:18:52 -07:00
epriestley
29444d1df3 Add a little more unit test documentation, fail loudly when isolation prevents a
query

Summary:
  - Provide an example unit test, and document it.
  - Document database isolation better.
  - When we issue an unsimulated query to the isolated connection, throw a
helpful message.
  - Pygments is complaining about my madeup "lang=demo", change it to
"lang=text".

Test Plan:
  - Ran the unit test (sanity check).
  - Ran all other unit tests (verify I didn't break isolation).
  - Added a queryfx(..., 'SELECT 1') to a test and verified it throws.
  - Read the documentation.

Reviewed By: edward
Reviewers: edward, jungejason, tuomaspelkonen, aran
CC: aran, edward
Differential Revision: 773
2011-08-03 09:15:43 -07:00
epriestley
8a03a73e95 Fix some brace lint stuff.
Summary: New brace linter picked these up (see D755).
Test Plan: Visual inspection.
Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, jungejason
Differential Revision: 756
2011-08-02 10:40:45 -07:00
epriestley
9d3f33a7a6 Rough implementation of drag-and-drop file uploads
Summary:
This gets all the major pieces working. Allows you to drag-and-drop files in
Differential and Phriction, and embed files in remarkup with {Fxxx} references.
See also task.

I'm explicitly not documenting this yet since it's still pretty rough.

Test Plan: Dragged and dropped stuff into Differential and Phriction.
Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran, tomo
Commenters: tomo
CC: aran, tomo, jungejason
Differential Revision: 674
2011-08-01 15:27:13 -07:00
epriestley
879431fb50 Improve GC performance for Herald Transcripts
Summary: This has to table scan a ginormous table right now, give it a fighting
chance with a more usable key.
Test Plan:
  - Launched GC daemon, no errors.
  - Used test console to create a new transcript.
  - Viewed some old transcripts.
  - Ran EXPLAIN on the SELECT and verified it was utilizing the garbageCollected
key.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 735
2011-07-28 18:50:54 -07:00
epriestley
8d26399cfd Remove unused EXPECTED_SCHEMA_VERSION constant
Summary: This didn't end up getting used but I neglected to delete it.
Test Plan: git grep
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran, jungejason
Differential Revision: 721
2011-07-24 18:16:39 -07:00
epriestley
26bca41828 Improve setup process to detect 'open_basedir', 'date.timezone' and 'safe_mode'
problems

Summary: Detect more PHP misconfigurations in setup.
Test Plan: Broke my configuration, ran setup, it seemed to detect all the
problems and issue meaningful error messages.
Reviewed By: jungejason
Reviewers: hunterbridges, 10098, jungejason, tuomaspelkonen, aran
CC: aran, jungejason
Differential Revision: 717
2011-07-24 18:10:48 -07:00
epriestley
ffae7b19e6 Slightly loosen the mention regexp to allow for "Go ask @tomo."
Summary: Currently, we incorrectly flag these under the "@lists.com" rule.
Test Plan:
https://secure.phabricator.com/file/view/PHID-FILE-887c2bc66eb9d47d02f4/
Reviewed By: tomo
Reviewers: tomo
CC: aran, epriestley, tomo
Differential Revision: 708
2011-07-23 09:07:36 -07:00
epriestley
2b7210260f Allow Phabricator storage engines to be extended and configured
Summary:
See T344. Currently, there's a hard-coded 12MB filesize limit and some awkward
interactions with MySQL's max_allowed_packet. Make this system generally more
robust:

  - Move the upload limit to configuration.
  - Add setup steps which reconcile max_allowed_packet vs MySQL file storage
limits.
  - Add a layer of indirection between uploading files and storage engines.
  - Allow the definition of new storage engines.
  - Define a local disk storage engine.
  - Add a "storage engine selector" class which manages choosing which storage
engines to put files in.
  - Document storage engines.
  - Document file storage classes.

Test Plan:
Setup mode:

  - Disabled MySQL storage engine, misconfigured it, configured it correctly.
  - Disabled file storage engine, set it to something invalid, set it to
something valid.
  - Verified max_allowed_packet is read correctly.

Application mode:

  - Configured local file storage.
  - Uploaded large and small files.
  - Verified larger files were written to local storage.
  - Verified smaller files were written to MySQL blob storage.

Documentation:

  - Read documentation.

Reviewed By: jungejason
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley, jungejason
Differential Revision: 695
2011-07-21 16:44:24 -07:00
epriestley
3eafe9e3bb Fix Diffusion rendering of SVN files which did not change
Summary:
Share code with the new PhabricatorDifferenceEngine, which handles diffs with no
changes correctly.

(This isn't the same issue as file moves, but I ran into it while generating a
repro case.)

Test Plan: Previously, changes which didn't change file content (e.g., property
changes) would throw. Now they work.
Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran, epriestley, tuomaspelkonen
Differential Revision: 698
2011-07-20 11:54:33 -07:00
epriestley
87fa97e49a Require double brackets for Phriction links
Summary:
Single brackets are getting some troublesome false positives in Facebook's
install. Particularly, there's a weird convention at Facebook of tagging diffs
by putting stuff like "[perf]" or "[chat]" in the title, although this isn't
turned into structured data at any stage. When commits appear in Diffusion, we
currently link such ad-hoc tags to Phriction.

Wikipedia uses double-bracket sytnax, as do many other wikis, so this seems like
a reasonable burden to place on the lightweightness of the markup. The
alternative is selectively disabling Phriction markup in some interfaces, but
I'd rather allow integration in commit messages and just guard the syntax more
closely.

(I'm not providing any sort of migration plan since this landed less than a week
ago and I'm pretty confident no one has built a huge wiki yet, but I added a
CHANGELOG note.)

Test Plan: Edited a wiki document and added some links. Verified single brackets
were unlinked and double brackets were linked.
Reviewed By: jungejason
Reviewers: hsb, aran, jungejason, tuomaspelkonen
CC: aran, jungejason, epriestley
Differential Revision: 689
2011-07-18 09:18:42 -07:00
epriestley
c0ae2f6289 Show change diffs in Phriction
Summary:
This is really rough and needs work (particularly, there's some diff code I
really need to refactor since I sort-of-copy-pasted it) but basically
functional.

Show text changes between diffs and allow users to revert to earlier versions.

Differential's line-oriented diff style isn't ideal for large blocks of text but
I'm betting this is probably good enough in most cases. We can see how bad it is
in practice and then fix it if needbe.

I added a bunch of support for "description" but didn't add the feature in this
diff, I'll either follow up or task it out since it should be a pretty
straightforward change.

Test Plan: Looked at history for several Phriction documents, clicked "previous
change" / "next change", clicked revert buttons.
Reviewed By: hsb
Reviewers: hsb, codeblock, jungejason, tuomaspelkonen
CC: aran, hsb, epriestley
Differential Revision: 687
2011-07-18 08:46:45 -07:00
epriestley
6f388f97d9 Improve Phabricator behavior for fatal errors
Summary:
  - Exceptions on the rendering pathway currently go uncaught and result in a
blank page. Commonly, this is a bad require_celerity_resource() call. Although
we can't safely render a page if the rendering pathway is broken, we can show a
useful message.
  - When PHP exits because of a fatal error, there is an opportunity to run code
in the shutdown handler. This allows us to show messages at least some of the
time, e.g. "call to unknown function derp() in somefile.php at line 99"
  - flip dem tables

Test Plan: Added fatals ("derp();") and rendering exceptions
("require_celerity_resource('does-not-exist')") to a controller and verified
that the error handling behavior is now more useful.
Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, epriestley
Differential Revision: 680
2011-07-18 07:23:01 -07:00
epriestley
7d152def3e Basic remarkup integration for Phriction
Summary: Document linking and some general layout improvements. I'd like to
eventually do more meta-dataey things with links (like store them separately and
check them for 404s) but this is a decent start.
Test Plan:
https://secure.phabricator.com/file/view/PHID-FILE-d756b94a06b69c273fce/
Reviewed By: jungejason
Reviewers: hsb, codeblock, jungejason, tuomaspelkonen, aran
CC: aran, jungejason, epriestley
Differential Revision: 650
2011-07-12 06:58:47 -07:00
epriestley
467308dd12 Script to selectively convert MyISAM tables to InnoDB
Summary:
A bunch of the .sql patch files don't explicitly specify the table engine, but
we should always use InnoDB with the exception of one table which needs MyISAM
for FULLTEXT.

MySQL doesn't no-op an ALTER TABLE statment that changes the engine back to
itself and converting large tables can be time consuming, so convert only the
required tables.

Test Plan: Ran on secure.phabricator.com and my local box, it fixed all the
issues in about 3 seconds on secure.phabricator.com and <<1 second on my local.
Reviewed By: codeblock
Reviewers: codeblock, tuomaspelkonen, jungejason, aran
CC: aran, epriestley, codeblock
Differential Revision: 641
2011-07-11 11:42:28 -07:00
Ricky Elrod
3164e4b521 sendmail is in /usr/sbin/ on RHEL.
Summary:
If we're going to hardcode a path, at least let's do it in a way that works on RHEL too.

Test Plan:
Successfully ran the setup script on RHEL.

Reviewers:
epriestley

CC:

Differential Revision: 623
2011-07-08 21:03:32 -04:00
epriestley
51c2726a34 Add Differential parse cache to the GC daemon
Summary:
Add the differential parse cache to the GC. This is the largest object in the
system by a wide margin, I think.

This table is potentially gigantic which is why the script truncates it before
doing a schema change.

Test Plan: Ran the GC daemon, it cleaned up some parse caches.
Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran
Commenters: tuomaspelkonen
CC: aran, jungejason, tuomaspelkonen, epriestley
Differential Revision: 620
2011-07-08 17:31:25 -07:00
Ricky Elrod
3d85d6a81d Add language to paste.info, and show it in Pxxx responses from phabot.
Summary:
Now that we store language with pastes, we can include this in Conduit.

Test Plan:
Tried it on a paste with a blank language, and one with a specified language.
    16:14:50 <@CodeBlock> P1
    16:14:51 <@codeblock-phabot> P1: http://phabricator.local/P1 - test.php
    16:15:05 <@CodeBlock> P43
    16:15:06 <@codeblock-phabot> P43: http://phabricator.local/P43 - sadoijfoisaf (php)

Reviewers:
epriestley, Ttech

CC:

Differential Revision: 616
2011-07-08 13:55:22 -07:00
epriestley
cce786a89f Prevent mentions from matching "derp@derp"
Summary: See task / comment.
Test Plan:
https://secure.phabricator.com/file/view/PHID-FILE-f337d112ffe053fdea7d/
Reviewed By: tomo
Reviewers: mroch, tomo
CC: aran, tomo
Differential Revision: 614
2011-07-08 12:32:03 -07:00
epriestley
4ef918e213 Add a garbage collector daemon
Summary:
Phabricator generates a bunch of data that we don't need to keep around forever,
add a GC daemon to get rid of it with some basic configuration options.

This needs a couple more diffs to get some of the details but I think this is a
reasonable start.

I also fixed a couple of UI things related to this, e.g. the daemon logs page
going crazy when a daemon gets stuck in a loop and dumps tons of data to stdout.

Test Plan:
  - Ran gc daemon in 'phd debug' mode and saw it delete stuff, then sleep once
it had cleaned everything up.
  - Mucked around with TTLs and verified they work correctly.
  - Viewed gc'd transcripts in the web interface and made sure they displayed
okay.
  - Viewed daemon logs before/after garbage collection.
  - Running some run-at / run-for tests now, I'll update if the daemon doesn't
shut off in ~10-15 minutes. :P

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 583
2011-07-05 13:49:11 -07:00
Ricky Elrod
eeb8d10f42 Edited src/infrastructure/daemon/irc/handler/objectname/PhabricatorIRCObjectNameHandler.php via GitHub 2011-07-05 08:55:21 -07:00
epriestley
f2cedd8108 Provide basic Celerity documentation. 2011-07-04 11:23:04 -07:00
epriestley
39adae9aa8 Prevent Phabot from spinning out of control
Summary: When the remote closes the connection, phabot goes into a busy loop
because of PHP's "nothing should ever be an error" semantics. Instead, detect
connection termination.
Test Plan: Disabled the "PONG" response in the protocol handler and let freenode
disconnect phabot. It spun out of control before, now it detects the issue and
exits to await automatic restart.
Reviewed By: jungejason
Reviewers: codeblock, jungejason, aran, tuomaspelkonen
CC: aran, jungejason
Differential Revision: 582
2011-07-03 09:58:11 -07:00
Evan Priestley
edf6a44db3 Merge pull request #28 from CodeBlock/3346f04d89548ebfa6e84c6bada01b84b
D552 and 553.
2011-06-29 12:16:57 -07:00
Ricky Elrod
3346f04d89 Add Pxxx to phabot.
Summary:
Summarize (or at least link to) pastes when P<id> is given in a channel. This depends on D552!

Test Plan:
04:34:03 <@codeblock-phabot> P15 - http://phabricator.local/P15
04:35:22 <@CodeBlock> P1 asdf foo Bar Baz Diet Sprite P4
04:35:24 <@codeblock-phabot> P1 - http://phabricator.local/P1
04:35:24 <@codeblock-phabot> P4 - http://phabricator.local/P4

Reviewers:
epriestley

CC:

Differential Revision: 553
2011-06-29 15:00:07 -04:00
Ricky Elrod
2728a41fa0 Make phabot understand Txxx.
Summary:
Maniphest tasks can now be summarized by referencing their respective T<id> in irc.

Test Plan:
03:29:28 <@CodeBlock> T218
03:29:29 <@codeblock-phabot> T218: NYANCAT (Priority: Wishlist) - https://secure.phabricator.com/T218
03:30:14 <@CodeBlock> T58 asdf foo bar baz mcFoo T163
03:30:15 <@codeblock-phabot> T58: Allow AphrontFormView to render as a <div /> instead of a form (Priority: Wishlist) - https://secure.phabricator.com/T58
03:30:15 <@codeblock-phabot> T163: arc amend is slow (Priority: Needs Triage) - https://secure.phabricator.com/T163
...
03:28:23 <@CodeBlock> Oh. Hah, I'm testing against production Conduit. Ah well.
03:28:40 <@CodeBlock> I don't always test my code...but when I do, I do it in prod! :D

Reviewers:
epriestley

CC:

Differential Revision: 551
2011-06-29 04:14:16 -04:00
Jun Ge
a54bc391db Merge pull request #26 from hwang36/master
D539 Add P### link to paste
2011-06-28 07:41:40 -07:00
epriestley
07b64dc01f Make @mentions add CCs as a side effect
Summary:
When a user gets @mentioned in Differential, add them as a CC.

No Maniphest hookup yet since I want to make that one a little more formal.

Depends on D518.

Test Plan:
@mentioned a user and they were added as a CC.

Reviewed By: jungejason
Reviewers: tomo, mroch, jsp, jungejason, aran, tuomaspelkonen
CC: aran, jungejason
Differential Revision: 519
2011-06-28 07:00:20 -07:00
hwang
c2d0664c5e Add P### link to paste
Summary:Make a new directory, src/infrastructure/markup/remarkup/markuprule/paste/
	Make a new class called PhabricatorRemarkupRulePaste in that directory.
	Add the rule to DifferentialMarkupEngineFactory.

Test Plan: Created a task in maniphest. Put P1 and P2 in the content.
Created P1 and P2 in Paste. Verified P1 and P2 were highlighted and
linked correctly.

Reviewers:epriestley, codeblock

CC:jungejason

Differential Revision: 539
2011-06-27 22:53:55 -07:00
epriestley
709d7ed5d7 Use the proc-error-aware signaling check for daemons from the CLI
Summary:
The web console already correctly checks for processes which are running but
can't be signaled. Share this check in the CLI.

Test Plan:
Looked at the web console. Poked at the CLI.

Reviewed By: fratrik
Reviewers: fratrik
CC: aran, fratrik
Differential Revision: 544
2011-06-27 15:01:07 -07:00
epriestley
b61e325f05 Show logs to the console in 'phd debug'
Summary:
Currently we send logs to the logfile in 'phd debug', but we should send them to
the console instead.

Also fixed some %C stuff which could theoretically cause problems if a user had
percentage symbols in their paths (heaven forbid).

fratrik, this or D535 might have been involved in frustrating your efforts to
debug the "sudo" stuff.

Test Plan:
Ran "phd debug irc derpderp" and "phd launch irc derpderp". In the former case,
the exception appeared in the console. In the latter, it appeared in the log.

Reviewed By: codeblock
Reviewers: codeblock, jungejason, tuomaspelkonen, aran, fratrik
CC: aran, codeblock
Differential Revision: 536
2011-06-26 20:41:08 -07:00
epriestley
405b05a490 Basic @mentions support
Summary:
Provides basic Remarkup support for @mentions. No application integration yet so
these aren't terribly useful until that happens.

Test Plan:
https://secure.phabricator.com/file/view/PHID-FILE-83d68e7af6085ae928df/

Reviewers: tomo, mroch, jsp
Commenters: tomo
CC: aran, tomo, epriestley
Differential Revision: 517
2011-06-24 11:55:15 -07:00
epriestley
4bfbd209b2 Fix XSS hole in YouTube remarkup rule
Summary:
The source wasn't properly escaped.

Test Plan:
Made a comment like "http://youtube.com/?v="></iframe><h1>!!!</h1>"

Reviewed By: mroch
Reviewers: tomo, mroch, tuomaspelkonen, aran, jungejason
CC: aran, mroch
Differential Revision: 516
2011-06-24 10:45:53 -07:00
epriestley
12772ec35f Provide setup instructions for reducing minimum index word length
Summary:
The MySQL MyISAM fulltext backend defaults to a minimum length of 4, but many
3-letter words are useful search terms. Provide instructions for configuring
MySQL to reduce the auto-stopword length.

Test Plan:
Followed instructions, searched for a 3-letter term and got a hit.

Reviewed By: jungejason
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran, jungejason
Differential Revision: 471
2011-06-20 05:13:24 -07:00
epriestley
d33670c416 Update Herald documentation. 2011-06-14 11:09:40 -07:00
epriestley
555464c4a7 "Paste" application tweaks
Summary:
Tweaks to the paste app:

  - I realized that unlike all the other apps, it makes more sense for the
default view of this one to be "create paste" instead of "list pastes" since
when you access the application directly you are most often wanting to share
something. Swap list out of the default slot and make edit the default.
  - Make the textarea bigger (usability).
  - Allow you to copy an existing paste.
  - Implement 'raw view'.
  - Tweak/adjust list view (usability, formatting).
  - Tweak page titles.

Test Plan:
Created, copied, and listed pastes. Viewed raw paste. Created an invalid paste.
Tried to create a copy of a nonexistant paste.

Reviewed By: codeblock
Reviewers: codeblock, jungejason, aran, tuomaspelkonen
CC: aran, epriestley, codeblock
Differential Revision: 456
2011-06-13 21:13:32 -07:00
epriestley
8f63873d57 Ping conduit from PHD and set daemon logfiles. 2011-06-13 18:39:23 -07:00
epriestley
1d28d97307 This needs a defualt or everything is ruined. 2011-06-13 18:07:58 -07:00
Evan Priestley
961a1498aa Merge pull request #18 from CodeBlock/master
IRC nick regex.
2011-06-13 17:02:26 -07:00
Ricky Elrod
226fdb5589 Fix IRC nick regex.
Summary:
Nicks can contain more characters than were allowed. The new regex is ugly,
but should include most of them.

Test Plan:
Joined the bot as phabot-c0d`eb1^ock successfully.

Reviewers:
epriestley

CC:

Differential Revision: 453
2011-06-13 19:24:23 -04:00
Jason Ge
f2efdd07a7 Use DatabaseConfigurationProvider to get DB info
Summary:
remove accessing the db config info directly. Use
DatabaseConfigurationProvider instead. Also fixed a minor issue where
different number of newlines are output in PhabricatorSetup.php's output.

Test Plan:
executed upgrade_schema.php; executed PhabricatorSetup.php by
setting 'phabricator.setup' to true.

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, jungejason, epriestley
Differential Revision: 443
2011-06-13 14:59:28 -07:00
epriestley
f706093933 Support thumbnailing non-image files and straighten out setup for 'gd'
Summary:
Make 'gd' an explicit optional dependency, test for it in setup, and make the
software behave correctly if it is not available.

When generating file thumnails, provide reasonable defaults and behavior for
non-image files.

Test Plan:
Uploaded text files, pdf files, etc., and got real thumbnails instead of a
broken image.

Simulated setup and gd failures and walked through setup process and image
fallback for thumbnails.

Reviewed By: aran
Reviewers: toulouse, jungejason, tuomaspelkonen, aran
CC: aran, epriestley
Differential Revision: 446
2011-06-13 13:49:17 -07:00
epriestley
cb0cbc50ad Add a "phd debug" command
Summary:
Make it easier to find obvious problems in daemons by letting them run
undaemonized in the console without requiring the user to know the magical
incantations for loading libraries, etc.

Test Plan:
Ran "phd debug nice", simulated some failures (e.g., bringing down Phabricator,
daemon fatal) and got useful error messages.

Reviewed By: jungejason
Reviewers: toulouse, jungejason, tuomaspelkonen, aran
CC: aran, jungejason
Differential Revision: 448
2011-06-13 13:42:01 -07:00
epriestley
d710fc097f Improve messaging and setup process for configuring outbound email.
Summary:
- Make the instructional text generally more useful.
  - Show the current configured adapter.
  - When the configuration prevents outbound email from being delivered, show a
warning.
  - Detect 'curl' extension during setup since it's more-or-less required
  - Add curl extension to the install scripts

codeblock: can you verify the rhel-derivs changes are correct?

Test Plan:
Set adapter to test, verified warning; entered setup mode and verified curl. Ran
apt-get on an ubuntu box. Ran yum on an amazon linux box.

Reviewed By: toulouse
Reviewers: toulouse, codeblock
Commenters: codeblock
CC: aran, jungejason, tuomaspelkonen, codeblock, epriestley, toulouse
Differential Revision: 438
2011-06-12 22:40:18 -07:00
epriestley
fedbd475b5 Create phd PID directory if it doesn't exist, and give the user a meaningful
error message if that doesn't work

Summary:
This workflow is needlessly bad right now, make it not terrible.

Also removed some related, unused code.

Test Plan:
Ran 'phd launch nice' with no directory and with a failing mkdir command.

Reviewed By: toulouse
Reviewers: hsb, toulouse, codeblock
CC: aran, toulouse
Differential Revision: 440
2011-06-12 22:40:07 -07:00
epriestley
d22e6b277f Fix http / https check in setup
Summary:
There was a last-minute edit to this to fix a typo before rP089d8327 landed
which accidentally made it impossible to pass the check. :)

Test Plan:
Put install into setup mode, changed protocol to 'http', 'ftp'.

Reviewed By: cadamo
Reviewers: toulouse, codeblock, cadamo
Commenters: toulouse, codeblock
CC: aran, cadamo, toulouse, codeblock
Differential Revision: 434
2011-06-11 14:53:45 -07:00
epriestley
0ad2b526bc Don't mention the same object in IRC more than once every 10 minutes
Summary:
phabot gets spammy when discussing a specific revision.

Test Plan:
Added debugging code and produced a reasonable-looking chatlog:

  [1:15pm] phabotlocal joined the chat room.
  [1:15pm] epriestley: D5
  [1:15pm] phabotlocal: D5 quack - http://local.aphront.com/D5
  [1:15pm] epriestley: D5
  [1:15pm] phabotlocal: Declining to mention PHID-DREV-d7940d0fe081e3ae5267
again (59s left).
  [1:15pm] epriestley: D5
  [1:15pm] phabotlocal: Declining to mention PHID-DREV-d7940d0fe081e3ae5267
again (57s left).
  [1:15pm] CodeBlock: nice :D
  [1:15pm] epriestley: I should just leave that code in for maximum irony.
  [1:15pm] epriestley: D5
  [1:15pm] phabotlocal: Declining to mention PHID-DREV-d7940d0fe081e3ae5267
again (9s left).
  [1:16pm] epriestley: D5
  [1:16pm] phabotlocal: Declining to mention PHID-DREV-d7940d0fe081e3ae5267
again (2s left).
  [1:16pm] epriestley: D5
  [1:16pm] phabotlocal: D5 quack - http://local.aphront.com/D5
  [1:16pm] epriestley: D5
  [1:16pm] phabotlocal: Declining to mention PHID-DREV-d7940d0fe081e3ae5267
again (57s left).
  [1:16pm] epriestley: rJUI100
  [1:16pm] phabotlocal: http://local.aphront.com/rJUI100
  [1:16pm] epriestley: rJUI100
  [1:16pm] phabotlocal: Declining to mention PHID-CMIT-8fb731b171a27b8d477c
again (55s left).
  [1:16pm] phabotlocal left the chat room. (Remote host closed the connection)

Reviewed By: aran
Reviewers: aran, codeblock, hsb, mroch
CC: aran
Differential Revision: 420
2011-06-09 13:48:03 -07:00
epriestley
79b5343d6b Remove "@" from resource map include since there is no reason to silence this file and it makes it impossible to find syntax errors. 2011-06-09 12:30:28 -07:00
epriestley
94d0adb140 Add "Undo" for editing Differential inline comments
Summary:
When a user hits 'cancel' on a 'new', 'edit', or 'reply' operation, add a little
"Changes discarded. __Undo__" insert so they can get their change back. No undo
for delete since there's an explicit prompt. Once this lands we can make
'escape' work again to close dialogs.

This change started feeling really good when I was merging all the duplicate
code and making things more consistent, but by the time I started writing client
rendering it felt gross. I'm not really thrilled with it but I guess it's a step
forward? The feature seems pretty OK in practice. Let me know how much barfing
this causes and I can try to remedy the most acute concerns.

This also fixes a bug where replies always (?) appear on the 'new' side of the
diff (I think?).

Test Plan:
Applied 'new', 'edit', 'delete' and 'reply' operations, pressed 'cancel' and
'okay' in each case, with and without changing text where relevant. All
behaviors seem to conform with expectations, except that canceling out of 'edit'
without changing the text gives you an option to undo when it shouldn't really.
There's no super easy way to get at the original text right now.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: simpkins, aran, epriestley
Differential Revision: 406
2011-06-08 10:44:01 -07:00
Evan Priestley
b8e1ead481 Merge pull request #12 from DamianZaremba/master
Path issues in PhabricatorSetup.php
2011-06-03 16:45:57 -07:00
cadamo
089d8327b3 Fix regenerate arcanist cert, setup stuff and avoid accept non valid image files as profile picture.
Summary:
Well, since I couldn't regenerate my arcanist cert I figured out that this wass because "workflows" are unavailable there now. I really can not figure out why but it was.
I added in the setup script, the ability to check if is present the protocol of the host and if it has a trailing slash a the end of the line, since both are needed to generate the cert.

Users now only be able to upload valid image files with mimetype of jpg, jpeg,
png and gif.

Test Plan:
FIRST: DO NOT apply those changes! then
1- go to settings->arcanist certificate and the click on regenerate ... humm
2- On your config file, delete the trailing slash at the end and the protocol on "phabricator.base-uri", then go to setting->arcanist certificate. Here you
will see something like this "phabricator.example.comapi\/" instead of
"http:\/\/phabricator.example.com\/api\/".

SECOND: Now apply this changes:
1- Go to settings->arcanist certificate and the click on regenerate.
2- On your config file, delete the trailing slash at the end and the protocol
on "phabricator.base-uri", and setup "phabricator.setup" to true.
3- Then go to setting->arcanist certificate and you could see that this was successfully generated.

THIRD:
Go to settings->account and try to upload an invalid image file, and do the same on "youruserna"->edit profile.

Reviewed By: epriestley
Reviewers: epriestley jungejason
CC: epriestley jugesason cadamo aran
Differential Revision: 391
2011-06-02 23:27:10 -03:00
epriestley
d96d515cc2 Add comment linking to Maniphest and Differential
Summary:
Allows you to link to comments with "D123#3" or "T123#3", then adds a pile of JS
to try to make it not terrible. :/

The thing I'm trying to avoid here is when someone says "look at this!
http://blog.com/#comment-239291" and you click and your browser jumps somewhere
random and you have no idea which comment they meant. Since I really hate this,
I've tried to avoid it by making sure the comment is always highlighted.

Test Plan:
Put T1#1 and D1#1 in remarkup and verified they linked properly.

Clicked anchors on individual comments.

Faked all comments hidden in Differential and verified they expanded on anchor
or anchor change.

Reviewed By: aran
Reviewers: aran, tomo, mroch, jungejason, tuomaspelkonen
CC: aran, epriestley
Differential Revision: 383
2011-05-31 11:11:19 -07:00
epriestley
ead9bbfeb1 Test for pcntl availability from the command line, not Apache
Summary:
In RHEL6 at the least, pcntl installs from distro package management to the CLI
but not to Apache. Since we don't need it in apache and it's a pain to build
manually, just verify it exists on the CLI.

Test Plan:
Simulated script failures and verified setup output.

Reviewed By: codeblock
Reviewers: codeblock, aran, jungejason, tuomaspelkonen
CC: aran, epriestley, kevinwallace, codeblock
Differential Revision: 380
2011-05-30 21:02:08 -07:00
epriestley
8ae765f6d7 Enable SendGrid Parse API as an inbound email handler
Summary:
Sendmail is seriously difficult to configure; SendGrid is extremely easy. It's
also pretty expensive ($80/mo) but there are a bunch of startups that already
have plans so it's effectively free for them.

Test Plan:
Configured SendGrid and sent reply email through it.

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran, epriestley
Differential Revision: 376
2011-05-30 12:28:33 -07:00
epriestley
d3fed84b9c Minor IRCBot fixes/upgrades
Summary:
Keep him from getting killed every 24 hours by the overseer, add basic commit
support.

Test Plan:
Ran irc bot, fed him a commit, fed him "http://blah/D1".

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen, codeblock, mroch
CC: aran, epriestley
Differential Revision: 377
2011-05-30 12:24:39 -07:00
Damian Zaremba
e7d2e96c23 Changing the method of validating sendmail exists on the system.
Summary:
Removes calling `which` and instead checks the file path that PHPMailerLite uses directly (/usr/bin/sendmail).

This fixes $PATH export issues which occur on certain platforms causing un-expected errors during setup.

Test Plan:
* Run setup on server without sendmail install & error should be presented.
* Install sendmail then re-run setup & no error should be presented.

Reviewers: epriestley

Differential Revision: 375
2011-05-30 02:57:44 +01:00
Aizat Faiz
fdf39a9cb1 Add PHP openssl extension as a dependency
Summary:
After successfully installing phabricator on my Mac OS X 10.6.7, I was unable to
link my accounts to either Facebook or GitHub.

I diagnosed that file_get_contents() and fopen() were not working properly.

After installing the php openssl package I was able to get it linking
successfully.

Test Plan:
With php's openssl extension disabled, and phabricator installed. Try linking to
Facebook and GitHub and observe that it fails.  You can visit the Auth
Diagnostics page and "Facebook Graph" and "App Login" should fail.

With php's openssl extension enabled, linking to Facebook and GitHub should be
successful.

Change the configuration to add "phabricator.setup = false".

Disable php's openssl extension.  Visit the phabricator site and observe that it
requires you to install php's openssl extension.

Enable php's openssl extension. Visit the phabricator site and observe that it
installs fine.

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 352
2011-05-28 08:53:08 +08:00
tuomaspelkonen
19e10b2b5d Embedded youtube videos.
Summary:
Markup support for embedding Youtube videos.

Test Plan:
https://www.youtube.com/watch?v=Vw4KVoEVcr0 was embedded

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 353
2011-05-27 13:50:58 -07:00
adonohue
36a6fcb573 diffusion.getrecentcommitsbypath
Summary:
Implement diffusion.getrecentcommitsbypath, a Conduit wrapper over
DiffusionHistoryQuery which returns results suitable for consumption by
diffusion.getcommits.

Test Plan:
Conduit console

Reviewed By: epriestley
Reviewers: epriestley
CC: aran, epriestley
Differential Revision: 315
2011-05-19 15:59:38 -07:00
epriestley
5fdea30878 Documentation: improve Diffusion documentation 2011-05-19 13:40:40 -07:00
Julius Seporaitis
cb8348c8eb Added PCNTL extension to the required extensions list. 2011-05-18 11:46:04 +03:00
epriestley
28146171ce Add an "IRC Object Name" handler for D12345
Summary:
I need to add some more conduit methods / info to make this at all useful but
here's some basics.

Test Plan:
Hung out in #phabot-test

Reviewed By: mroch
Reviewers: mroch, codeblock, aran, jungejason, tuomaspelkonen
CC: aran, mroch, epriestley
Differential Revision: 300
2011-05-17 16:16:25 -07:00
epriestley
f1d43bc3c5 Establish a Conduit connection from PhabricatorIRCBot
Summary:
Allow construction of handlers which use Conduit.

Test Plan:
Made a bot that connects to local and runs conduit.ping.

Reviewed By: mroch
Reviewers: mroch, codeblock, aran, jungejason, tuomaspelkonen
CC: aran, mroch
Differential Revision: 299
2011-05-17 16:16:07 -07:00
epriestley
84731e8f00 Aphlict, simple notification server
Summary:
This is purely a prototype at the moment, but the basic functionality sort of
works.

I'm not sure how far I want to go with this but I think we might be able to get
somewhere without it being gross.

The idea here is to build a notification server WITHOUT using Comet, since Comet
is extremely difficult and complicated.

Instead, I use Flash on the client. LocalConnection allows flash instances to
talk to each other and connect() can be used as a locking primitive. This allows
all the instances to elect a master instance in a race-safe way. The master is
responsible for opening a single connnection to the server.

On the server, I use Node.js since PHP is pretty unsuitable for this task.

See Github Issue #3: https://github.com/facebook/phabricator/issues/3

One thing I need to figure out next is if I can reasonably do SSL/TSL over Flash
(it looks like I can, in theory, with the as3crypto library) or if the server
needs to just send down version information and trigger a separate Ajax call on
the client.

Test Plan:
Created a client pool and connected it to the server, with election and failover
apparently working correctly.

Reviewed By: aran
Reviewers: Girish, aran, jungejason, tuomaspelkonen, davidrecordon
Commenters: Girish, davidrecordon
CC: aran, epriestley, Girish, davidrecordon
Differential Revision: 284
2011-05-17 10:32:41 -07:00
epriestley
417ca39703 Update Phabricator to new PhutilServiceProfiler APIs
Summary:
Get rid of the Phabricator-level DarkConsole-specific API and use the more
general Phutil-level one.

Test Plan:
Loaded DarkConsole services plugin, viewed Diffusion, got execs in the trace.

Reviewed By: aran
Reviewers: aran, jungejason, tuomaspelkonen
CC: aran
Differential Revision: 293
2011-05-16 17:10:18 -07:00
epriestley
3fdc115b54 Very basic IRC Bot
Summary:
This is sort of a silly/fun project but I think there's some utility. For
example, mroch added some handlers to an eggdrop or something similar to look
for "D12345" and print out the title/link, which was actually pretty useful.

We could also add logging here and subsume the more-or-less unowned Facebook
tool that does the same thing, especially since we can get a bunch of good stuff
it doesn't support (like search) more or less for free.

This is also an easy way to provide some example code for writing Conduit system
agents.

This is a minimal implementation which creates a bot that connects to a
hard-coded server and sits there indefinitely. Next steps:

  - Add conduit/sysagent support
  - Write differential/maniphest/diffusion handlers
  - Move configuration to the web interface (?) and integrate with phd
  - Write a logging handler?

Test Plan:
Ran bot with "exec_daemon.php", it connected to the hard-coded server and sat
there indefinitely.

Reviewed By: aran
Reviewers: codeblock, mroch, tuomaspelkonen, aran, jungejason
CC: aran, epriestley
Differential Revision: 283
2011-05-16 13:18:02 -07:00
epriestley
8391767d8c Improve setup process / documentation for outbound email configuration
Summary:
ccheever did an install and gave me some feedback about issues he hit. This
tries to:

  - properly document how to configure outbound email;
  - test outbound email configuration in the setup mode;
  - provide basic daemon documentation;
  - document that phabricator.base-uri is required for all installs.

Test Plan:
read documentation, jumped through all the setup branches to test configuration
error detection

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran, rm
CC: ccheever, aran
Differential Revision: 276
2011-05-12 11:01:03 -07:00
epriestley
f36c852542 Issue a warning if javelinsymbols is not built
Summary:
Currently, the Javelin linter fails completley if this binary is missing.
However, it's hard to build and not critical so just issue a warning.

Eventually we can document this better and make the build easier, but the
current behavior is pretty unfriendly so make it smoother until the state of the
world can be improved.

Test Plan:
Removed the binary and ran "arc lint --lintall" against multiple Javelin paths.
Received one warning. Restored the binary and ran with "--trace", got no
warnings and verified that the binary was running.

Reviewed By: jungejason
Reviewers: tuomaspelkonen, jungejason, aran, tomo
CC: aran, jungejason
Differential Revision: 265
2011-05-11 12:08:19 -07:00
epriestley
3b8ff34f9b Fix some minor Celerity / ShapedRequest bugs:
- Force celerity to do disk reads in dev.
  - Clean up some ShapedRequest clownery.
2011-05-11 03:43:40 -07:00
epriestley
f7e2b03077 Add a "setup" mode which guides new users through application configuration
Summary:
Alters the installation instructions to guide installers into a "setup" mode
which does config file sanity checking.

Test Plan:
Put myself in setup mode, simulated all the failures it detects, took myself out
of setup mode, Phabricator works OK.

Reviewed By: tuomaspelkonen
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran, tuomaspelkonen, epriestley
Differential Revision: 230
2011-05-10 15:12:30 -07:00
epriestley
e27c5f26e5 Allow Celerity to return "304 Not Modified" responses
Summary:
We always return HTTP 200 right now and don't send a "Last-Modified" header, so
browsers download more data then necessary if you sit on a page mashing reload
(for example).

Test Plan:
Used Charles to verify HTTP response codes from 400, 404 and 304 responses.

Mashed reload a bunch and saw that the server sent back 304s.

Changed the resource hash seed and saw 200s, then 304s on reload.

Reviewed By: tuomaspelkonen
Reviewers: tuomaspelkonen, jungejason, aran
CC: bmaurer, aran, tuomaspelkonen
Differential Revision: 253
2011-05-10 14:33:11 -07:00
epriestley
561e98facc Update externals/javelin to point at non-broken HEAD, plus some lint fixes. 2011-05-09 10:11:17 -07:00
epriestley
2a39fd09eb Bring Javelin into Phabricator via git submodule, not copy-and-paste
Summary:
Javelin is currently embedded in Phabricator via copy-and-paste of prebuilt
packages. This is not so great.

Pull it in as a submodule instead and make all the Phabriator resources declare
proper dependency trees. Add Javelin linting.

Test Plan:
I tried to run through pretty much all the JS functionality on the site. This is
still a high-risk change, but I did a pretty thorough test

Differential: inline comments, revealing diffs, list tokenizers, comment
preview, editing/deleting comments, add review action.
Maniphest: list tokenizer, comment actions
Herald: rule editing, tokenizers, add/remove rows

Reviewed By: tomo
Reviewers: aran, tomo, mroch, jungejason, tuomaspelkonen
CC: aran, tomo, epriestley
Differential Revision: 223
2011-05-08 13:20:10 -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
80b75a5f3b Provide connection isolation to Lisk and enable it by default in tests
Summary:
Allow Lisk to be put into process-isolated mode which establishes
only isolated connections. By default, put it into this mode when running
unit tests. Build some simple unit tests around object insertion and
updating.

NOTE: The one flaw in this is that $dao->establishConnection() still
punches through the isolation layer. I need to do an API change to fix this
though so I'm holding it for now. It will probably just rename getConnection()
to establishConnection() and then rename establishConnection() to something
scary like establishLiveExternalConnection().

Test Plan:
Ran unit tests.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran, epriestley
Differential Revision: 194
2011-04-30 22:24:50 -07:00
epriestley
7387cd63ac Provide an "isolated" database connection for testing
Summary:
This provides a new connection which doesn't connect to
anything, so effects can be isolated to the current process (for
unit testing).

Test Plan:
Ran unit tests.

Reviewed By: aran
Reviewers: aran, tuomaspelkonen, jungejason
CC: aran, epriestley
Differential Revision: 193
2011-04-30 22:24:26 -07:00
epriestley
baab61a01e Correct a mask config value
Summary:
The correct name of this key is 'github.application-secret', not
'github.secret'. Make DarkConsole check that all the masked keys exist to
prevent this from happening again. This isn't super important since this
is just intended to protected against casual security lapses (taking a
screenshot with DarkCnosole's "Config" tab open, for instance) but it's easy
to check for so it seems worthwhile to get right.

Test Plan:
Loaded page without the actual config file change, got an exception.
Fixed the config, reloaded the page, good news goats (really trying to get this
to catch on since goats are adorable).

Reviewed By: aran
Reviewers: tuomaspelkonen, jungejason, aran
CC: aran
Differential Revision: 189
2011-04-30 11:56:16 -07:00
epriestley
79d037fe66 Use a stricter regexp in Diffusion remarkup
Summary:
Just minor bookkeeping, but the current regexp is too liberal and
will match things which can't possibly be revision hashes.

Test Plan:
Typed things which should and shouldn't be revision links, they
got handled properly.

Reviewed By: aran
Reviewers: jungejason, tuomaspelkonen, aran
CC: aran
Differential Revision: 185
2011-04-29 20:26:30 -07:00
tuomaspelkonen
976d1e65df Fixed image macro with '-' in the name.
Summary:
Fixed the image macro regex not to use '-' as the separator.
Also minor improvement to randomon.

Test Plan:
Tried different image marcors.

Reviewed By: jungejason
Reviewers: jungejason
CC: epriestley, jungejason
Differential Revision: 153
2011-04-20 16:51:26 -07:00
jungejason
c223aaa79e Enable phd to load extra libraries
Summary: add --load-phutil-library for libraries other than phabricator
and libphutil.

Test Plan: launch a daemon in facebook such as
PhabricatorDifferentialCommentDaemon.

Reviewers: epriestley, tuomaspelkonen

CC:

Differential Revision: 146
2011-04-15 18:57:03 -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
a2a6509dc8 Restore linking of Diffusion commits. 2011-04-11 03:02:19 -07:00
epriestley
bb79418615 Don't send sandbox URIs in Herald messages. 2011-04-04 14:23:03 -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
01b2a6bbe1 Show and reap dead daemons from phd. 2011-03-27 00:23:39 -07:00
epriestley
ab2b83ce14 Fix chdir() + proc_open() php 5.2 issues. 2011-03-15 20:55:05 -07:00
epriestley
bb144542d3 Diffusion/phd/console improvements. 2011-03-15 13:38:14 -07:00
epriestley
bf196910b0 More phd stuff. 2011-03-15 10:23:35 -07:00
epriestley
8bcbeface1 Increase parseriness of some parsery things.
Summary: None of these are parsnips.

Test Plan:

Reviewers:

CC:
2011-03-11 09:34:22 -08:00
epriestley
ec084ca419 Rough cut of Workers
Summary: workers do work, provided I have written them correctly. perhaps it
is so.

Test Plan:

Reviewers:

CC:
2011-03-10 13:48:29 -08:00
epriestley
57495c4287 Rough cut of repository tracking
Summary: Basic scaffolding for repository tracking, plus daemon infrastructure
(Timelines, Cursors) and some fixes (memory usage, mysql_connect() junk).

Test Plan: parsed Javelin git commit history via daemon

Reviewers:

CC:
2011-03-06 22:29:22 -08:00
epriestley
eccc76dae6 Fix some issues caught by HipHop, and work around some issues
caused by HipHop.
2011-02-26 21:01:42 -08:00
epriestley
147d2e2e3d Rought cut of search.
Summary: Botched this pretty badly in git so we'll see how much I broke. :/

Test Plan:

Reviewers:

CC:
2011-02-14 15:34:20 -08:00
epriestley
8784b5bd3b Link "DNNNN" and "TNNNN" in Phabricator remarkup.
Summary: Autolink Differential and Maniphest objects.

Test Plan: Typed "D12345" and "T12345" into the Differential comment preview,
got links. Typed "http://www.elsewhere.com/D12345" and got a single link to
that URI, not a mess where the D12345 part linked incorrectly.

Reviewers: aran

CC:

Differential Revision: 35
2011-02-11 18:07:45 -08:00
epriestley
3b7d73c41b Add a "Config" plugin to DarkConsole.
Summary: This plugin lets you see how the host is configured at runtime.

Test Plan:

Reviewers:

CC:
2011-02-11 16:48:43 -08:00
epriestley
9dac0ed9f1 Bring in JX.Workflow and the inline commenting behavior, plus sync Javelin. 2011-02-01 15:52:04 -08:00
epriestley
03fec6e911 PhabricatorEnv
'infratructure' -> 'infrastructure' (rofl)
Recaptcha
Email Login / Forgot Password
Password Reset
2011-01-31 11:55:26 -08:00