Fix typo in comment
Define and use a const instead of 77

Summary: Instead of randomly calling `exit(77)`, we should use a constant instead.

Test Plan: lint, unit, visual inspection

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3266
fix issue 179 of phabricator; ^ lookbehind is not really required
Merge pull request #14 from yunake/master

Work-around the lookbehind pcre bug
Allow intra-domain links in Remarkup

Summary:
When parsing a link of the form `[[/path/...]]`, the protocol
gets marked as `''`, which is not allowed, so the link doesn't get
linkified and later turns into a Phriction link. The previous line
specifically allows this case, so it's a bit silly. So if the URI starts
with `/`, skip the protocol check.

Test Plan: Try linking things in Differential comments.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, starruler

Differential Revision: https://secure.phabricator.com/D3281
Export code block language from Remarkup

Summary:
When highlighting a block of code, annotate the block with the
language that was used.

Test Plan:
Load a Differential page with code blocks in comments;
examine DOM.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3282
Add a very crude spriting pipeline to libphutil

Summary:
There are a bunch of sprite tools out there, but I want a very high degree of control and repeatability in spriting: specifically, when Chad makes an icon look really pretty, I just want to Select All -> Paste Layer Style -> Save For Web... and then run a script and have everything work. This means reapeatable, scripted generation from multiple large source inputs, which none of the web tools can do.

Since I knew the amount of code involved in getting exactly what I wanted wasn't large, I just wrote it after poking around a bit on Google without finding any hidden gold.

Test Plan: Generated sprites. See next diff.

Reviewers: btrahan, chad, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3277
Don't treat START TRANSACTION as part of the transaction

Summary:
We use short transactions and we reconnect if the connection falls down outside transaction.
But `START TRANSACTION` is treated as part of the transaction so if connection falls while executing this command then we refuse to reconnect.

NOTE: We don't want `COMMIT` and `ROLLBACK` put outside transaction because if connection falls before executing them we need to throw away everything.

Test Plan: Created a very large diff with lots of Herald rule evealuating longer than `wait_timeout`.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3285
Fix wrapping of strings longer than line length

Test Plan: Updated test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3316
Allow adding Futures to a FutureIterator while running

Test Plan: arc unit FutureIteratorTestCase (it could have a lot more tests in it)

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3323