diff --git a/src/applications/diffusion/editor/DiffusionURIEditor.php b/src/applications/diffusion/editor/DiffusionURIEditor.php --- a/src/applications/diffusion/editor/DiffusionURIEditor.php +++ b/src/applications/diffusion/editor/DiffusionURIEditor.php @@ -462,6 +462,11 @@ ->withRepositories(array($repository)) ->execute(); + // Reattach the current URIs to the repository: we're going to rebuild + // the index explicitly below, and want to include any changes made to + // this URI in the index update. + $repository->attachURIs($uris); + $observe_uri = null; foreach ($uris as $uri) { if ($uri->getIoType() != PhabricatorRepositoryURI::IO_OBSERVE) { @@ -488,6 +493,9 @@ $repository->save(); + // Explicitly update the URI index. + $repository->updateURIIndex(); + $is_hosted = $repository->isHosted(); // If we've swapped the repository from hosted to observed or vice versa,