Permalink
Switch branches/tags
Nothing to show
Commits on Jul 31, 2012
  1. Make old and new files when checking for changes by commit

    Summary:
    We have some false positives on commit changes checker.
    I'm not sure if the reason is a difference between `git diff` and `svn diff` or something else but making this more robust doesn't harm anything.
    
    We couldn't make the files from the whole changeset because I want to ignore context bigger than `$num_lines` to reduce rebase noise.
    
    Test Plan:
    Ran the method on diff which had false positive previously.
    Ran the method on a diff with real change.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3107
    vrana committed Jul 31, 2012
Commits on Jul 30, 2012
  1. Switch to new menubar

    Summary:
      - Looks better (can probably still use some tweaks), especially search.
      - Moves logout from weird footer location to main menu.
      - Reactive: on tablets and phones, the menu adjusts to remain useful.
      - Fixed position on desktops for future side nav changes.
      - Adds an icon header thing that's currently hard-coded but will be application-driven soon.
    
    Test Plan: Used menu on desktop, tablet, phone, logged in / logged out, toggled darkconsole. Will add some screenshots.
    
    Reviewers: btrahan, chad
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1569
    
    Differential Revision: https://secure.phabricator.com/D3105
    epriestley committed Jul 30, 2012
  2. Add a "toggle-class" behavior

    Summary: The new menu stuff needs this but it was easy to pull out on its own.
    
    Test Plan: Cliked UI example buttons.
    
    Reviewers: btrahan, chad
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1569
    
    Differential Revision: https://secure.phabricator.com/D3104
    epriestley committed Jul 30, 2012
  3. Add support for placeholders

    Summary:
    Support placeholder text for inputs. We currently don't use this because it requires JS and doesn't degrade (no JS means you have zero idea what the input is for if it isn't separately labeled) but there are some cases where intent is obvious from context (for example, the search input in the menu bar, which is fairly obvious on its own and will soon have a magnifying glass icon) and in such cases it's much prettier and saves a bunch of space over an explicit label. Add a behavior so we can add placeholders where they make sense.
    
    This implementation is somewhat sanity-checked agianst the two jQuery placeholder implementations I was able to google:
    
    https://github.com/danielstocks/jQuery-Placeholder/
    https://github.com/mathiasbynens/jquery-placeholder
    
    Since we don't currently have any uses cases, I haven't included support for making JS access to the `value` work, for password inputs, or for dynamically altering the placeholder.
    
    Test Plan: Played around with the placeholder in the UI example in various browsers and couldn't break it.
    
    Reviewers: btrahan, chad
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1569
    
    Differential Revision: https://secure.phabricator.com/D3103
    epriestley committed Jul 30, 2012
  4. Fix documentation on deprecated phd repository-launch-readonly

    Summary: You need to use -- to separate arguments for phd and the daemon.
    
    Test Plan: Ran with the extra --.
    
    Reviewers: epriestley, vrana
    
    Reviewed By: vrana
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3106
    Nick Harper committed Jul 30, 2012
  5. Fix feedback from D3098.

    Auditors: vrana
    epriestley committed Jul 30, 2012
  6. Add a 2x Glyphicons sprite sheet

    Summary:
    Add a 2x ("retina") sprite sheet with icons that I gave some hover/active effects. I'm just doing one sheet rather than separate 1x and 2x sheets, we can muck with it later but I don't think anyone's going to go over their bandwidth cap.
    
    @chad, I'll put the PSD on the Dropbox too if you have a chance to give it a once-over.
    
    Test Plan: Built menu on this, all the icons work.
    
    Reviewers: btrahan, vrana, chad
    
    Reviewed By: chad
    
    CC: aran
    
    Maniphest Tasks: T1569
    
    Differential Revision: https://secure.phabricator.com/D3102
    epriestley committed Jul 30, 2012
  7. Remove support for custom logos

    Summary:
      - These don't fit anywhere in the new design.
      - Even if we figure out how to fit them in, 220px logos definitely won't fit on the 320px iPhone screen so anyone who has a custom logo will have to rework them anyway.
      - Kill it for now, and once we get the new design in and working maybe we can restore it somehow.
    
    Test Plan: Loaded local install, no logo. Grepped for config.
    
    Reviewers: btrahan, vrana
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1569
    
    Differential Revision: https://secure.phabricator.com/D3101
    epriestley committed Jul 30, 2012
  8. Minor, feedback from D3098.

    Auditors: btrahan
    epriestley committed Jul 30, 2012
  9. Allow Fact app to draw charts

    Summary: For any count fact, allow a chart to be drawn. INCREDIBLY POWERFUL DATA ANALYSIS PLATFORM.
    
    Test Plan: Drew a chart of object counts. Drew the Maniphest burn chart.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3099
    epriestley committed Jul 30, 2012
  10. Add FactCursors and application fact datasources

    Summary:
      - Add PhabricatorApplication. This is a general class that I have grand designs for, but used here to allow applications to provide objects for analysis by the facts appliction.
      - Add FactCursors, to keep track of where iterators are.
      - Make the daemon do something sort of useful.
      - Add `bin/fact cursors` for showing and managing objects and cursors.
      - Add some options to `bin/fact analyze`.
    
    Test Plan:
      - `bin/fact cursors`, `bin/fact cursors --reset DifferentialRevision`, `bin/fact cursors --reset X`
      - `bin/fact analyze`, `bin/fact analyze --all`, `bin/fact analyze --iterator DifferentialRevision --skip-aggregates`
      - `bin/phd debug fact`
    
    Reviewers: vrana, btrahan
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3098
    epriestley committed Jul 30, 2012
  11. Add a link to repository tool if there are no configured repositories

    Summary: helping noobs help themselves
    
    Test Plan: set $rows = array() and verified the txt. also threw a false && for my isAdmin conditional to check the other txt
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1086, T1360
    
    Differential Revision: https://secure.phabricator.com/D3100
    bobtrahan committed Jul 30, 2012
Commits on Jul 28, 2012
  1. Merge pull request #170 from pearj/master

    Fix Browse Repository in diffusion
    epriestley committed Jul 28, 2012
  2. Fix Exception Bad getter call: getURIObject

    After this commit: phacility@d929663
    
    I started getting this error:
    
    Unhandled Exception ("Exception")
    Bad getter call: getURIObject
    
    It turns out that getURIObject just needed to be getRemoteURIObject and then the problem goes away.
    pearj committed Jul 28, 2012
  3. Add PhabricatorFactSpec, for naming and formatting facts

    Summary: Not totally sure about this but I think it's okay?
    
    Test Plan: Loaded /fact/, got a more readable page.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3090
    epriestley committed Jul 28, 2012
  4. Fix a "user@domain:path" protocol handling bug

    Summary:
    In D3063, we stopped converting "user@domain:path" git-style URIs, but this broke the SSH-detection code and I missed that in my test plan because my test case uses natural SSH keys so the omission of SSH flags didn't cause failures.
    
    This code is a bit of a mess anyway. Consolidate and refactor it to be a bit simpler, and add test coverage.
    
    Test Plan: Ran unit tests. Ran "test_connection.php" in SSH and non-SSH modes, verified SSH modes generated appropriate ssh-agent commands around the git remote commands.
    
    Reviewers: vrana, btrahan, tberman
    
    Reviewed By: btrahan
    
    CC: aran
    
    Maniphest Tasks: T1529
    
    Differential Revision: https://secure.phabricator.com/D3093
    epriestley committed Jul 28, 2012
Commits on Jul 27, 2012
  1. Fix a bug where some Maniphest batch edits were incorrectly skipped

    Summary: Currently, if you have a task with project "X" and you apply a batch edit to it to remove "X", the action has no effect because we incorrectly skip the edit as a no-op. Instead, don't perform this check for edge edits.
    
    Test Plan: Batch removed a project from several tasks with only one project.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1566
    
    Differential Revision: https://secure.phabricator.com/D3092
    epriestley committed Jul 27, 2012
  2. Merge pull request #169 from CodeBlock/master

    D3091
    epriestley committed Jul 27, 2012
  3. Add the ability to append to $PATH, for when we shell out to system b…

    …inaries.
    
    Summary:
    In some cases, we shell out to things (like Pygments for syntax highlighting).
    However, on cloud servers or shared web servers, those binaries aren't always
    installed system-wide.
    
    This patch allows for appending to the environment variable $PATH, to look for
    other, non-default places for these binaries.
    
    Test Plan:
    * Copied the patch over to a test OpenShift instance and applied it.
    * Added the path to my local copy of Pygments (pygmentize wasn't available on the system)
      into the Phabricator config.
    * Refreshed a Paste page, and saw colors.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3091
    relrod committed Jul 27, 2012
  4. Add aggregated facts to the Facts application

    Summary:
    Some facts are aggregations of other facts. For example, we may compute how many times each macro is used in each object as a "raw fact":
    
      Dnnn uses macro "psyduck" 6 times.
    
    But we want to present this data in aggregate form, e.g. "order macros by popularity". We can do this at runtime and it probably won't be too awful a query, but we can also aggregate it cheaply:
    
      Macro "psyduck" is used 3920 times across all objects.
    
    ...and then do a query like "select macros ordered by usage".
    
    "Aggregate" facts support facts like this. The aggregate facts I've implemented are:
    
      - Count of all objects.
      - Count of objects of type X.
      - Last time facts were updated.
    
    These clearly fit the "aggregate" facts template well. I'm not 100% sure macros do. We can use this table to answer a question like "What are the most popular macros, ordered by use?" We can also use it to answer a question like "What are the most popular macros in the last 6 months?", if we build a specific fact for that. But we can't use it to answer a question like "What are the most popular macros between times X and Y?". Maybe that's important; maybe not.
    
    This seems like a good fit for at least some types of facts.
    
    I'll de-magic the keys a bit in the next diff.
    
    Test Plan: Ran the engines and got some aggregated facts about other facts.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3089
    epriestley committed Jul 27, 2012
  5. Jump to correct line in Blame previous revision

    Test Plan: Jumped on correct line in SVN, Git and HG repos.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3084
    vrana committed Jul 26, 2012
  6. Add a basic "fact" application

    Summary:
    Basic "Fact" application with some storage, part of a daemon, and a control binary.
    
    = Goals =
    
    The general idea is that we have various statistics we'd like to compute, like the frequency of image macros, reviewer responsiveness, task close rates, etc. Computing these on page load is expensive and messy. By building an ETL pipeline and running it in a daemon, we can precompute statistics and just pull them out of "stats" tables.
    
    One way to do this is just to completely hard-code everything, e.g. have a daemon that runs every hour which issues a big-ass query and dumps results into a table per-fact or per fact-group. But this has a bunch of drawbacks: adding new stuff to the pipeline is a pain, various fact aggregators can't share much code, updates are slow and expensive, we can never build generic graphs on top of it, etc.
    
    I'm hoping to build an ETL pipeline which is generic enough that we can use it for most things we're interested in without needing schema changes, and so that installs can use it also without needing schema changes, while still being specific enough that it's fast and we can build useful stuff on top of it. I'm not sure if this will actually work, but it would be cool if it does so I'm starting pretty generally and we'll see how far I get. I haven't built this exact sort of thing before so I might be way off.
    
    I'm basing the whole thing on analyzing entire objects, not analyzing changes to objects. So each part of the pipeline is handed an object and told "analyze this", not handed a change. It pretty much deletes all the old data about that thing and then writes new data. I think this is simpler to implement and understand, and it protects us from all sorts of weird issues where we end up with some kind of garbage in the DB and have to wipe the whole thing.
    
    = Facts =
    
    The general idea is that we extract "facts" out of objects, and then the various view interfaces just report those facts. This change has on type of fact, a "raw fact", which is directly derived from an object. These facts are concerete and relate specifically to the object they are derived from. Some examples of such facts might be:
    
      D123 has 9 comments.
      D123 uses macro "psyduck" 15 times.
      D123 adds 35 lines.
      D123 has 5 files.
      D123 has 1 object.
      D123 has 1 object of type "DREV".
      D123 was created at epoch timestamp 89812351235.
      D123 was accepted by @alincoln at epoch timestamp 8397981839.
    
    The fact storage looks like this:
    
      <factType, objectPHID, objectA, valueX, valueY, epoch>
    
    Currently, we supprot one optional secondary key (like a user PHID or macro PHID), two optional integer values, and an optional timestamp. We might add more later. Each fact type can use these fields if it wants. Some facts use them, others don't. For instance, this diff adds a "N:*" fact, which is just the count of total objects in the system. These facts just look like:
    
      <"N:*", "PHID-xxxx-yyyy", ...>
    
    ...where all other fields are ignored. But some of the more complex facts might look like:
    
      <"DREV:accept", "PHID-DREV-xxxx", "PHID-USER-yyyy", ..., ..., nnnn> # User 'yyyy' accepted at epoch 'nnnn'.
      <"FILE:macro", "PHID-DREV-xxxx", "PHID-MACR-yyyy", 17, ..., ...> # Object 'xxxx' uses macro 'yyyy' 17 times.
    
    Facts have no uniqueness constraints. For @vrana's reviewer responsiveness stuff, we can insert multiple rows for each reviewer, e.g.
    
      <"DREV:reviewed", "PHID-DREV-xxxx", "PHID-USER-yyyy", nnnn, ..., mmmm> # User 'yyyy' reviewed revision 'xxxx' after 'nnnn' seconds at 'mmmm'.
    
    The second value (valueY) is mostly because we need it if we sample anything (valueX = observed value, valueY = sample rate) but there might be other uses. We might need to add "objectB" at some point too -- currently we can't represent a fact like "User X used macro Y on revision Z", so it would be impossible to compute macro use rates //for a specific user// based on this schema. I think we can start here though and see how far we get.
    
    = Aggregated Facts =
    
    These aren't implemented yet, but the idea is that we can then take the "raw facts" and compute derived/aggregated/rollup facts based on the raw fact table. For example, the "count" fact can be aggregated to arrive at a count of all objects in the system. This stuff will live in a separate table which does have uniqueness constraints, and come in the next diff.
    
    We might need some kind of time series facts too, not sure about that. I think most of our use cases today are covered by raw facts + aggregated facts.
    
    Test Plan: Ran `bin/fact` commands and verified they seemed to do reasonable things.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran, majak
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3078
    epriestley committed Jul 27, 2012
  7. Provide user option for disabling diffusion symbol cross-references

    Summary: Some people don't like these, so they should be able to turn them off.
    
    Test Plan:
    Toggled the setting on and off; loaded a page in diffusion and differential
    that should have symbol cross-references, and saw that they weren't linked
    when I had the setting disabled. I also checked that the symbols are still
    linked when the setting hasn't been touched.
    
    Reviewers: epriestley, vrana
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3069
    Nick Harper committed Jul 27, 2012
Commits on Jul 26, 2012
  1. Allow specifying against commit in DiffusionRawDiffQuery

    Summary: I will need this for tracking line number in Blame previous revision.
    
    Test Plan:
      $ hg diff --rev 0:1
      $ svn diff -r 64382:64383 README
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3083
    vrana committed Jul 26, 2012
  2. Merge pull request #168 from ossareh/support_ldap_search_for_users

    Support ldap search for users
    epriestley committed Jul 26, 2012
  3. Merge pull request #167 from CodeBlock/master

    D3081
    epriestley committed Jul 26, 2012
  4. Add a checkbox to allow administrators to re-send the welcome email t…

    …o users.
    
    Summary:
    See title - This simply adds a checkbox to the "Edit User" page in the
    admin view, to allow an administrator to re-send the "Welcome to Phabricator"
    email.
    
    Test Plan:
    Sent myself another welcome email using the checkbox.
    Created a new user using the admin panel, to make sure emails still get
    sent for new users.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Maniphest Tasks: T1524
    
    Differential Revision: https://secure.phabricator.com/D3081
    relrod committed Jul 26, 2012
  5. Prevent the ability to scrape for valid usernames

     - return the same error message when either bind or the username search
       fails to find a user
     - config variables should use hypen and not underscore
    Michael Ossareh committed Jul 26, 2012
  6. Fix typo in comment

    vrana committed Jul 26, 2012
  7. Merge pull request #166 from CodeBlock/master

    D3079
    epriestley committed Jul 26, 2012
  8. Load contents of shielded files with lots of changes

    Summary:
    We need `$this->old` and `$this->new` in `renderShield()`.
    
    Broken since D2358.
    
    Test Plan: Loaded contents of file with lots of changes.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3080
    vrana committed Jul 26, 2012
  9. Fix an overlap between two elements of the Image form input.

    Summary:
    The filename field and the checkbox to select the default image were
    overlapping in Firefox on Linux on both the Project Edit page and the
    Profile Edit page.
    
    Test Plan: Looked at both of the pages and saw that they rendered better.
    
    Reviewers: epriestley
    
    Reviewed By: epriestley
    
    CC: aran, Korvin
    
    Differential Revision: https://secure.phabricator.com/D3079
    relrod committed Jul 26, 2012
  10. Add PhutilFactsUpateIterator

    Summary: This iterator processes objects that have been updated.
    
    Test Plan:
    Ran this test script:
    
      $cursor = null;
      $table  = new DifferentialRevision();
      while (true) {
        $iterator = new PhabricatorFactsUpdateIterator($table, $cursor);
        foreach ($iterator as $new_cursor => $update) {
          echo "{$new_cursor} => D".$update->getID()."\n";
          $cursor = $new_cursor;
        }
        echo "Zzz...\n";
        sleep(5);
      }
    
    Verified it iterated over every object and then stopped. Made a comment on a differenial revision, verified it iterated over the object after 15 seconds.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3077
    epriestley committed Jul 26, 2012
  11. Extend LiskMigrationIterator from PhutilBufferedIterator

    Summary: PhutilBufferedIterator now implements all the nonspecific logic here.
    
    Test Plan:
    Created a test script like this:
    
      $iterator = new LiskMigrationIterator(new DifferentialRevision());
      $iterator->setPageSize(3);
    
      foreach ($iterator as $key => $rev) {
        echo "{$key}: ".$rev->getID()."\n";
      }
    
    Ran it and verified sensible iteration results.
    
    Reviewers: vrana, btrahan
    
    Reviewed By: vrana
    
    CC: aran
    
    Maniphest Tasks: T1562
    
    Differential Revision: https://secure.phabricator.com/D3076
    epriestley committed Jul 26, 2012
  12. Move qsprintf() test cases from libphutil to Phabricator

    Summary: Also move the other tests up so they'll trigger when this stuff is touched.
    
    Test Plan: liberate
    
    Reviewers: nh, btrahan, vrana
    
    Reviewed By: nh
    
    CC: aran
    
    Maniphest Tasks: T1283
    
    Differential Revision: https://secure.phabricator.com/D3074
    epriestley committed Jul 26, 2012