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

1752 commits

Author SHA1 Message Date
epriestley
bf9cd55577 Minor, fix an issue where fail to extract the author PHID from an edge transaction. 2012-07-05 05:48:30 -07:00
epriestley
ddf67fce58 Add an example event listener, improve documentation, and add a commit discovery event
Summary: Improve documentation around Phabricator events.

Test Plan: Generated and read documentation. Ran test script.

Reviewers: btrahan, jungejason

Reviewed By: jungejason

CC: aran

Maniphest Tasks: T1092

Differential Revision: https://secure.phabricator.com/D2917
2012-07-03 16:46:27 -07:00
Jason Ge
61b79b5359 Use binary_safe_diff from arcanist
Summary:
binary_safe_diff is needed in arcanist too. Moved it over to
arcanist. See D2915.

Test Plan: diffusion page rendered correctly on binary file.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2916
2012-07-03 13:51:37 -07:00
epriestley
dcf3a31944 Minor, unlock after discovery exception. 2012-07-03 07:46:38 -07:00
Jonathan Lomas
c821639e93 Opt-in approve your own Differential revisions
Summary: Did exactly what @epriestley suggested in T1428#2.

Test Plan: Turn it on in your config, post a revision, accept it.  Turn it off in your config, post a revision, can't accept it.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2900
2012-07-03 06:30:48 -07:00
epriestley
948259ee92 Minor, restore missing limits from 310cf00fc3 2012-07-03 06:25:03 -07:00
epriestley
bda5c670bc Add useful text descriptions to edge transactions
Summary: See D2906. This just adds text so they render pretty.

Test Plan:
Got pretty emails and rendered transactions.

{F13706}

Reviewers: btrahan, davidreuss

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2907
2012-07-02 15:42:16 -07:00
epriestley
9f4cfd40bc Insert Maniphest transactions when edges are edited
Summary:
  - See D2741.
  - When EdgeEditor performs edits, emit events.
  - Listen for Maniphest edge events and save the changes as transactions.
  - Do all this in a reasonably generic way that won't take too much rewriting as we use edges more generally.

Test Plan: Attached and detached commits from tasks, saw reasonable-looking transactions spring into existence.

Reviewers: btrahan, davidreuss

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2906
2012-07-02 15:42:06 -07:00
epriestley
310cf00fc3 Consolidate feed query code
Summary: Simplify FeedQuery by making it extend from PhabricatorIDPagedPolicyQuery

Test Plan: Looked at feed on home, projects, user profile, and called `feed.query`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2905
2012-07-02 15:41:19 -07:00
epriestley
534c0aa326 Minor, move all storage/query/db code to src/infrastructure/storage 2012-07-02 10:49:00 -07:00
epriestley
9ba6ebb97b Minor, move all remarkup code to src/infrastructure/markup/ 2012-07-02 10:44:37 -07:00
epriestley
d49b06c322 Consolidate PhabricatorFeedStory construction code
Summary: This code is duplicated in two places; share it.

Test Plan: Looked at feed and notifications.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2901
2012-07-02 10:37:22 -07:00
epriestley
f5f88d8698 Minor, fix an issue where %e is empty from git log. 2012-07-02 07:29:15 -07:00
epriestley
1c1fdf0448 Minor, move the "repair" instructions to the right place. 2012-07-02 07:22:56 -07:00
epriestley
16c20c92fe Minor, fix an issue where we may fail to select a translation for mail. 2012-07-02 07:17:56 -07:00
epriestley
fc45398ba9 Support basic notification aggregation
Summary: This is both only partially complete (supports Maniphest only) and somewhat overcomplicated (includes support for applying similar algorithms to Feed), but provides runtime aggregation of notifications.

Test Plan: {F13502}

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2884
2012-07-01 11:08:59 -07:00
dschleimer
86fa4fd97f [Phabricator] track Mercurial bookmarks for differential diffs
Summary:
This adds all the changes necessary to track the active Mercurial
bookmark for differential diffs.  We render both branch and bookmark
information in the branch field of the Differential revison view, as
seen in
https://secure.phabricator.com/file/data/kzpmu3evfkukxdjyxrfz/PHID-FILE-eqorsqupxvwirqi2s5lo/bookmark_differential.jpg

The Arcanist half of this is https://secure.phabricator.com/D2896

Test Plan:
Mostly D2896.

Additionally, loaded a diff created with a bookmark, as per the link in the summary.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1331

Differential Revision: https://secure.phabricator.com/D2897
2012-06-30 15:41:58 -07:00
epriestley
f666c3d559 Minor, fix wording for some maniphest stories 2012-06-30 06:53:11 -07:00
David Reuss
fd94700d69 Minor, really fix empty reference properties in diffusion
Summary:
Oh man, after the explode/map, the output when no references is actually

  array(1) {
    [0]=> string(0) ""
  }

.. making the falsey check fail to work as expected.

Test Plan: same as D2892, but with a little more scrutiny :p

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2893
2012-06-30 06:43:33 -07:00
David Reuss
19d58564d1 Minor, don't show references in diffusion if there isn't any
Summary:
When there are no other references (and there will be none ususally,
if D2891 is accepted), we would show "References:" with empty contents.

Avoid that by testing for empty output after applying stupid filtering.

Test Plan: Looked in a standard repository with no special refs.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2892
2012-06-30 06:26:36 -07:00
vrana
2391c54c60 Delete method implemented in parent 2012-06-30 01:21:04 -07:00
vrana
273211ae3e Highlight also lines that were added on the other side in diff of diffs 2012-06-29 18:19:01 -07:00
vrana
a2f4d661b9 Fix computing line numbers in diff of diffs
Test Plan: Live in prod.

Auditors: jungejason
2012-06-29 18:03:26 -07:00
vrana
99df72b81c Unhighlight lines modified in rebase
Summary:
Diff of diffs display changes between new versions of file.
This is bad after rebase because there can be many unrelated changes so it is hard to spot the real change.

This diff unhighlights the lines that were added or removed in rebase.
The changes are still visible (they can be sometimes relevant) but very subtle.

Test Plan:
# Add, change and delete line. Display diff.
# Add and change some lines in parent. Rebase. Display diff. Display diff of diff.
# Change and add some lines. Display diff. Display diff to first diff. Display diff to second diff.

Reviewers: epriestley, jungejason

Reviewed By: jungejason

CC: jungejason, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2761
2012-06-29 17:21:23 -07:00
Nick Harper
d70f8dad3f Change lock in PullLocalDaemon to only lock on discovery
Summary:
The locks held by read-only pullLocal daemons were causing our discovery instance
to not get the lock and fail at discovery. We don't need to hold the lock while
pulling (only while discovering), so this moves the lock to the appropriate place.

Test Plan: tested in production

Reviewers: jungejason, epriestley, vrana

Reviewed By: jungejason

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2890
2012-06-29 16:19:32 -07:00
David Reuss
30b06c1ad0 Diffusion: turn branches/refs properties into links
Summary: They just beg to be clicked.

Test Plan: clicked furiously with my mouse until i got tired - went expected places.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2889
2012-06-29 14:14:15 -07:00
David Reuss
aa95ef2463 Handle encoding if git tells us it's still not UTF-8
Summary:
Even though `--encoding` is passed to the command, git still fails
in some cases to correctly convert the output. Attempt the conversion
ourselves if it's non UTF-8.

Test Plan: Reparsed message in a repository with ISO-8859-1 encoded commit messages.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T452

Differential Revision: https://secure.phabricator.com/D2888
2012-06-29 12:38:09 -07:00
epriestley
2bb8150506 Add specific close status queries to maniphest.find (and rename it to maniphest.query)
Summary:
  - Allow clients to query for specific closed statuses (invalid, resolved, wontfix, etc), not just "closed" tasks.
  - Rename this method to maniphest.query and deprecate maniphest.find as an alias to maniphest.query, for API consistency.

Test Plan: Ran queries for all tasks, "wontfix" tasks, closed tasks.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2887
2012-06-29 09:17:19 -07:00
Andrew Gallagher
3223defe96 Add support for postponed linters
Summary:
This adds:
1) A new "arc:lint-postponed" diff property which stores a list of
lint names that are postponed and a finishpostponedlinters conduit
method which removes linters from this list.  Postponed linters are
shown in the lint details.
2) A updatelintmessages conduit message, which adds additional lint
messages to the "arc:lint" diff property.

In combination, this provides very basic support for running
asynchronous static analysis tools.  When the diff is being created,
a list of asynchronous static analysis runs can be added to the
diff's postponed linters list.  As these postponed linters finish
up, then can report new lint messages back to the diff then mark
themselves as complete.

The client is currently responsible for filtering the lint messages
by things like affected lines and files.

Test Plan:
Used conduit call API to add lint messages and remove postponed
linters from a test diff.

Reviewers: epriestley, vrana, nh, jungejason

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1332

Differential Revision: https://secure.phabricator.com/D2792
2012-06-28 18:09:38 -07:00
Jason Ge
081c3a24b0 Enable query activediff timestamp
Summary: people want to get the info about how long the revision has been active since the last time the authoer ran 'arc diff'.

Test Plan: call it from conduit console

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: Girish, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2885
2012-06-28 17:52:31 -07:00
epriestley
46008ce3b3 Record initial branch when recording commits
Summary:
We have a race condition right now, where we may insert a commit without `seenOnBranches`. This means shouldAutocloseCommit will return false (since it's not on any autoclose branches) if the message parser runs fast enough, causing it to associate the commit but not close the revision. This happened for D2851.

Also prompt the user to repair broken repositories.

Test Plan: Ran discovery / repair. Ran discovery on new commits. Verified 'seenOnBranches' value. Deleted some data, verified "repair" error. Repaired repository.

Reviewers: jungejason, nh, vrana, btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2858
2012-06-28 14:00:00 -07:00
epriestley
1e3cd8afa8 Improve notification list view
Summary:
  - Provide a filter to show just unread notifications.
  - Visually show which notifications are unread.
  - Style tweaks to make notifications more readable.

Test Plan: {F13494}

Reviewers: btrahan, jungejason

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2883
2012-06-28 13:59:50 -07:00
vrana
7227d7d850 Fix displaying day numbers in calendar
Summary:
They were shifted by one because of calling `$day->setTime(24, 0, 0)`.

I've tried to clone the date and get the epoch from the clone but it was crashing for some reason.

Test Plan: /calendar/

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2882
2012-06-28 10:28:56 -07:00
Bob Trahan
38e029205b Add a "Download Raw Diff" action to Differential
Summary: this lets people download diffs easily in case arc export, arc patch, etc isn't to their liking or whatever.

Test Plan: "Download Raw Diff" a few times with various things toggled in the "Revision Update History" widget

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1294

Differential Revision: https://secure.phabricator.com/D2855
2012-06-28 10:12:20 -07:00
epriestley
1bd0a1f0d9 Add a global lock for the RepositoryPullDaemon
Summary: Allow multiple daemons to run without contention.

Test Plan: Ran multiple daemons simultaneously in "debug" mode, observed them acquiring (and sometimes failing to acquire) locks.

Reviewers: btrahan, jungejason, nh

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T1400

Differential Revision: https://secure.phabricator.com/D2877
2012-06-28 09:54:55 -07:00
epriestley
bbfb686db5 Allow 'repository.create' to set description and autoclose
Summary:
These are currently not available via Conduit.

Also fix a bug where bad JSON input triggers an error about undefined `$metadata`.

Test Plan: Ran 'repository.create' with and without a description and with and without autoclose. Verified the created repositories had the requested attributes.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D2881
2012-06-28 09:54:48 -07:00
vrana
6c1c3c3a7a Fix line count in diffs with more hunks per changeset
Summary: This error usually doesn't occur because we have only one hunk per changeset most of the time.

Test Plan:
  $hunk = new ArcanistDiffHunk();
  $hunk->setAddLines(1);
  $hunk->setDelLines(1);

  $change = new ArcanistDiffChange();
  $change->addHunk($hunk);
  $change->addHunk($hunk);

  $diff = DifferentialDiff::newFromRawChanges(array($change));
  var_dump($diff->getLineCount());

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2878
2012-06-27 18:09:40 -07:00
vrana
0a7973488f Simplify DifferentialHunk::getAddedLines()
Summary: I will also need `getRemovedLines()` so refactor this first.

Test Plan:
New test case.
Viewed uncached diff.
Verified that the only callsite of `getAddedLines()` trims lines.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2875
2012-06-27 13:54:02 -07:00
Jason Ge
89fd1204e2 Remove the actor itself from reviewer list in commandeering
Summary: When the commandeerer was a reviewer, after the commandeering, he stayed as a reviewer. He can no longer amend the diff. He has to go 'Edit Revision' to remove himself/herself. The fix is to remove it automatically.

Test Plan:
comamndeereded a revision and the behavior is correct now:
- I was removed from the revision list
- the comment transaction shows one more entry that I removed myself as a reviewer

Reviewers: epriestley, vrana

Reviewed By: vrana

CC: nh, vrana, aran, Korvin

Maniphest Tasks: T1225

Differential Revision: https://secure.phabricator.com/D2872
2012-06-27 09:55:31 -07:00
vrana
7ca3401d03 Allow specifying custom syntax highlighter
Summary: Related to D2873.

Test Plan: Specified it and verified that highlighting still works.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Differential Revision: https://secure.phabricator.com/D2874
2012-06-26 19:37:45 -07:00
vrana
665769d505 Use whole days in Differential stats
Test Plan: /differential/stats/revisions/

Reviewers: vii, jungejason, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2867
2012-06-26 16:32:59 -07:00
Jason Ge
da45b09bb4 Use a format that's support by both zend php and hphp
Summary:
hphp doesn't support "24:00". Use "23:59:59 instead. This is causing the stat page only shows the '1 week' stat.

in hphp

  hphpd> =strtotime('1 week ago')
  1340143086
  hphpd> =strtotime('1 week ago 24:00')

  hphpd> =strtotime('1 week ago 23:59:59')
  1340175599

in zend php

  jungejasonmbp15:tmp jungejason$ cat timeformat.php
  <?php

  echo strtotime('1 week ago 24:00');
  echo "\n";
  echo strtotime('1 week ago 23:59:59');
  echo "\n";
  echo strtotime('1 week ago 24:00') - strtotime('1 week ago 23:59:59');;
  echo "\n";
  jungejasonmbp15:tmp jungejason$ php -f timeformat.php
  1340175600
  1340175599
  1

Test Plan: viewed the stat page.

Reviewers: vrana, epriestley

Reviewed By: epriestley

CC: nh, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2865
2012-06-26 15:25:49 -07:00
Jason Ge
b644a2c3a7 Remove leading "/" so that "git cat-file" works
Summary:
When the absolute path is used for load file (loadFileContent(()), it fails in git. For example:

  /var/repo/page_admin_app
  > git cat-file blob '4d6c03923006d6c444660f2c734fe03e10fd20bd':'/ios/PageAdminApp/Resources/splash/De           fault-Portrait@2x~ipad.png'
  fatal: Not a valid object name 4d6c03923006d6c444660f2c734fe03e10fd20bd:/ios/PageAdminApp/Resources/s           plash/Default-Portrait@2x~ipad.png

This is breaking the auto-closing for about 8 revisions like

https://phabricator.fb.com/rPPA4d6c03923006d6c444660f2c734fe03e10fd20bd ...
https://phabricatorcator.fb.com/rPPA51acb7e482aab0c491b530ed19dddc741d50f673 ...

Test Plan:
- reparsed https://phabricator.fb.com/rPPA4d6c03923006d6c444660f2c734fe03e10fd20bd successfully with corresponding differential revision being closed.

- verified that without leading '/', loadFileContent for svn still works. Both of the following commands worked (note the double '/' right before 'tfb':

  svn cat svn+ssh://svn.vip.facebook.com/svnroot//tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700
  svn cat svn+ssh://svn.vip.facebook.com/svnroot/tfb/trunk/www/flib/intern/cachearchiver/regenerators/wurfl/CacheArchiveWurflRegenerator.php@579700

Reviewers: vrana

Reviewed By: vrana

CC: nh, aran, epriestley

Differential Revision: https://secure.phabricator.com/D2847
2012-06-26 11:58:34 -07:00
vrana
2b946459b5 Inform user about associated accounts in failed login
Summary:
Sometimes people create their account in Phabricator using some OAuth provider, forget about it and then tries to login with another provider.

Provide this information to them.

Test Plan: Tried to link an account linked to already existing user.

Reviewers: epriestley

Reviewed By: epriestley

CC: robarnold, aran, Korvin

Differential Revision: https://secure.phabricator.com/D2857
2012-06-26 11:38:07 -07:00
epriestley
c0d48d0b2d Return attached hashes from differential.query
Summary: See T693. To do "arc branch" performantly in immutable history repositories, we need to be able to do a single query to identify revisions related by hash. Return hash information to enable this.

Test Plan: Ran `differential.query`.

Reviewers: btrahan, vrana

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T693

Differential Revision: https://secure.phabricator.com/D2859
2012-06-26 09:07:52 -07:00
Bob Trahan
ee6c6943b3 Robustify profile image controls ever so slightly
Summary: show project profile image on pertinent edit page. also add a "Use Default Image" checkbox for both project and user profiles. Also added a function for projects to get the profile picture to prevent some copy + paste action.

Test Plan: set my user profile and project profile image. clicked "Use Default Image" and got the default image back.

Reviewers: epriestley, floatinglomas

Reviewed By: floatinglomas

CC: aran, Korvin

Maniphest Tasks: T1307

Differential Revision: https://secure.phabricator.com/D2852
2012-06-26 08:14:15 -07:00
epriestley
b3900a399c Minor, allow feed stories to publish with no related PHIDs (commits, future notifications). 2012-06-26 05:48:21 -07:00
Evan Priestley
111ecabc5f Merge pull request #143 from dzhibas/exception-error-fix
Exception configuration directive fix (php.ini) upload_max_filesize
2012-06-26 05:44:10 -07:00
Nikolajus
3efa34ef49 Fixing upload_max_filesize configuration directive 2012-06-26 13:20:05 +02:00
epriestley
b5b8fca341 WIP 2012-06-25 17:24:41 -07:00