mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 06:42:41 +01:00
Correctly implement getFileDataAtRevision()
Summary: Apparently I just never tested this or something. Make it work correctly. Test Plan: Ran "arc diff" in a Mercurial working copy with a binary file in outgoing. Reviewers: Makinde Reviewed By: Makinde CC: aran, Makinde Differential Revision: 1074
This commit is contained in:
parent
c53a43f54d
commit
59cd94d8eb
1 changed files with 8 additions and 2 deletions
|
@ -269,11 +269,17 @@ class ArcanistMercurialAPI extends ArcanistRepositoryAPI {
|
|||
}
|
||||
|
||||
private function getFileDataAtRevision($path, $revision) {
|
||||
list($stdout) = execx(
|
||||
list($err, $stdout) = exec_manual(
|
||||
'(cd %s && hg cat --rev %s -- %s)',
|
||||
$this->getPath(),
|
||||
$revision,
|
||||
$path);
|
||||
return $stdout;
|
||||
if ($err) {
|
||||
// Assume this is "no file at revision", i.e. a deleted or added file.
|
||||
return null;
|
||||
} else {
|
||||
return $stdout;
|
||||
}
|
||||
}
|
||||
|
||||
private function getWorkingCopyRevision() {
|
||||
|
|
Loading…
Reference in a new issue