HomePhabricator

Use correct transaction types when creating diffs

Description

Use correct transaction types when creating diffs

Summary: See T10214 for context. These transaction types are obviously wrong as far as I can tell.

Test Plan:
Created a revision and didn't see an error in the daemon log.

<?php

require_once dirname(__FILE__).'/phabricator/scripts/__init_script__.php';

$yelirekim = (new PhabricatorPeopleQuery)
  ->setViewer(PhabricatorUser::getOmnipotentUser())
  ->withUsernames(['yelirekim'])
  ->executeOne();

$raw_diff = (new PhabricatorDifferenceEngine)
  ->generateRawDiffFromFileContent('oldfile', 'newfile');
$diff = (new ConduitCall('differential.createrawdiff', [
      'diff' => $raw_diff,
    ]))
  ->setUser($yelirekim)
  ->execute();

$xactions = (new DifferentialDiffTransactionQuery)
  ->setViewer($yelirekim)
  ->withObjectPHIDs([$diff['phid']])
  ->execute();

foreach ($xactions as $xaction) {
  echo $xaction->getPHID().':'.$xaction->getTitle().PHP_EOL;
}

for sanity

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: michaeljs1990, epriestley

Differential Revision: https://secure.phabricator.com/D15112

Details

Provenance
yelirekimAuthored on Jan 25 2016, 10:17 AM
epriestleyCommitted on Jan 25 2016, 10:17 AM
epriestleyPushed on Jan 25 2016, 10:17 AM
Reviewer
Blessed Reviewers
Differential Revision
D15112: Use correct transaction types when creating diffs
Parents
rPa9e2e6c5aab9: Update Profiles to look like Project UI
Branches
Unknown
Tags
Unknown
Build Status
Buildable 10330
Build 12588: Run Core Tests