Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14053383
D21513.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D21513.diff
View Options
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
Details
Attached
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)
Attached To
Mode
D21513: Correct the behavior of "bin/repository discover --repair"
Attached
Detach File
Event Timeline
Log In to Comment