When a Subversion repository uses a credential with a username, but without a password, the repository is unable to get updated, as the update dies with “Error updating working copy: Expected PhutilOpaqueEnvelope for %P conversion.”
It seems to me that when PhabricatorRepository wants to get the password envelope from PassphrasePasswordKey::getPasswordEnvelope(), the latter returns null when there is no password (because the credential contains no SecretID). So, instead of a PhutilOpaqueEnvelope instance, PhabricatorRepository gets null and dies afterwards (trying to format this null with %P).
I fixed the problem locally by patching PassphrasePasswordKey::getPasswordEnvelope() to:
public function getPasswordEnvelope() { $result = $this->requireCredential()->getSecret(); if (!$result) { $result = new PhutilOpaqueEnvelope(''); } return $result; }
which seems to work correctly, but I have no idea whether this would be the correct fix, or this should be handled on a different place.