Page MenuHomePhabricator

D21513.diff
No OneTemporary

D21513.diff

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
@@ -459,13 +459,6 @@
return true;
}
- if ($this->repairMode) {
- // In repair mode, rediscover the entire repository, ignoring the
- // database state. We can hit the local cache above, but if we miss it
- // stop the script from going to the database cache.
- return false;
- }
-
$this->fillCommitCache(array($identifier));
return isset($this->commitCache[$identifier]);
@@ -476,6 +469,13 @@
return;
}
+ if ($this->repairMode) {
+ // In repair mode, rediscover the entire repository, ignoring the
+ // database state. The engine still maintains a local cache (the
+ // "Working Set") but we just give up before looking in the database.
+ return;
+ }
+
$max_size = self::MAX_COMMIT_CACHE_SIZE;
// If we're filling more identifiers than would fit in the cache, ignore
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementDiscoverWorkflow.php
@@ -7,21 +7,22 @@
$this
->setName('discover')
->setExamples('**discover** [__options__] __repository__ ...')
- ->setSynopsis(pht('Discover __repository__.'))
+ ->setSynopsis(pht('Discover commits in __repository__.'))
->setArguments(
array(
array(
- 'name' => 'verbose',
- 'help' => pht('Show additional debugging information.'),
+ 'name' => 'verbose',
+ 'help' => pht('Show additional debugging information.'),
),
array(
- 'name' => 'repair',
- 'help' => pht(
- 'Repair a repository with gaps in commit history.'),
+ 'name' => 'repair',
+ 'help' => pht(
+ 'Discover all commits, even if they are ancestors of known '.
+ 'commits. This can repair gaps in repository history.'),
),
array(
- 'name' => 'repos',
- 'wildcard' => true,
+ 'name' => 'repos',
+ 'wildcard' => true,
),
));
}

File Metadata

Mime Type
text/plain
Expires
Sat, Nov 16, 3:13 PM (2 d, 8 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6762075
Default Alt Text
D21513.diff (2 KB)

Event Timeline