Page MenuHomePhorge

No OneTemporary

diff --git a/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php b/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php
index 7b67006c4e..1fabb8c06f 100644
--- a/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php
+++ b/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php
@@ -1,44 +1,46 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
final class PhabricatorRepositoryGitFetchDaemon
extends PhabricatorRepositoryPullLocalDaemon {
protected function getSupportedRepositoryType() {
return PhabricatorRepositoryType::REPOSITORY_TYPE_GIT;
}
protected function executeCreate(
PhabricatorRepository $repository,
$local_path) {
$repository->execxRemoteCommand(
'clone %s %s',
$repository->getRemoteURI(),
rtrim($local_path, '/'));
}
protected function executeUpdate(
PhabricatorRepository $repository,
$local_path) {
- $repository->execxLocalCommand(
- 'fetch --all');
+ // This is a local command, but needs credentials.
+ $future = $repository->getRemoteCommandFuture('fetch --all');
+ $future->setCWD($local_path);
+ $future->resolvex();
}
}
diff --git a/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php b/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php
index 9bee564e41..1204cd78b8 100644
--- a/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php
+++ b/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php
@@ -1,42 +1,45 @@
<?php
/*
* Copyright 2011 Facebook, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
final class PhabricatorRepositoryMercurialPullDaemon
extends PhabricatorRepositoryPullLocalDaemon {
protected function getSupportedRepositoryType() {
return PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL;
}
protected function executeCreate(
PhabricatorRepository $repository,
$local_path) {
$repository->execxRemoteCommand(
'clone %s %s',
$repository->getRemoteURI(),
rtrim($local_path, '/'));
}
protected function executeUpdate(
PhabricatorRepository $repository,
$local_path) {
- $repository->execxLocalCommand(
- 'pull -u');
+
+ // This is a local command, but needs credentials.
+ $future = $repository->getRemoteCommandFuture('pull -u');
+ $future->setCWD($local_path);
+ $future->resolvex();
}
}

File Metadata

Mime Type
text/x-diff
Expires
Sun, Jan 19, 20:28 (1 w, 5 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
1128446
Default Alt Text
(3 KB)

Event Timeline