Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15427100
D14926.id.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
6 KB
Referenced Files
None
Subscribers
None
D14926.id.diff
View Options
diff --git a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
--- a/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
+++ b/src/applications/repository/daemon/PhabricatorRepositoryPullLocalDaemon.php
@@ -6,7 +6,7 @@
*
* By default, the daemon pulls **every** repository. If you want it to be
* responsible for only some repositories, you can launch it with a list of
- * PHIDs or callsigns:
+ * repositories:
*
* ./phd launch repositorypulllocal -- X Q Z
*
@@ -228,9 +228,8 @@
$flags[] = '--no-discovery';
}
- $callsign = $repository->getCallsign();
-
- $future = new ExecFuture('%s update %Ls -- %s', $bin, $flags, $callsign);
+ $monogram = $repository->getMonogram();
+ $future = new ExecFuture('%s update %Ls -- %s', $bin, $flags, $monogram);
// Sometimes, the underlying VCS commands will hang indefinitely. We've
// observed this occasionally with GitHub, and other users have observed
@@ -303,30 +302,44 @@
->setViewer($this->getViewer());
if ($include) {
- $query->withCallsigns($include);
+ $query->withIdentifiers($include);
}
$repositories = $query->execute();
+ $repositories = mpull($repositories, null, 'getPHID');
if ($include) {
- $by_callsign = mpull($repositories, null, 'getCallsign');
- foreach ($include as $name) {
- if (empty($by_callsign[$name])) {
+ $map = $query->getIdentifierMap();
+ foreach ($include as $identifier) {
+ if (empty($map[$identifier])) {
throw new Exception(
pht(
- "No repository exists with callsign '%s'!",
- $name));
+ 'No repository "%s" exists!',
+ $identifier));
}
}
}
if ($exclude) {
- $exclude = array_fuse($exclude);
- foreach ($repositories as $key => $repository) {
- if (isset($exclude[$repository->getCallsign()])) {
- unset($repositories[$key]);
+ $xquery = id(new PhabricatorRepositoryQuery())
+ ->setViewer($this->getViewer())
+ ->withIdentifiers($exclude);
+
+ $excluded_repos = $xquery->execute();
+ $xmap = $xquery->getIdentifierMap();
+
+ foreach ($exclude as $identifier) {
+ if (empty($xmap[$identifier])) {
+ throw new Exception(
+ pht(
+ 'No repository "%s" exists!',
+ $identifier));
}
}
+
+ foreach ($excluded_repos as $excluded_repo) {
+ unset($repositories[$excluded_repo->getPHID()]);
+ }
}
foreach ($repositories as $key => $repository) {
diff --git a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryDiscoveryEngine.php
@@ -100,8 +100,8 @@
$this->log(
pht(
- 'Discovering commits in repository %s.',
- $repository->getCallsign()));
+ 'Discovering commits in repository "%s".',
+ $repository->getDisplayName()));
$this->fillCommitCache(array_values($branches));
@@ -244,7 +244,7 @@
'configured URI is "%s". To resolve this error, set the remote URI '.
'to point at the repository root. If you want to import only part '.
'of a Subversion repository, use the "Import Only" option.',
- $repository->getCallsign(),
+ $repository->getDisplayName(),
$remote_root,
$expect_root));
}
diff --git a/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php b/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryMirrorEngine.php
@@ -37,7 +37,7 @@
throw new PhutilAggregateException(
pht(
'Exceptions occurred while mirroring the "%s" repository.',
- $repository->getCallsign()),
+ $repository->getDisplayName()),
$exceptions);
}
}
diff --git a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
--- a/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
+++ b/src/applications/repository/engine/PhabricatorRepositoryPullEngine.php
@@ -29,7 +29,6 @@
$is_svn = false;
$vcs = $repository->getVersionControlSystem();
- $callsign = $repository->getCallsign();
switch ($vcs) {
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
@@ -37,9 +36,9 @@
if (!$repository->isHosted()) {
$this->skipPull(
pht(
- "Repository '%s' is a non-hosted Subversion repository, which ".
- "does not require a local working copy to be pulled.",
- $callsign));
+ 'Repository "%s" is a non-hosted Subversion repository, which '.
+ 'does not require a local working copy to be pulled.',
+ $repository->getDisplayName()));
return;
}
$is_svn = true;
@@ -55,13 +54,12 @@
break;
}
- $callsign = $repository->getCallsign();
$local_path = $repository->getLocalPath();
if ($local_path === null) {
$this->abortPull(
pht(
- "No local path is configured for repository '%s'.",
- $callsign));
+ 'No local path is configured for repository "%s".',
+ $repository->getDisplayName()));
}
try {
@@ -73,8 +71,8 @@
if (!Filesystem::pathExists($local_path)) {
$this->logPull(
pht(
- "Creating a new working copy for repository '%s'.",
- $callsign));
+ 'Creating a new working copy for repository "%s".',
+ $repository->getDisplayName()));
if ($is_git) {
$this->executeGitCreate();
} else if ($is_hg) {
@@ -86,8 +84,8 @@
if (!$repository->isHosted()) {
$this->logPull(
pht(
- "Updating the working copy for repository '%s'.",
- $callsign));
+ 'Updating the working copy for repository "%s".',
+ $repository->getDisplayName()));
if ($is_git) {
$this->verifyGitOrigin($repository);
$this->executeGitUpdate();
@@ -113,7 +111,10 @@
} catch (Exception $ex) {
$this->abortPull(
- pht('Pull of "%s" failed: %s', $callsign, $ex->getMessage()),
+ pht(
+ "Pull of '%s' failed: %s",
+ $repository->getDisplayName(),
+ $ex->getMessage()),
$ex);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 24, 12:48 PM (1 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7705309
Default Alt Text
D14926.id.diff (6 KB)
Attached To
Mode
D14926: Remove calls to getCallsign() from repository daemons
Attached
Detach File
Event Timeline
Log In to Comment