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

2991 commits

Author SHA1 Message Date
vrana
cfea1d29ee Unuse short ternary operator
Summary: We still support PHP 5.2.

Test Plan:
  $ arc lint

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3503
2012-09-17 13:45:49 -07:00
vrana
8e7ae7b33a Optimize reindex_everything.php
Summary:
We have two troubles with this script:

# Our revisions and commits don't fit in the memory. (Our tasks do :-).)
# Reindexing revisions is slow.

Test Plan: Ran it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3483
2012-09-17 13:34:41 -07:00
vrana
3c2cb13153 Fix bad rebase
Auditors: nh
2012-09-17 13:29:09 -07:00
Nick Harper
5978bbfc64 Do sampled profiling of requests
Summary:
People have occasionally complained about phabricator being slow. We have
the access log to look at to see when slowness happens, but it doesn't tell
us much about why it happened. Since it's usually a sporadic issue that's
reported, it's hard to reproduce and then profile. This change will allow us
to collect sampled profiles so we can look at them when slowness occurs.

Test Plan:
checking that sampling works correctly:
- set rate to 0; do several page loads; check no new entries in table
- set rate to 1; check that there's a new row in the table for each page load
- set rate to 10; check that some requests write to table and some don't
check new ui for samples:
- load /xhprof/list/all/, see a list with a lot of samples
- load /xhprof/list/sampled/, see only sampled runs
- load /xhprof/list/manual/, see only non-sampled runs
- load /xhprof/list/my-runs/, se only my manual runs

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3458
2012-09-17 10:53:45 -07:00
epriestley
a52af0b3ae Make it more clear that "Public" really means "Public"
Summary: In the long term I think we can probably just explain this feature better, but for now I want to make sure no one makes a mistake with "Public". This seems like a reasonable way to do it.

Test Plan: Looked at the policy selector dropdown.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3486
2012-09-17 10:17:25 -07:00
vrana
eaf7aedb05 Enforce blame in Skip Past This Commit
Test Plan:
# Set default view to non-blame.
# Visit URL with '?view=blame'.
# Click //Skip Past This Commit//.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3494
2012-09-14 09:52:55 -07:00
vrana
a430d0f9df Use 'w' connection in bin/storage
Test Plan:
Built a DB provider using readonly connection for 'r' mode. Then:

  $ arc unit

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3484
2012-09-13 22:36:35 -07:00
epriestley
2d66798c5d Fix one more issue for username "0". 2012-09-13 17:05:53 -07:00
epriestley
b77b4f7155 Fix another missing strlen for users with username "0". 2012-09-13 17:00:53 -07:00
epriestley
0e672e2435 Fix GitHub login failure for user with username "0". 2012-09-13 16:47:14 -07:00
Pieter Hooimeijer
390dfa210d fix ponder escaping issue
Summary: Question titles were not escaped; now they are.

Test Plan: Observe the escaping.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Differential Revision: https://secure.phabricator.com/D3490
2012-09-13 12:18:52 -07:00
vrana
34dfbdaf44 Open editor on highlighted line in Diffusion
Test Plan:
Edited:

  path$33
  path$33-35
  path

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3488
2012-09-13 11:22:00 -07:00
zacharyg
d714978f3f Fix error in ponder comment hiding.
Summary: I'm a tard

Test Plan: - view page

Reviewers: pieter

Reviewed By: pieter

CC: aran, epriestley, vrana

Maniphest Tasks: T1775

Differential Revision: https://secure.phabricator.com/D3487
2012-09-13 10:56:31 -07:00
zacharyg
09d8120b79 Hide Ponder add comment behind link
Summary: Does what it says on the tin

Test Plan: Viewed ponder question, expanded link, added comment

Reviewers: pieter, epriestley

Reviewed By: pieter

CC: vrana, aran, Korvin

Maniphest Tasks: T1775

Differential Revision: https://secure.phabricator.com/D3485
2012-09-13 10:43:04 -07:00
epriestley
a1df1f2b70 Allow projects to be set as policies
Summary:
  - Renames `PhabricatorPolicyQuery` to `PhabricatorPolicyAwareQuery` (a query which respects policy settings).
  - Introduces `PhabricatorPolicyQuery`, which loads available policies (e.g., "member of project X").
  - Introduces `PhabricatorPolicy`, which describes a policy.
  - Allows projects to be set as policies.
  - Allows Paste policies to be edited.
  - Covers crazy cases where you make projects depend on themselves or each other because you are a dastardly villan.

Test Plan: Set paste and project policies, including crazy policies like A -> B -> A, A -> A, etc.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3476
2012-09-13 10:15:08 -07:00
epriestley
b39175342d Add paste policy storage
Summary: Add storage to Pastes for view policies.

Test Plan: Set policies on pastes, see next diff.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3474
2012-09-13 10:11:14 -07:00
Pieter Hooimeijer
5883b4f50c adding comments to ponder
Summary: This is pretty spartan, but it does the job.

Test Plan:
Patch, update storage, add some comment
to your favorite question or answer.

Reviewers: nh, vrana, epriestley

Reviewed By: epriestley

CC: aran, Korvin, starruler, syrneus, me.here, victorzarate7

Maniphest Tasks: T1645

Differential Revision: https://secure.phabricator.com/D3471
2012-09-11 12:13:20 -07:00
epriestley
903f985983 Test commit for T945
Resolves T945 as fixed. (Also tweaks the regexp slightly.)
2012-09-11 10:43:49 -07:00
epriestley
346747c788 Detect tasks referenced in commit messages and either link or update the mentioned tasks. Refs T945
Summary: This takes the place of D2721 which I am going to abandon.

Test Plan:
* Make a commit with "Closes T###" in the summary field. See that the mentioned task gets closed.
* Make a commit with "refs T###" in the summary. See that it gets added as a related commit via edges.

Reviewers: 20after4

Reviewed By: epriestley

CC: aran, Korvin, champo

Maniphest Tasks: T945

Differential Revision: https://secure.phabricator.com/D3466
2012-09-11 10:37:30 -07:00
epriestley
303ad93996 Modernize UIExamples
Summary:
  - Get rid of an AphrontSideNavView callsite.
  - Modernize and simplify the application implementation.
  - Doesn't work perfectly on tablet/phone but that's because not all the UI examples work there yet.

Test Plan: Looked at /applications/ and /uiexample/.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3431
2012-09-11 09:56:40 -07:00
epriestley
1b7f04914c Make AphrontErrorView work on devices
Summary:
This is the last Paste UI element that doesn't work properly on tablets/phones. Make it flexible.

Also add empty states to Paste.

Test Plan: Viewed various errors, and `/uiexample/errors/`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D3429
2012-09-11 09:55:27 -07:00
vrana
d28c591e74 Don't fatal on duplicate field in commit message
Summary:
If the actual commit message has a duplicate field and we shouldAutoclose it then the commit message parser fails.
Put the error in `$errors` instead.

Test Plan:
Reparsed commit with duplicate field in message.
Tried to `arc diff` message with duplicate field.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3470
2012-09-10 17:24:39 -07:00
vrana
99949bec8d Link Phabricator tests
Test Plan: This diff.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3457
2012-09-07 15:04:44 -07:00
vrana
e18fb4406e Don't include view in Diffusion line permalink
Summary:
Including view in permalink seemed like the correct solution to me.
Instead, I delete it all the time when copying somewhere else.

Test Plan:
Clicked on the link.
Changed view on permalink.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3453
2012-09-07 08:15:40 -07:00
Nick Harper
ab01ef562e Don't require working copy to generate URIs in owners tool
Summary:
Owners packages might include repositories that are no longer tracked
(or checked out locally), and there's no reason why we need a working copy
to generate a diffusion link. Instead of displaying a red error box, this
diff allows the owners tool to render correctly.

Test Plan:
viewed /owners/view/all/ and /owners/package/395/ and verified no error box
for not having a checkout of the repository.

Reviewers: epriestley, vrana, wez

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3452
2012-09-06 20:38:19 -07:00
Nick Harper
90b60bc3c9 Load relationships for revision
Summary:
In the commit message parser worker, it tries to get relationships for a
revision without first loading them. (D3444 introduced the change.) This
is where the get happens, so I'm adding the load here - maybe it should be
added in the CommitMessageParserWorker instead?

Test Plan: Made this change, and my taskmaster daemons stopped failing.

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3448
2012-09-06 15:46:51 -07:00
vrana
958e6cd109 Add missing break statement 2012-09-06 15:12:57 -07:00
epriestley
0736592cff Add didParseCommit() to DifferentialFieldSpecification
Summary:
This is mostly ripped from D2721, but doesn't implement the T945 part.

After we parse a commit message, give DifferentialFieldSpecifications an opportunity to react to the message as well (e.g., by updating related objects).

Test Plan: Impelmented a var_dump() body, ran `reparse.php` on a commit.

Reviewers: vrana, 20after4, btrahan, edward

Reviewed By: 20after4

CC: aran

Maniphest Tasks: T945, T1544

Differential Revision: https://secure.phabricator.com/D3444
2012-09-06 12:13:51 -07:00
Nick Harper
7e1f5bc9df Allow redirecting when not logged in
Summary:
Without this, the https redirect doesn't work if you're not logged in, because
the login check in willBeginExecution happens before the redirect controller
can redirect. This also has the unpleasant effect of the login page on http
(when it should have redirected to https) not having any css or js.

Test Plan:
With the https redirect enabled, loaded phabricator without being logged in,
and saw that I got redirected to the https login page instead of seeing a
http login page.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3438
2012-09-05 14:16:46 -07:00
vrana
b3d7ed3e8e Respect users with duplicate real names in commit parser
Test Plan:
  $parser->resolveUserPHID('Lei Zhao');
  $parser->resolveUserPHID('Jakub Vrana');

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3437
2012-09-05 12:24:35 -07:00
epriestley
492b6e7a6d Improve Arcanist event doucmentation
Summary:
  - Soft dependencies on D3423, D3422, D3421.
  - Document the availability of 'workflow' on all events.
  - Improve instructions on building, configuring and debugging event handlers.

Test Plan: Read documentation.

Reviewers: vrana, nh

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3424
2012-09-05 11:41:32 -07:00
epriestley
9afb186c77 Move Ponder to AphrontSideNavFilterView
Summary: AphrontSideNavView is oldschool and I want to kill it.

Test Plan: Viewed Ponder, clicked both nav options.

Reviewers: pieter, vrana, btrahan

Reviewed By: pieter

CC: aran

Differential Revision: https://secure.phabricator.com/D3430
2012-09-05 11:41:19 -07:00
epriestley
dbc8218f06 Add 'viewer' to some Remarkup callsites
Summary:
I want to implement a `{P123}` rule to embed pastes, but we need viewers everywhere before it will work with privacy.

This is not exhaustive; many Remarkup callsites haven't been converted to `PhabricatorMarkupInterface` yet.

Test Plan: Looked at Maniphest, Differential, Diffusion, Phriction; added markup, made edits and hit previews.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3428
2012-09-05 11:40:48 -07:00
vrana
9b843a3d44 Allow linking unit tests
Summary:
We have lots of info about unit tests.
This allows linking them from Unit field.

Test Plan: Monkey patched `$test['link']`, clicked on it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3434
2012-09-05 11:02:06 -07:00
vrana
8ff52c0b6c Set viewer for all handles loaded in controllers
Summary:
I've replaced all `id(new PhabricatorObjectHandleData(...))->loadHandles()` by `$this->loadViewerHandles(...)`.
Lint caught one usage in a static method.

Test Plan: Displayed revision with sporadic author.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3432
2012-09-04 23:14:26 -07:00
vrana
efd59322f2 Display 'away date' in blame
Summary: I've done D3432 in the hope that it will fix also this...

Test Plan: Blamed sporadic author.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3433
2012-09-04 23:14:10 -07:00
vrana
285cb172e9 Try literal search if operator search fails in elasticsearch
Test Plan: Searched for `[test]` in /search/ and in revision dependencies.

Reviewers: epriestley

Reviewed By: epriestley

CC: tbrzezinsky, aran, Korvin

Maniphest Tasks: T1757

Differential Revision: https://secure.phabricator.com/D3427
2012-09-04 13:45:49 -07:00
epriestley
ee05fe81a4 Add redirect to HTTPS option
Summary: Rehash of D3411. In cgi/fcgi setups we have no idea if the request is HTTP or HTTPS as far as I can tell, so make this config-triggered again. Also handle @vrana's "off" case.

Test Plan: Set this flag, observed redirect to https when `$_SERVER['HTTPS']` was absent.

Reviewers: nh, vrana

Reviewed By: nh

CC: aran

Differential Revision: https://secure.phabricator.com/D3420
2012-09-04 09:56:30 -07:00
epriestley
e3c6dc687a Fall back to LDAP search attribute if username attribute is not configured
Summary:
See discussion in D3340. Some configurations set only a search attribute because their records are indexed by username (this is probably not quite the correct LDAP terminology). Other configurations use one attribute to search and a different attribute to select usernames.

After D3340, installs which set only a search attribute broke. Instead, fall back to the search attribute if no username attribute is present.

Test Plan: Successfully logged in on my test slapd.

Reviewers: yunake, voldern, briancline

Reviewed By: voldern

CC: aran

Differential Revision: https://secure.phabricator.com/D3406
2012-09-03 06:41:49 -07:00
vrana
ada5f81614 Display 'away until' in owners and revision comment
Summary: It would be best to add this everywhere at once but I'm too lazy for it.

Test Plan: Displayed package list and detail and revision comment with away users.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3419
2012-08-31 15:09:55 -07:00
epriestley
2ea5c0bdda Sort ghost children correctly in Phriction
Summary:
Currently, if some page /x/ has a grandchild at /x/y/z/ but /x/y/ does not exist, we insert a ghost entry for it in the "Document Hierarchy". However, we don't sort the hierarchy properly after inserting ghosts, so they always appear at the bottom and in an unuseful order.

Instead, sort children again after any ghost insertions.

Test Plan: Created /x/a/, /y/a/, /z/a/, verified ghosts sorted incorrectly before this patch and correctly afterward.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1750

Differential Revision: https://secure.phabricator.com/D3418
2012-08-31 11:52:24 -07:00
epriestley
cc2225e34c Revert "Redirect to https"
This reverts commit 8afc7fc2cd.
2012-08-30 19:05:01 -07:00
epriestley
129bff016b Show tooltips in the application nav
Summary: Replaces the full names after D3413.

Test Plan: See screenshot.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3414
2012-08-30 18:59:08 -07:00
epriestley
5c006193dd Always collapse the left nav on desktops
Summary:
There is basically no reason for anyone to ever use the uncollapsed mode for more than the first 2 minutes of using the tool.

Delete all code related to collapse/expand.

(I'm going to add tooltips next.)

Also move the drag bar a few pixels to the right, so it does not overlap with the scrollbar on the "local" nav if there is one.

Test Plan: Viewed in desktop/tablet/phone modes.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3413
2012-08-30 18:58:59 -07:00
epriestley
c4ed47929c Make the top nav non-fixed-position
Summary:
See some discussion in D1673.

  - There's a concrete (if minor) problem with this in Firefox with wrapping search.
  - People complain about how we're stealing all their pixels.
  - There isn't much of a functional purpose to it since all the operations are fairly rare.
  - This addresses the aesthetic purpose of the fixed-position nav (not making the side nav ugly) by making the side nav scroll up 44px and then stop.

Test Plan: Scrolled in desktop, tablet modes.

Reviewers: vrana

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D3412
2012-08-30 18:58:51 -07:00
vrana
c4fcc8091d Unfinal AphrontApplicationConfiguration::willBuildRequest()
Summary: We need to do something here.

Test Plan: None.

Reviewers: epriestley, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3415
2012-08-30 18:51:30 -07:00
Evan Priestley
5ba9ad330e Merge pull request #197 from KorvinSzanto/master
D3410: Fix irc server login
2012-08-30 16:53:47 -07:00
Nick Harper
8afc7fc2cd Redirect to https
Summary:
If the phabricator.base-uri is set up with https and phabricator receives
a request that isn't over ssl, we will issue a redirect response to the user
to force them to use https.

Test Plan:
With this disabled, verified that pages still load correctly over http.
Enabled it; verified I get redirected to the same path but on https when I
make an http request; verified https requests get served without a redirect.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3411
2012-08-30 16:11:23 -07:00
KorvinSzanto
da2fc57d77 Fix irc server login
Summary: Previously, the identification string was thrown at the server long before you were connected, I've moved this to the end of the motd raw, and now errthangz gud

Test Plan: Register an account for your bot to use, give your bot the correct nick and password, then watch

Reviewers: epriestley

CC: aran

Differential Revision: https://secure.phabricator.com/D3410
2012-08-30 13:52:33 -07:00
epriestley
daabc41fa1 Add detailed instructions for installing PHP on Windows
Summary: This isn't very obvious, provide some more specific instructions.

Test Plan: Followed the instructions on my Windows machine, got a working `php`.

Reviewers: btrahan, vrana, jungejason

Reviewed By: vrana

CC: aran

Differential Revision: https://secure.phabricator.com/D2555
2012-08-30 13:51:53 -07:00