1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-29 16:08:22 +01:00

Make repository URI creation work regardless of "repository" transaction order

Summary: Fixes T11276. This feels slightly iffy (we `attachRepository()` here, and also when applying the TYPE_REPOSITORY transaction) but simpler than trying to reorder things.

Test Plan: Created a repository URI with transactions in `["uri", "repository"]` order.

Reviewers: chad, avivey

Reviewed By: avivey

Maniphest Tasks: T11276

Differential Revision: https://secure.phabricator.com/D16237
This commit is contained in:
epriestley 2016-07-05 16:38:05 -07:00
parent 5ffdb73273
commit 921d56efb0

View file

@ -77,6 +77,11 @@ final class DiffusionURIEditor
$old_uri = $object->getEffectiveURI();
} else {
$old_uri = null;
// When creating a URI, we may not have processed the repository
// transaction yet. Attach the repository here to make sure we
// have it for the calls below.
$object->attachRepository($this->repository);
}
$object->setURI($xaction->getNewValue());