Homec4science

Use correct transaction types when creating diffs

Authored by Mike Riley <mikeriley@yelirekim.com> on Jan 25 2016, 11:17.

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

Committed
epriestley <git@epriestley.com>Jan 25 2016, 11:17
Pushed
aubortJan 31 2017, 17:16
Parents
rPHa9e2e6c5aab9: Update Profiles to look like Project UI
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHe7195628d5a0: Use correct transaction types when creating diffs (authored by Mike Riley <mikeriley@yelirekim.com>).Jan 25 2016, 11:17