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

2819 commits

Author SHA1 Message Date
Alan Huang
8fbe6347d2 Load primary reviewer PHID
Summary: A cursory look at DifferentialReviewer suggests the primary reviewer doesn't actually have to be among the reviewers? Uploading this so bug reporter can patch and see if it helps.

Test Plan: Nope.

Reviewers: epriestley

Reviewed By: epriestley

CC: szymon, aran, Korvin

Maniphest Tasks: T1625

Differential Revision: https://secure.phabricator.com/D3198
2012-08-08 13:27:52 -07:00
vrana
75c647c932 Don't jump to symbol after selecting
Summary: Selecting text still triggers 'click' event.

Test Plan:
Selected symbol.
Clicked symbol.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3197
2012-08-08 12:53:29 -07:00
epriestley
386735a39d Remove PhabricatorOwnersOwner::loadAffiliatedPackages()
Summary: See D3193 for discussion.

Test Plan: Ran `owners.query` via conduit, verified I got sensible output.

Reviewers: vrana, btrahan, meitros

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3194
2012-08-08 12:26:13 -07:00
epriestley
8cdd801515 Add PhabricatorOwnersPackageQuery
Summary:
This is a step toward unearthing Project queries enough that I can make them policy-aware. Right now, some ProjectQuery callsites do not have reasonable access to the viewer. In particular, Owners packages need to issue Project queries because we allow projects to own packages and resolve project members inside of some package queries.

Currently, we have a very unmodern approach to querying packages, with a large number of one-off static load methods:

  PhabricatorOwnersPackage::loadAffectedPackages()
  PhabricatorOwnersPackage::loadOwningPackages()
  PhabricatorOwnersPackage::loadPackagesForPaths()
  PhabricatorOwnersOwner::loadAllForPackages()
  PhabricatorOwnersOwner::loadAffiliatedUserPHIDs()
  PhabricatorOwnersOwner::loadAffiliatedPackages()
  ConduitAPI_owners_query_Method::queryAll()
  ConduitAPI_owners_query_Method::queryByOwner()
  ConduitAPI_owners_query_Method::queryByAffiliatedUser()
  ConduitAPI_owners_query_Method::queryByPath()

We should replace `PhabricatorOwnersOwner` with an Edge and move all of these calls to a Query class. I'm going to try to do as little of this work as I can  for now since I'm much more interested in getting a functional policy implementation into other applications, but ProjectQuery needs to be policy-aware before I can do that and I need to dig some at least some of the callsites out enough that I can get a viewer in there without making the code worse than it is.

This adds a PhabricatorOwnersPackageQuery class and removes one callsite of one of those static methods.

I also intend to dissolve the two separate concepts of an "owner" (direct owner) and an "affiliated user" (indirect owner via project membership) since I think we're always fine with "affiliated users" owners.

Test Plan: Loaded home page / audit tool, which use the modified path. Ran queries manually via script. Made sure results included directly owned packages and packages owned through project membership.

Reviewers: vrana, btrahan, meitros

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3193
2012-08-08 12:25:11 -07:00
epriestley
ab92242e00 Extend PhabricatorPolicyQuery from PhabricatorOffsetPagedQuery
Summary:
A few goals here:

  - Slightly simplify the Query classtree -- it's now linear: `Query` -> `OffsetPagedQuery` (adds offset/limit) -> `PolicyQuery` (adds policy filtering) -> `CursorPagedPolicyQuery` (adds cursors).
  - Allow us to move from non-policy queries to policy queries without any backward compatibility breaks, e.g. Conduit methods which accept 'offset'.
  - Separate the client limit ("limit") from the datafetch hint limit ("rawresultlimit") so we can make the heurstic smarter in the future if we want. Some discussion inline.

Test Plan: Expanded unit tests to cover offset behaviors.

Reviewers: vrana, btrahan

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3192
2012-08-08 12:15:58 -07:00
Bob Trahan
8a4c08b01d Allow commits to be associated with projects and associated goodies
Summary:
- Commit detail view
 - List of projects
 - "edit" action which takes the user to a simple form where they can only add / remove projects.
-  Integrated the project relationship into the commit search indexer
 - fixed a bug from D790; it seems you must select the column if you're going to join against it later. Without this change searching for author or projectfails 100% for me.

Test Plan: added and removed projects. verified appropriate projects showed up in detail and edit view. searched for commits by project and found the ones I was supposed to...!

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1614

Differential Revision: https://secure.phabricator.com/D3189
2012-08-08 10:03:41 -07:00
Alan Huang
5b8028e254 Fix sorting algorithm for group-by-project
Summary:
When viewing Maniphest tasks grouped by project, there's this
weird algorithm that involves generating strings to use as sort keys.
It's pretty clearly wrong in several cases; this aims to fix it.

Test Plan:
Open Maniphest and try to sort by things. Unfortunately, I
don't have access to a decent Maniphest database, so I'm not certain it
works as it should.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin, mikaaay

Maniphest Tasks: T1595

Differential Revision: https://secure.phabricator.com/D3142
2012-08-07 19:40:38 -07:00
Alan Huang
ef3b097a41 Fix "show raw file" showing wrong file
Summary:
In a revision with multiple diffs like
https://secure.phabricator.com/D3168?vs=6094&id=6095
clicking "Show Raw File (Left)" while comparing diffs 1 and 2 brings up
the version from base, instead of from diff 1. This is because the hunks
are stored as diffs between base and diff X, and the raw file is
generated from the hunks. This introduces a hack which is probably not
actually correct but seems to work for the 90% case.

(The "Show Raw File (Right)" button was and remains correct.)

Test Plan: Click raw file buttons while comparing different diffs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3169
2012-08-07 18:53:22 -07:00
vrana
523cba5da4 Use Remarkup document link 2012-08-07 18:51:52 -07:00
Alan Huang
3fcb94a45c Fancier tooltips for revision lists
Summary:
Put flag note in a Javelin tooltip on the flag, and extra
reviewers in a Javelin tooltip on the (+N). This is a bit more expensive
because we have to fetch all of their usernames but I'm hoping that's
okay?

Test Plan:
Load a bunch of revision lists. Mouse on. Mouse off. Mouse
on. Mouse off.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3187
2012-08-07 18:37:49 -07:00
epriestley
f9fcaa1f84 Migrate project membership to edges
Summary:
  - Store project members in edges.
  - Migrate existing members to edge storage.
  - Delete PhabricatorProjectAffiliation.
  - I left the actual underlying data around just in case something goes wrong; we can delete it evenutally.

Test Plan:
  - Ran migration.
  - Created a new project.
  - Joined and left a project.
  - Added and removed project members.
  - Manually called PhabricatorOwnersOwner::loadAffiliatedUserPHIDs() to verify its behavior.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3186
2012-08-07 18:02:05 -07:00
epriestley
d5a0352fd7 Make project membership edits use transactions and PHIDs and not be awful
Summary:
  - Split project profile editing apart from project membership editing.
  - Make project membership editing simpler and easier to use.
  - Drop role / owner stuff from the UI.

Test Plan: Added and removed project members. Edited project profile information.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3184
2012-08-07 11:57:38 -07:00
epriestley
f01c89f8de Remove subprojects from the Projects UI and API
Summary:
These are currently useless and confusing (they have no application impact), and should be migrated to edges if we want to restore them in some form.

I left the actual storage so this doesn't destroy any data, it just removes all traces of this feature from the UI.

Test Plan: Looked at and edited projects.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3183
2012-08-07 11:57:27 -07:00
epriestley
fbf6d967ff Add getMemberPHIDs() and loadMemberPHIDs() to PhabricatorProject
Summary:
I want to:

  - move the membership storage to edges
  - remove the concepts of "roles" (which are decorative text only) and "owners" (which will be replaced with policy-based controls)

This moves us a step closer to that by reducing the use of ProjectAffiliation outside of the class.

Test Plan: Loaded project profile. Called `project.query`. Joined and left a project.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3182
2012-08-07 11:55:00 -07:00
epriestley
d74b84a729 Add a "Project" application
Summary: Move routes into a formal application class.

Test Plan: Checked /applications/, browsed various routes.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran, floatinglomas

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3181
2012-08-07 11:54:49 -07:00
epriestley
8668ecaf54 Make PhabricatorProjectQuery extend PhabricatorOffsetPagedQuery
Summary: This class predates PhabricatorQuery; reduce code duplication.

Test Plan: Loaded projects, ran conduit call with offset and limit.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3180
2012-08-07 11:54:39 -07:00
epriestley
b0fda3be25 Rename setMembers() to withMemberPHIDs() in PhabricatorProjectQuery
Summary: This is clearer and more consistent with other Query classes.

Test Plan: Used home page, conduit api, project list, other interfaces.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3179
2012-08-07 11:54:24 -07:00
epriestley
d25d9ddb01 Remove setOwners() from PhabricatorProjectQuery
Summary: I'm deprecating the concept of "owners" (which currently has no meaning in the actual application) in favor of policy-based controls. Remove the ability to query by it.

Test Plan: Grepped for setOwners(), no relevant hits. Browsed the project listing.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3178
2012-08-07 11:54:14 -07:00
epriestley
ed4a155c91 Rename "IDPaged" to "CursorPaged", "executeWithPager" to "executeWith[Cursor|Offset]Pager"
Summary:
I'm trying to make progress on the policy/visibility stuff since it's a blocker for Wikimedia.

First, I want to improve Projects so they can serve as policy groups (e.g., an object can have a visibility policy like "Visible to: members of project 'security'"). However, doing this without breaking anything or snowballing into a bigger change is a bit awkward because Projects are name-ordered and we have a Conduit API which does offset paging. Rather than breaking or rewriting this stuff, I want to just continue offset paging them for now.

So I'm going to make PhabricatorPolicyQuery extend PhabricatorOffsetPagedQuery, but can't currently since the `executeWithPager` methods would clash. These methods do different things anyway and are probably better with different names.

This also generally improves the names of these classes, since cursors are not necessarily IDs (in the feed case, they're "chronlogicalKeys", for example). I did leave some of the interals as "ID" since calling them "Cursor"s (e.g., `setAfterCursor()`) seemed a little wrong -- it should maybe be `setAfterCursorPosition()`. These APIs have very limited use and can easily be made more consistent later.

Test Plan: Browsed around various affected tools; any issues here should throw/fail in a loud/obvious way.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T603

Differential Revision: https://secure.phabricator.com/D3177
2012-08-07 11:54:06 -07:00
vrana
8ab1789329 Improve displaying of very large commits
Summary:
Behave like Differential.

Also save one path ID query.

Test Plan: Displayed very large commit, clicked in ToC, clicked on Load.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3176
2012-08-07 10:51:38 -07:00
vrana
e8401e6d4f Increase width of moved code tooltip
Summary: Looks weird with long paths.

Test Plan: Displayed diff with moved code.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3173
2012-08-07 10:50:15 -07:00
vrana
6361ffedaa Load changesets with inline comments drafts in large diff
Test Plan: Displayed a large diff with inline comment draft.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3175
2012-08-07 10:49:55 -07:00
epriestley
f614670de9 Minor, ensure didProcessRequest() is called even for exceptions. 2012-08-07 09:54:59 -07:00
Alan Huang
7f98e3a8bd Miscellaneous updates for scoped symbols
Summary: Update Conduit, jump nav, and docs to handle symbol contexts.

Test Plan: Call conduit, use jump nav.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3172
2012-08-07 09:29:34 -07:00
Alan Huang
a8d6af0f42 Infrastructure changes to support scoped symbols
Summary:
 - import_project_symbols supports an optional extra field, which is the
   context of the symbol.
 - Symbol query can take a symbol argument, either as a parameter or a
   URL component (so you can now jump nav to `s Zerg/rush`, for
   example).
 - Conduit method not yet updated. Will do that later.

NOTE: Not providing a context is distinct from providing an empty
context, because an empty context stands for top-level context, i.e.
functions and classes for PHP. It will not find class methods, etc. It
is possible that we should use some weird token that could not normally
be a context name to stand in for empty context.

Test Plan: Do a bunch of symbol searches.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3148
2012-08-07 09:28:49 -07:00
vrana
1c98ca7042 Fix doc links 2012-08-06 15:58:28 -07:00
epriestley
ebb7807bb4 Fix an issue with URIs missing trailing slashes, like "/maniphest"
Summary:
In D3144, I made us look in application maps to find routing rules. However, we don't process //all// the maps when we 404 and try to do a "/" redirect. Process all of the maps.

Additionally, in D3146 I made the menu items application-driven. However, some pages (like 404) don't have a controller. Drop the requirement that the controller be nonnull.

Test Plan:
  - Visited "/maniphest", got a redirect after this patch.
  - Visited "/asldknfalksfn", got a 404 after this patch.

Reviewers: davidreuss, vrana, btrahan

Reviewed By: davidreuss

CC: aran

Maniphest Tasks: T1607

Differential Revision: https://secure.phabricator.com/D3158
2012-08-06 12:46:51 -07:00
Alan Huang
bcb9de4ea1 Add a context field to symbol objects
Summary:
See T1602.

This is just the minimal functional patch; the scripts will continue
working because of the `DEFAULT ''`.

Test Plan:
Can't fully test this until I get more code working, but
nothing broke horribly yet.

Reviewers: epriestley

Reviewed By: epriestley

CC: nh, aran, Korvin

Maniphest Tasks: T1602

Differential Revision: https://secure.phabricator.com/D3147
2012-08-06 12:20:45 -07:00
vrana
251438b2c2 Translate change type header
Summary: This is a tax for internationalization.

Test Plan: Displayed a revision with added and moved files.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3166
2012-08-06 12:07:26 -07:00
epriestley
b4544ebe0f Make "Create New Similar Task" inherit priorities
Summary: Request in T1589, seems reasonable to me.

Test Plan: Created a "Wishlist" task, created a "Similar" task, got "Wishlist" default priority.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1589

Differential Revision: https://secure.phabricator.com/D3155
2012-08-05 19:10:20 -07:00
vrana
ceb522427e Highlight lines on drag and drop in Diffusion
Summary: Nobody knows that it's possible to highlight more lines because there's no interface for it.

Test Plan:
Highlighted:

- single line
- top to bottom
- bottom to top
- inside to outside

Reviewers: Korvin, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D3150
2012-08-05 18:56:25 -07:00
epriestley
2a31fc8495 Minor, regen Celerity map. 2012-08-05 18:09:54 -07:00
epriestley
adcc017766 Minor, make app icons look somewhat better? 2012-08-05 18:06:07 -07:00
Danny Su
92fd606df3 Allow custom LDAP port
Summary: Allow custom LDAP port to be defined in config file

Test Plan: Test login works by specifying a custom port

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3153
2012-08-05 15:37:40 -07:00
epriestley
ed8881784e Minor, reduce prominence of main menu icons. 2012-08-05 15:07:12 -07:00
epriestley
314c25365d Drive menu icons from Applications
Summary:
This makes no changes, it just moves the menu icons to the applications instead of hard-coded on the page.

I'm going to try to address some of the angst in T1593 next...

Test Plan: Loaded logged-in / logged out pages. Clicked menu items. Looked at /applications/.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1593, T1569

Differential Revision: https://secure.phabricator.com/D3146
2012-08-05 14:12:43 -07:00
epriestley
643653dc61 Store the "current" application in the controller
Summary:
When we match an application route, select it as the current application and store it on the controller.

Move routes for the major applications into their PhabricatorApplication classes so this works properly.

Test Plan: Added a var_dump() and made sure we picked the right app for all these applications.

Reviewers: vrana, btrahan

Reviewed By: vrana

CC: aran

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3144
2012-08-05 14:03:39 -07:00
epriestley
8240f59fc9 Minor, add some logo assets to version control. 2012-08-05 13:01:43 -07:00
Evan Priestley
2e78b56f70 Merge pull request #176 from nexeck/master
D3149: The Log and PID directory should be separable in the config file
2012-08-05 06:07:09 -07:00
Marcel Beck
99e9a26192 Separates the PID and log directories of daemons
Summary: The Log and PID directory should be separable in the config file

Test Plan: Start the daemons, and check if the pid and log files are stored in directories that were specified in the config file.

Reviewers: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3149
2012-08-05 08:35:24 +02:00
Alan Huang
7ea925d33c Add a date column to Paste
Summary:
Show modified date on the right of the list view (which I guess
is also the created date, since pastes are immutable?)

Test Plan: Browse through the many volumes of untitled masterworks.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1600

Differential Revision: https://secure.phabricator.com/D3145
2012-08-03 15:39:56 -07:00
Alan Huang
e8c7e3883c Fix a comment (see D3140) 2012-08-03 11:47:53 -07:00
Alan Huang
358baf1b3a Improve the flag.* Conduit methods
Summary:
 - Put the code to generate informational dicts about flags into the
   base class.
 - Update flag.delete to accept an object PHID in order to delete the
   flag on that object, since currently the model is that each object
   may have at most one flag, and each flag has exactly one object,
   although the former is not enforced.
 - Add flag.edit, which creates or updates a flag, optionally with the
   given color and note.

Test Plan:
Spend endless hours repeatedly running arc call-conduit and
arc flag.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3141
2012-08-03 11:41:33 -07:00
Evan Priestley
c691d4bfa9 Merge pull request #172 from floatingLomas/arcpatch-D3109
Arcpatch d3109
2012-08-03 08:05:26 -07:00
mkedia
48806b5e3e [easy] Add support for fetching all packages to owners.query
Summary: as title

Test Plan: tested without params. Tested with single known path

Reviewers: epriestley, vrana, nh

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D3139
2012-08-02 16:07:05 -07:00
Alan Huang
9b8a2cbf51 Add a 'title' sort option to Maniphest
Summary:
Allow sorting tasks by title in addition to priority, updated,
created.

Test Plan:
Load Maniphest, click between order buttons, note that tasks
are being ordered correctly, as if by magic.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1592

Differential Revision: https://secure.phabricator.com/D3137
2012-08-02 14:21:13 -07:00
epriestley
194dc40672 Add a meta-application
Summary:
  - Adds a new "Applications" application.
  - Builds an application list via application config instead of via hard-coding, so we can move toward better concepts of installing/uninstalling applications, etc.
  - Applications indicate that they need attention with notice counts and brief status messages rathern than 50 giant tables of all sorts of app data.

I want to try replacing the home screen with this screen, pretty much. Not sure if this is totally crazy or not. What does everyone else think?

Test Plan: Will add screenshots.

Reviewers: btrahan, chad, vrana, alanh

Reviewed By: vrana

CC: aran, davidreuss, champo

Maniphest Tasks: T1569

Differential Revision: https://secure.phabricator.com/D3129
2012-08-02 14:07:21 -07:00
Alan Huang
04fafdb75c Make columns in flag view not squish each other
Summary:
Unlike (all? most?) other tables, the flag table has two wide
columns: the object name and the flag note. This fiddles with the
classes so neither gets squished too much by the other.

This is kind of a hack and I don't even know if it's cross-browser
compatible because I only have WebKit here. But maybe it's fine.

Test Plan:
View Differential home page while changing revision names and
flag notes to weird things.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1586

Differential Revision: https://secure.phabricator.com/D3128
2012-08-02 13:58:54 -07:00
Alan Huang
d31accf076 Add a flag.delete Conduit method
Summary: Fairly straightforward: allow deletion of flags from Conduit.

Test Plan: Try arc call-conduit with different ids.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1556

Differential Revision: https://secure.phabricator.com/D3132
2012-08-02 12:25:01 -07:00
Alan Huang
8e5189b439 Add a Delete link to Differential inline comment previews
Summary:
This lets you delete inlines from the preview at the bottom of
the page, instead of hunting for them through the diffs.

There is not yet a keyboard shortcut.

The mechanism for updating the inlines in the diffs is kind of a hack
and I'm sure I'm special-casing way too much, but at least it works.

Test Plan:
Load revision with many diffs. Create inlines all over the
place. Delete them all. Mwahaha.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1433, T1431

Differential Revision: https://secure.phabricator.com/D3131
2012-08-02 12:24:23 -07:00