1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 17:02:41 +01:00
Commit graph

2736 commits

Author SHA1 Message Date
epriestley
27b86d5132 Add a sprite generation script to Phabricator
Summary: This probably needs some tweaks, but gets the point across. I'll lay in the actual usage in the next diff.

Test Plan: Looked at generated CSS/PNG.

Reviewers: btrahan, chad, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3278
2012-08-14 14:17:19 -07:00
Alan Huang
1855ed4bee Support symbol linking in Remarkup code blocks
Summary:
Trigger the crossreference behavior on code blocks. Limited to
Differential, where we know what the project is, but includes regular
comments, inline comments, and previews of both.

(Hopefully event handlers on deleted elements also get deleted, so we
don't leak memory? Also, caching is a problem, and I didn't find a way
to mark existing cache entries as stale, like
`DifferentialChangesetParser::CACHE_VERSION`...)

Test Plan:
Load Differential revision, make lots of comments, click on
things.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3283
2012-08-14 14:03:26 -07:00
Evan Priestley
0f076779b2 Merge pull request #180 from r4nt/differential-unified-comments
Adds an option to allow sending unified diff contexts in differential mails
2012-08-14 11:51:07 -07:00
epriestley
a061359cec Minor, fix 404 page. 2012-08-14 06:09:19 -07:00
Evan Priestley
70e59e58f0 Merge pull request #181 from nexeck/patch-1
Only enable menu entry "Import from LDAP" when ldap auth is enabled.
2012-08-14 05:23:09 -07:00
Marcel Beck
b57cf0dbe1 Update src/applications/people/controller/PhabricatorPeopleController.php
Only enable importing users from LDAP, if ldap auth is enabled.
2012-08-14 09:43:55 +03:00
Nick Harper
ef0f30b662 Use PhutilArgumentParser in reparse.php
Summary:
Update how arguments get parsed in reparse.php and add two new options
--force-local and --min-date (both to be used with --all). This diff also
fixes a bug in destroy_revision.php

Test Plan: ran the script

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3275
2012-08-13 19:35:30 -07:00
Bob Trahan
f748a47237 strncmp is better than strpos
Summary: no need to get all O(N) up in this when we can do constant time of "8"

Test Plan: arc lint

Reviewers: vrana, epriestley

Reviewed By: vrana

CC: aran, Korvin

Maniphest Tasks: T891

Differential Revision: https://secure.phabricator.com/D3271
2012-08-13 18:02:28 -07:00
vrana
6ce39db6ca Add ID to Pending Differential Revisions panel 2012-08-13 17:24:31 -07:00
Alan Huang
6fc01aa5fd Change background for image views in Differential
Summary:
Many images in Differential changesets are icons designed for
use on dark backgrounds. This makes them invisible on Differential's
white background. This adds an option to use a darker background
instead so you can see the images.

Currently this behavior is triggered on hover. (Also, it's a rather
garish fuchsia.) It seems fine UX-wise but I'm not totally sure of it.

Test Plan:
Load diff containing grippy_texture. Marvel at the grippy
fuchsia.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3272
2012-08-13 17:21:16 -07:00
epriestley
6f3d15bb82 Remove hard-coded tests against 'phabricator' namespace in setup
Summary: See https://github.com/facebook/arcanist/issues/49

Test Plan:
  - Turned on setup mode with non-default namespace.
  - Verified that setup tests passed.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3274
2012-08-13 17:10:51 -07:00
Bob Trahan
7bb3c39cde Polish removal of conduit shield, including legacy stripping for phabricator on phabricator oauth scenarios
Summary: ...just in case that stuff happens in the "wild". also cleaned up the logic here since we no longer have the conduit conditionality.

Test Plan: made sure I didn't break JS on the site. reasoned about logic of my function and asking people PHP typing questions in job interviews.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T891

Differential Revision: https://secure.phabricator.com/D3269
2012-08-13 16:05:56 -07:00
epriestley
8b8549128f Minor, update celerity map. 2012-08-13 15:36:28 -07:00
Bob Trahan
aa2ef37e94 quick, ghetto script to rescale profile pictures
Summary: we had a hole in scaling pics from oauth from a bit. that was patched in D2848. this cleans up the old data.

Test Plan: ran it in production. issue as described on task is resolved. also spot checked some profiles and they look good.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1634

Differential Revision: https://secure.phabricator.com/D3268
2012-08-13 15:29:34 -07:00
epriestley
66cee129b6 Remove all code referencing old tab navigation
Summary:
  - Add getHelpURI() to PhabricatorApplication for application user guides.
  - Add a new "help" icon menu item and skeletal Diviner application.
  - Move help tabs to Applications where they exist, document the other ones that don't exist yet.
  - Grep for all tab-related stuff and delete it.

Test Plan: Clicked "help" for some apps. Clicked around randomly in a bunch of other apps.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3267
2012-08-13 15:28:41 -07:00
epriestley
a68c30ce83 Modernize daemon application
Summary: Make it possible to get to stuff that used to be in tabs.

Test Plan: Clicked links and such.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3264
2012-08-13 15:27:45 -07:00
epriestley
e0e339f16c Modernize People application
Summary: Move to application navigation, make it possible to get to /logs/ from the navigation.

Test Plan: Hit all interfaces, verified email.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569, T631

Differential Revision: https://secure.phabricator.com/D3261
2012-08-13 15:27:21 -07:00
Bob Trahan
dd26bc6d1a Remove shield for Conduit API responses
Summary: 'cuz we don't need it and it's lame complexity for API clients of all kinds. Rip the band-aid off now.

Test Plan: used conduit console and verified no more shield. also did some JS stuff around the suite to verify I didn't kill JS

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T891

Differential Revision: https://secure.phabricator.com/D3265
2012-08-13 14:49:32 -07:00
vrana
0f919ecd3c Update line count after attaching commit diff
Summary: We should probably do this also in `differential.creatediff` but it's not a big deal because we later call `differential.updaterevision` which does this using `DifferentialRevisionEditor`.

Test Plan: None.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3263
2012-08-13 14:43:05 -07:00
Bob Trahan
26ae7b728c Tweak MetaMTA test console a bit for usability
Summary: default check the system send prefernce for immediateness and add more direct text about dameons, with a link to help.

Test Plan: looks good

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T726

Differential Revision: https://secure.phabricator.com/D3262
2012-08-13 14:41:12 -07:00
vrana
18a8964b03 Use correct constant in differential.createrawdiff 2012-08-13 13:51:13 -07:00
epriestley
20ac900e8b Make settings panels more modular and modern
Summary:
Currently, we have a hard-coded list of settings panels. Make them a bit more modular.

  - Allow new settings panels to be defined by third-party code (see {D2340}, for example -- @ptarjan).
  - This makes the OAuth stuff more flexible for {T887} / {T1536}.
  - Reduce the number of hard-coded URIs in various places.

Test Plan: Viewed / edited every option in every panel. Grepped for all references to these URIs.

Reviewers: btrahan, vrana, ptarjan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3257
2012-08-13 12:37:26 -07:00
epriestley
df5bf75e36 Move Settings to a separate directory
Summary:
We currently have two relatively distinct applications, "People" and "Settings", living in /people/. Move settings to its own directory.

This renames a couple of classes but makes no real code changes.

Test Plan: Browsed /settings/, changed some settings.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1569, T631

Differential Revision: https://secure.phabricator.com/D3256
2012-08-13 12:37:18 -07:00
epriestley
b2f12a09b5 Modernize MetaMTA
Summary:
  - Add an Application.
  - Move routes to the application.
  - Move nav out of tabs (which no longer exist).
  - Fix a couple of random things.

Test Plan: Viewed sent/received mail logs. Performed send/receive tests. Viewed email details.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T631, T1569

Differential Revision: https://secure.phabricator.com/D3255
2012-08-13 12:37:06 -07:00
Manuel Klimek
10773c5cb6 Adapt to style changes; fix performance bug when loading hunks for changesets. 2012-08-13 21:36:41 +02:00
Alan Huang
29e176fe53 Preserve transparency in thumbnails
Summary: Add some code from a random guy on the Internet.

Test Plan: Upload a PNG file with alpha; check thumbnail.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1646

Differential Revision: https://secure.phabricator.com/D3258
2012-08-13 12:31:13 -07:00
Manuel Klimek
0ce886121c Make comments easier to read. 2012-08-13 21:20:36 +02:00
vrana
1379876db7 Remove subsets when cleaning Lisk set 2012-08-13 11:39:59 -07:00
vrana
f841491524 Use Lisk sets in fact update iterator
Summary:
Fact engines loading dependent objects are super slow because they load them one by one.
This diff put each page in a Lisk set allowing engines to use `loadRelatives()`.

It also introduces `clearSet()` method which is somewhat neccessary in PHP < 5.3 or with disabled cyclic [[ http://php.net/gc | GC ]].

Test Plan:
  $iterator = new PhabricatorFactUpdateIterator(new DifferentialRevision());
  foreach ($iterator as $revision) {
    $diffs = $revision->loadRelatives(new DifferentialDiff(), 'revisionID');
    echo memory_get_usage() . "\n";
  }

Experienced not-steadily-increasing memory usage and much faster loading.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3247
2012-08-13 10:26:17 -07:00
epriestley
74b438db13 Move "Mailing Lists" to a separate application
Summary:
There's currently no way to get here from the UI since nav tabs don't exist anymore. It's also always been hard to find this feature even when we had the tabs, since it's surprising that it's inside "MetaMTA".

  - Move mailing lists to a separate application.
  - Add `buildApplicationPage()`, since we don't really need `buildStandardPageResponse()` any more -- we can infer all the information from `PhabricatorApplication`. This will let us get rid of a lot of the `PhabricatorXXXController` classes which just define application information.
  - Add `getApplicationURI()` to reduce code duplication, and in case we want to let you move applications around some day.

Test Plan: Looked/edited/saved mailing lists.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T631

Differential Revision: https://secure.phabricator.com/D3248
2012-08-12 19:19:46 -07:00
Manuel Klimek
17217fda28 Adds an option to allow sending unified diff contexts in differential mails. 2012-08-12 19:49:04 +02:00
David Reuss
df3162584e Convert to custom encoding for diffusion blame views
Summary:
If a repository is configured with a custom encoding, it wasn't respected by DiffusionGitFileContentQuery making all views with
non-UTF8 characters fail. Check if we have a custom encoding and encode if any it set.

NOTE: This only works for Git repositories.

Test Plan: Browsed a repository with custom encoding before and after this patch.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D3251
2012-08-12 08:50:49 -07:00
epriestley
3e29921f5e Use phutil_utf8_convert() in Phabricator
Summary: See D3252.

Test Plan: This one is nasty to test, I'm going to make some coffee first.

Reviewers: davidreuss, vrana, btrahan

Reviewed By: davidreuss

CC: aran

Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D3254
2012-08-12 08:50:19 -07:00
epriestley
a8a4e85443 Minor, did not intend to land this actively quite yet. 2012-08-12 06:39:50 -07:00
epriestley
d3fd790574 Add basic support for new navigation menu
Summary:
Add a new left-side application menu. This menu shows which application you're in and provides a quick way to get to other applications.

On desktops, menus are always shown but the app menu can be collapsed to be very small.

On tablets, navigation buttons allow you to choose between the menus and the content.

On phones, navigation buttons allow you to choose between the app menu, the local menu, and the content.

This needs some code and UI cleanup, but has no effect yet so I think it's okay to land as-is, I'll clean it up a bit as I start integrating it. I want to play around with it a bit and see if it's good/useful or horrible anyway.

Test Plan: Will include screenshots.

Reviewers: vrana, btrahan, chad

Reviewed By: btrahan

CC: aran, alanh

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3223
2012-08-11 07:06:12 -07:00
epriestley
7b068d3e46 Reverse project paging order
Summary:
Currently, we're showing projets in reverse order (Z..A) because most cursor pagers go from high IDs to low IDs.

Allow sequence to be reversed; reverse it.

Also simplify some query/paging stuff.

Test Plan: Set page size to 1, paged back and forth.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3221
2012-08-11 07:05:45 -07:00
epriestley
b00c28a360 Add project join/leave tests
Summary: Add test coverage for joining and leaving projects.

Test Plan: Ran tests.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3220
2012-08-11 07:05:20 -07:00
epriestley
bd0be1c650 Add View, Edit and Join policies to PhabricatorProject
Summary:
  - In ProjectQuery, always load the viewer's membership in the project because we need it to perform a CAN_VIEW test.
  - Add storage for the view, edit and join policies.
  - A user can always view a project if they are a member.
  - A user can always join a project if they can edit it.
  - Editing a project requires both "view" and "edit" permissions, and edit does not imply view.
  - This has no effect on the application yet.

Test Plan: See next diff.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3219
2012-08-11 07:05:01 -07:00
epriestley
6cbc67ea75 Improve PolicyFilter and PolicyQuery
Summary:
  - Allow PolicyQuery to require specific sets of capabilities other than "CAN_VIEW", like edit, etc. The default set is "view".
  - Add some convenience methods to PolicyFilter to test for capabilities.

Test Plan: Viewed pastes, projects, etc. Used other stuff in future diff.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3212
2012-08-11 07:02:31 -07:00
Nick Harper
62b3e4aea3 Remove a check for closing revisions
Summary:
I ran into a case where a commit isn't "new" but hasn't been closed. I
think the check on the status of the differential revision should be
enough and this check isn't needed.

Test Plan:
used the reparse.php script to close a revision that previously wouldn't
close.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3232
2012-08-10 16:15:37 -07:00
Wez Furlong
4eebd545ce Removing memory limit sanity check
Summary:
Turns out that 12 characters is not enough for folks that have
memory_limit set to INT64_MAX (9223372036854775807).

Since this only seems to have affected a single installation,
epriestley says let's get rid of it.  If it comes up again, we can
restore the check but use a bigger number.

Test Plan: Just make a call to the phabricator webroot.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1641

Differential Revision: https://secure.phabricator.com/D3246
2012-08-10 15:31:04 -07:00
vrana
b2c9edd17d Fix doc links 2012-08-10 14:21:55 -07:00
epriestley
0597e765de Minor, celerity map update. 2012-08-10 12:13:22 -07:00
epriestley
81f8b507fe Use shinier menu icons
Summary:
  - Use @chad's nice gradient overlay icons.
  - Show selected states.
  - Use profile picture for profile item (not sure about this treatment?)
  - Workflow the logout link

Test Plan: Will add screenshots.

Reviewers: alanh, btrahan, chad

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3225
2012-08-10 12:11:24 -07:00
epriestley
055e8f07ab Improve arcanist documentation
Summary:
There's some good feedback from Wikimedia here:

http://lists.wikimedia.org/pipermail/wikitech-l/2012-August/062252.html

Try to improve on some of it. In particular:

  - Make it clear that /arcanist/ is not where you should be (D3235).
  - Provide better connections from "Arcanist User Guide" to other documents.
  - Provide a "Quick Start" guide with a simpler set of instructions that links to richer documentation.
  - Reorganize the project setup guide to put more important things earlier on.
  - Make it clear that you should commit `.arcconfig`.
  - Provide more hints for initial setup.
  - Describe and organize advanced configuration/extension documentation as more clearly separate from basic setup/install documentation.

Test Plan: Generated, read docs.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3236
2012-08-10 12:00:40 -07:00
epriestley
62b06f0f5d Fix a memory leak in PhabricatorGlobalLock
Summary:
We currently cache all connections in LiskDAO so we can roll back transactions when fixtured unit tests complete.

Since we establish a new connection wrapper each time we establish a global lock, this cache currently grows without bound.

Instead, pool global lock connections so we never have more than the largest number of locks we've held open at once (in PullLocalDaemon, always 1).

Another way to solve this is probably to add an "onclose" callback to `AphrontDatabaseConnection` so that it can notify any caches that it been closed. However, we currently allow a connection to be later reopened (which seeems reasonable) so we'd need a callback for that too. This is much simpler, and this use case is unusual, so I'd like to wait for more use cases before pursing a more complicated fix.

Test Plan:
Ran this in a loop:

    while (true) {
      for ($ii = 0; $ii < 100; $ii++) {
        $lock = PhabricatorGlobalLock::newLock('derp');
        $lock->lock();
        $lock->unlock();
      }
      $this->sleep(1);
    }

Previously it leaked ~100KB/sec, now has stable memory usage.

Reviewers: vrana, nh, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1636

Differential Revision: https://secure.phabricator.com/D3239
2012-08-10 11:28:43 -07:00
vrana
b1b2afce95 Support applications in aphrontpath.php
Test Plan:
  $ ./aphrontpath.php /diffusion/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3233
2012-08-10 10:48:08 -07:00
Pieter Hooimeijer
64472dd7b8 Adding Ponder-related files.
Summary:
Ponder is similar in spirit to the Wiki tool, but uses a Q&A
format and up/downvotes to signal user sentiment. Popular
questions are moved to the top of the feed on a 5-minute
cycle based on age (younger is better) and vote count (higher
is better).

Pre-apologies for noob diff.

Test Plan:
- `./bin/phd list` Should include `PonderHeatDaemon`; phd launch it
  if necessary.

- Navigate to /ponder/ ; observe sanity when adding questions,
  voting on them, and adding answers.

- Confirm that questions and answers are linkable using Q5 / Q5#A5 formatted object links.

- Confirm that searching for Ponder Questions works using built-in
  search.

Feedback on code / schema / whatever organization very welcome.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: gmarcotte, aran, Korvin, starruler

Differential Revision: https://secure.phabricator.com/D3136
2012-08-10 10:44:04 -07:00
vrana
9030fe8b09 Respect type in symbol query
Summary: Was completely ignored.

Test Plan: /diffusion/symbol/C/?type=function

Reviewers: alanh

Reviewed By: alanh

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3234
2012-08-09 22:28:17 -07:00
vrana
81946fc08d Join author and committer in Diffusion browse
Summary: Consistent with history view, simpler.

Test Plan: /diffusion/X/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3230
2012-08-09 18:15:58 -07:00