Permalink
Commits on Jun 25, 2012
Commits on Jun 24, 2012
  1. Add vebose logging to PhutilRepositoryPullDaemon

    Summary: Add verbose logging. This logging is activated by setting "phd.verbose" in the config, running "phd debug", or explicitly in scripts/repository/pull.php and scripst/repository/discover.php
    
    Test Plan:
      >>> orbital ~/devtools/phabricator $ ./scripts/repository/discover.php GTEST
      Discovering 'GTEST'...
      <VERB> PhabricatorRepositoryPullLocalDaemon Discovering commits in repository 'GTEST'...
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '()_+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch '_+abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'abcd$100', at a37bc285a12efa7224fe19f3df54cd90fa2b897a.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch', at 774c7737b2d560a291697126bf4513204ccf661a.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch-1', at dc97539bee07293f95990d71f4638335a2531d69.
      <VERB> PhabricatorRepositoryPullLocalDaemon Skipping, HEAD is known.
      <VERB> PhabricatorRepositoryPullLocalDaemon Examining branch 'arcpatch-2', at 1acfaec313c46dd3caa90448800181fb91b0270f.
    
    Reviewers: jungejason
    
    Reviewed By: jungejason
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2843
    epriestley committed Jun 24, 2012
Commits on Jun 23, 2012
  1. Fix auto-close in a repo with missing commits in Phabricator db

    Summary:
    After adding more error logging: https://secure.phabricator.com/differential/diff/5295/, discover.php prints the output: https://secure.phabricator.com/P427
    
    The problem is that there are gaps in the commits and revisions in Phabricator's DB for the repo. For some git commits, both the phabricator commits and the differential revision are missing (because of a mysterious DB data loss. nharper should be able to recover it); for some other git commits, the phabricator commits are missing (probably also because of the daba loss mentioned above). This can also happen if the git commits were too big to be parsed by phabricator.
    
    Because of the gap, the pull daemon detects them as new autoclose commits on the branch
      (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$267)
      (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$592)
    
    Then tries to update it
      (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$616)
    and will fail because the commit doesn't exist in the DB.
      (https://secure.phabricator.com/diffusion/P/browse/master/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php;382bafa271ec4962$341)
    After the exception is thrown, all the commits just detected are not marked as 'seenOnBranches', so they won't be marked as closed by the CommitMessageParserWorker.
    
    This also explains the weird behavior where the parsing of the commits is always paused for 15 minutes and then gets started again. The parsing pauses because the process listed at https://secure.phabricator.com/P427 takes quite some time to finish before it can record tha tasks. The parsing happens all the time because the process will be executed again and again.
    
    A better fix might be to put all the missing commits in the repository_badcommit table and check against it.
    
    Test Plan: will run 'discover.php FBCODE' to test it.
    
    Reviewers: epriestley, vrana
    
    Reviewed By: vrana
    
    CC: nh, vrana, aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2846
    Jason Ge committed Jun 23, 2012
  2. Provide a Conduit method to get inline comments

    Summary:
    See D2855 for usage.
    
    This has a drawback that inlines without a comment (synthetic comments) are not attached anywhere.
    I don't like adding more and more methods so I've chosen this solution.
    Plus comments and inline comments are often useful together.
    
    Test Plan: Called the method on a revision with inline comments.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: vii, aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2844
    vrana committed Jun 23, 2012
  3. Don't treat links to redyoutube.com as YouTube

    Test Plan: `http://redyoutube.com/?v=1`
    
    Reviewers: tuomaspelkonen, epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2842
    vrana committed Jun 23, 2012
  4. Display revision number in history

    Test Plan:
    Displayed repository.
    Displayed repository history.
    Wondered that we actually have bunch of commits without a revision.
    Displayed blame.
    Didn't display merge commit.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2840
    vrana committed Jun 22, 2012
  5. handle svn and hg for auto-close

    Summary: in svn and hg (for now), no branch used.
    
    Test Plan: will test live
    
    Reviewers: epriestley
    
    CC: nh, vrana, aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2839
    Jason Ge committed Jun 22, 2012
Commits on Jun 22, 2012
  1. Destroy changeset parse cache when destroying a revision

    Summary: When we delete a DifferentialChangeset, also delete the cache if it exists.
    
    Test Plan:
    Destroyed a revision, verified cache was destroyed. See marked line below.
    
            $ ./scripts/differential/destroy_revision.php D1 --trace
            >>> [0] <connect>
            <<< [0] <connect> 1,324 us
            >>> [1] <query> SELECT * FROM `differential_revision` WHERE `id` = 1
            <<< [1] <query> 517 us
    
                Really destroy 'D1: asdb' forever? [y/N] y
    
            >>> [2] <connect>
            <<< [2] <connect> 633 us
            >>> [3] <query> START TRANSACTION
            <<< [3] <query> 183 us
            >>> [4] <query> SELECT * FROM `differential_diff` WHERE revisionID = 1
            <<< [4] <query> 560 us
            >>> [5] <query> SAVEPOINT Aphront_Savepoint_1
            <<< [5] <query> 197 us
            >>> [6] <query> SELECT * FROM `differential_changeset` WHERE diffID = 3
            <<< [6] <query> 672 us
            >>> [7] <query> SAVEPOINT Aphront_Savepoint_2
            <<< [7] <query> 188 us
            >>> [8] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 6
            <<< [8] <query> 946 us
            >>> [9] <query> DELETE FROM `differential_hunk` WHERE `id` = 6
            <<< [9] <query> 335 us
      ****  >>> [10] <query> DELETE FROM `differential_changeset_parse_cache` WHERE id = 6
            <<< [10] <query> 1,464 us
            >>> [11] <query> DELETE FROM `differential_changeset` WHERE `id` = 6
            <<< [11] <query> 313 us
            >>> [12] <query> SAVEPOINT Aphront_Savepoint_2
            <<< [12] <query> 151 us
            >>> [13] <query> SELECT * FROM `differential_hunk` WHERE changesetID = 7
            <<< [13] <query> 226 us
            >>> [14] <query> DELETE FROM `differential_hunk` WHERE `id` = 7
            <<< [14] <query> 164 us
            >>> [15] <query> DELETE FROM `differential_changeset_parse_cache` WHERE id = 7
            <<< [15] <query> 318 us
            >>> [16] <query> DELETE FROM `differential_changeset` WHERE `id` = 7
            <<< [16] <query> 189 us
            >>> [17] <query> SELECT * FROM `differential_diffproperty` WHERE diffID = 3
            <<< [17] <query> 500 us
            >>> [18] <query> DELETE FROM `differential_diffproperty` WHERE `id` = 1
            <<< [18] <query> 179 us
            >>> [19] <query> DELETE FROM `differential_diff` WHERE `id` = 3
            <<< [19] <query> 211 us
            >>> [20] <query> DELETE FROM `differential_relationship` WHERE revisionID = 1
            <<< [20] <query> 391 us
            >>> [21] <query> DELETE FROM `differential_commit` WHERE revisionID = 1
            <<< [21] <query> 397 us
            >>> [22] <query> SELECT * FROM `differential_comment` WHERE revisionID = 1
            <<< [22] <query> 448 us
            >>> [23] <query> DELETE FROM `differential_comment` WHERE `id` = 1
            <<< [23] <query> 212 us
            >>> [24] <query> DELETE FROM `differential_comment` WHERE `id` = 2
            <<< [24] <query> 160 us
            >>> [25] <query> SELECT * FROM `differential_inlinecomment` WHERE revisionID = 1
            <<< [25] <query> 549 us
            >>> [26] <query> SELECT * FROM `differential_auxiliaryfield` WHERE revisionPHID = 'PHID-DREV-orsh7alzcj764ubv2f34'
            <<< [26] <query> 531 us
            >>> [27] <query> SELECT * FROM `differential_affectedpath` WHERE revisionID = 1
            <<< [27] <query> 5,676 us
            >>> [28] <query> DELETE FROM `differential_revision` WHERE `id` = 1
            <<< [28] <query> 442 us
            >>> [29] <query> COMMIT
            <<< [29] <query> 324 us
            OK, destroyed revision.
    
    Reviewers: csilvers, btrahan
    
    Reviewed By: csilvers
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2835
    epriestley committed Jun 22, 2012
  2. Mark date and time format translatable

    Summary:
    This allows translations to specify custom date and time format.
    We will need to call `setlocale()` or build system independent on it at some point but I guess it is good for now.
    
    Test Plan: Translated 'D, M j, g:i A', saw it in diff.
    
    Reviewers: btrahan, epriestley
    
    Reviewed By: btrahan
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1139, T1321
    
    Differential Revision: https://secure.phabricator.com/D2809
    vrana committed Jun 20, 2012
  3. Link revision from blame

    Summary: I need this much more than commit but it can be useful too.
    
    Test Plan: Displayed blame, clicked on the link.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: john, aran, Korvin, phunt
    
    Differential Revision: https://secure.phabricator.com/D2820
    vrana committed Jun 21, 2012
  4. Allow overriding translations without creating PhabricatorTranslation

    Test Plan: Overridden '%d Detail(s)', verified that it was used.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1139
    
    Differential Revision: https://secure.phabricator.com/D2815
    vrana committed Jun 21, 2012
  5. Send several X-Differential-CC headers

    Summary: People want to create filters checking if they are in CC which is almost impossible with multiplexing in Outlook.
    
    Test Plan: Sent e-mail with multiple CCs, verified headers.
    
    Reviewers: epriestley, nh
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2829
    vrana committed Jun 22, 2012
  6. Add Z-index to notifications

    Summary:
    Currently, notifications aren't z-indexed so they can end up underneath some other elements:
    
    {F13144}
    
    Fix this so they float correctly.
    
    Test Plan: {F13166}
    
    Reviewers: jungejason, btrahan
    
    Reviewed By: jungejason
    
    CC: aran
    
    Maniphest Tasks: T1398
    
    Differential Revision: https://secure.phabricator.com/D2834
    epriestley committed Jun 22, 2012
  7. Revert "run record commit if its the first time seen"

    Summary: This reverts commit 22e606d.
    
    Test Plan: none
    
    Reviewers: epriestley, nh
    
    Reviewed By: nh
    
    CC: nh, vrana, aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2833
    Jason Ge committed Jun 22, 2012
  8. run record commit if its the first time seen

    Test Plan: test live.
    
    Reviewers: nh
    
    Reviewed By: nh
    
    CC: epriestley, aran
    
    Differential Revision: https://secure.phabricator.com/D2832
    Jason Ge committed Jun 22, 2012
  9. check commit before calling its method

    Summary: it's calling pull daemon's failure. This is actually Nick's fix.
    
    Test Plan: Nick already manually ran it on daemon machine.
    
    Reviewers: vrana, nh
    
    Reviewed By: vrana
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2828
    Jason Ge committed Jun 22, 2012
  10. Document Mercurial base commit DSL support

    Summary: documentation changes for D2822
    
    Test Plan:
    Generated docs, but failed to read them because no one at Facebook
    remembers how to get docs working in our sandbox.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1233
    
    Differential Revision: https://secure.phabricator.com/D2827
    dschleimer committed Jun 21, 2012
  11. Support petabytes

    Test Plan: New test.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2821
    vrana committed Jun 21, 2012
Commits on Jun 21, 2012
  1. Initialize translator after loading custom libraries

    Summary: Installs may set global translation which may not be available before loading libraries.
    
    Test Plan:
      $ aphrontpath.php /
    
    Reviewers: nh
    
    Reviewed By: nh
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2819
    vrana committed Jun 21, 2012
  2. Document version generation

    Test Plan: Used it.
    
    Reviewers: epriestley, jungejason
    
    Reviewed By: jungejason
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D2817
    vrana committed Jun 21, 2012
  3. Use official PHP mirror

    vrana committed Jun 21, 2012
Commits on Jun 20, 2012
  1. Add a "Mark All Read" button for notifications

    Summary: Adds a button to mark everything as read.
    
    Test Plan: Clicked button.
    
    Reviewers: btrahan, jungejason, vrana
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T974
    
    Differential Revision: https://secure.phabricator.com/D2812
    epriestley committed Jun 20, 2012
  2. Improve debug support for notifications

    Summary: Add a `notification.debug` setting that shows debug info in the browser. Also improve some logging/error handling stuff and fix a bug with host names.
    
    Test Plan: {F13098}
    
    Reviewers: jungejason, btrahan, vrana
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T944
    
    Differential Revision: https://secure.phabricator.com/D2810
    epriestley committed Jun 20, 2012
  3. Determine unread count correctly when rendering notification panel

    Summary:
    Currently, when rendering the panel we count the number of unread notifications in the last 15, but this means we can never render a number larger than 15. If the user has more unread notifications than that, or unread notifications older than the most recent 15, there will be a flash of the higher number and then it will update to the lower number afterward.
    
    Instead, count all unread notifications. This uses the same method used to render both numbers.
    
    Test Plan: Loaded a page, checked the menu, nothing exploded.
    
    Reviewers: btrahan, jungejason, vrana
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T974
    
    Differential Revision: https://secure.phabricator.com/D2811
    epriestley committed Jun 20, 2012
  4. phd - on start command accurately detect if daemons are running befor…

    …e erroring out
    
    Summary: loadRunningDaemons loads daemons that may be running (have a file pid). other commands handle this appropriately so just make sure the start command knows whats up
    
    Test Plan: phd start, stop, reload all seemed to work just fine.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1284
    
    Differential Revision: https://secure.phabricator.com/D2808
    bobtrahan committed Jun 20, 2012
  5. Add a "differential.createrawdiff" Conduit method

    Summary:
    "differential.creatediff" requires a mostly-parsed diff, but there's no reason we can't make DifferentialDiffs out of raw diffs.
    
    This mainly serves to lower the adoption barrier if getting "arc" distributed is too much of a hassle.
    
    Test Plan: Made a diff out of a raw block of diff text.
    
    Reviewers: ffx, vrana, btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Differential Revision: https://secure.phabricator.com/D2751
    epriestley committed Jun 20, 2012
  6. Enable image macros on the wiki

    Summary: D2230 did the heavy lifting spoken of in the comment this diff deletes. Also remove 'macro' => false.
    
    Test Plan: Added an image macro to a wiki document and it showed up
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1023
    
    Differential Revision: https://secure.phabricator.com/D2668
    bobtrahan committed Jun 20, 2012
  7. Include only whole days in Differential stats

    Summary: This prevents "8 active days" for last week.
    
    Test Plan: `strtotime('1 week ago 24:00')`
    
    Reviewers: john, epriestley
    
    Reviewed By: epriestley
    
    CC: aran, epriestley
    
    Differential Revision: https://secure.phabricator.com/D2794
    vrana committed Jun 19, 2012
  8. Describe translation differences

    Test Plan: Read.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1139
    
    Differential Revision: https://secure.phabricator.com/D2807
    vrana committed Jun 20, 2012
  9. fix typo

    Jason Ge committed Jun 20, 2012
  10. Publish feed stories about commits

    Summary: When stuff gets committed, publish feed stories about it.
    
    Test Plan: {F13061}
    
    Reviewers: jungejason, vrana, voldern
    
    Reviewed By: jungejason
    
    CC: aran
    
    Maniphest Tasks: T1322
    
    Differential Revision: https://secure.phabricator.com/D2805
    epriestley committed Jun 20, 2012
  11. Provide basic documentation about Aphlict

    Summary: Hopefully this is helpful? Also fixed a thing that wasn't using config.
    
    Test Plan: Read documentation. Sent myself a notification over the server.
    
    Reviewers: jungejason
    
    Reviewed By: jungejason
    
    CC: aran
    
    Maniphest Tasks: T944
    
    Differential Revision: https://secure.phabricator.com/D2804
    epriestley committed Jun 20, 2012
  12. Fix dropdown for file whose diff is not displayable

    Summary: The current behavior is that, when the dropdown menu is clicked for a binary file, it navigates to the current revision page directly without showing the dropdown meu. The fix is to do nothing when there is no file displayed.
    
    Test Plan:
    - checked a diff with binary file
    - checked a diff with normal files
    
    Reviewers: vrana, epriestley
    
    Reviewed By: epriestley
    
    CC: epriestley, aran
    
    Differential Revision: https://secure.phabricator.com/D2801
    Jason Ge committed Jun 19, 2012
Commits on Jun 19, 2012