Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F14763719
D12253.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
D12253.diff
View Options
diff --git a/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php b/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
--- a/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
+++ b/src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php
@@ -58,38 +58,42 @@
$lock = PhabricatorGlobalLock::newLock($lock_name);
$lock->lock();
+ try {
+ $no_discovery = $args->getArg('no-discovery');
- $no_discovery = $args->getArg('no-discovery');
+ id(new PhabricatorRepositoryPullEngine())
+ ->setRepository($repository)
+ ->setVerbose($this->getVerbose())
+ ->pullRepository();
- id(new PhabricatorRepositoryPullEngine())
- ->setRepository($repository)
- ->setVerbose($this->getVerbose())
- ->pullRepository();
+ if ($no_discovery) {
+ $lock->unlock();
+ return;
+ }
- if ($no_discovery) {
- $lock->unlock();
- return;
- }
+ // TODO: It would be nice to discover only if we pulled something, but
+ // this isn't totally trivial. It's slightly more complicated with
+ // hosted repositories, too.
- // TODO: It would be nice to discover only if we pulled something, but
- // this isn't totally trivial. It's slightly more complicated with hosted
- // repositories, too.
-
- $repository->writeStatusMessage(
- PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
- null);
+ $repository->writeStatusMessage(
+ PhabricatorRepositoryStatusMessage::TYPE_NEEDS_UPDATE,
+ null);
- $this->discoverRepository($repository);
+ $this->discoverRepository($repository);
- $this->checkIfRepositoryIsFullyImported($repository);
+ $this->checkIfRepositoryIsFullyImported($repository);
- $this->updateRepositoryRefs($repository);
+ $this->updateRepositoryRefs($repository);
- $this->mirrorRepository($repository);
+ $this->mirrorRepository($repository);
- $repository->writeStatusMessage(
- PhabricatorRepositoryStatusMessage::TYPE_FETCH,
- PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ $repository->writeStatusMessage(
+ PhabricatorRepositoryStatusMessage::TYPE_FETCH,
+ PhabricatorRepositoryStatusMessage::CODE_OKAY);
+ } catch (Exception $ex) {
+ $lock->unlock();
+ throw $ex;
+ }
} catch (Exception $ex) {
$repository->writeStatusMessage(
PhabricatorRepositoryStatusMessage::TYPE_FETCH,
@@ -98,8 +102,6 @@
'message' => pht(
'Error updating working copy: %s', $ex->getMessage()),
));
-
- $lock->unlock();
throw $ex;
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Jan 24, 12:28 PM (18 h, 49 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7040347
Default Alt Text
D12253.diff (2 KB)
Attached To
Mode
D12253: Fix an issue where we would try to release an unheld lock
Attached
Detach File
Event Timeline
Log In to Comment