mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-12-24 14:30:55 +01:00
Remove arc export's dependency on a working copy when using --diff
Summary: When getting an encoding, we should query the server for the encoding of the project that we're exporting from, not the project that we're running arc in (arc might not be in a working copy). Test Plan: ran arc export with --diff and didn't get a workflow exception Reviewers: epriestley, jungejason, vrana, davidreuss Reviewed By: jungejason CC: aran, Koolvin Differential Revision: https://secure.phabricator.com/D2455
This commit is contained in:
parent
86ead1b8f1
commit
97262085b7
1 changed files with 7 additions and 2 deletions
|
@ -147,7 +147,7 @@ EOTEXT
|
||||||
}
|
}
|
||||||
|
|
||||||
public function requiresConduit() {
|
public function requiresConduit() {
|
||||||
return $this->getSource() != self::SOURCE_LOCAL;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public function requiresAuthentication() {
|
public function requiresAuthentication() {
|
||||||
|
@ -217,7 +217,12 @@ EOTEXT
|
||||||
$try_encoding = nonempty($this->getArgument('encoding'), null);
|
$try_encoding = nonempty($this->getArgument('encoding'), null);
|
||||||
if (!$try_encoding) {
|
if (!$try_encoding) {
|
||||||
try {
|
try {
|
||||||
$try_encoding = $this->getRepositoryEncoding();
|
$project_info = $this->getConduit()->callMethodSynchronous(
|
||||||
|
'arcanist.projectinfo',
|
||||||
|
array(
|
||||||
|
'name' => $bundle->getProjectID(),
|
||||||
|
));
|
||||||
|
$try_encoding = $project_info['encoding'];
|
||||||
} catch (ConduitClientException $e) {
|
} catch (ConduitClientException $e) {
|
||||||
$try_encoding = null;
|
$try_encoding = null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue