1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-12-23 14:00:55 +01:00

Normalize Windows directory separators in SVN

Summary: Fixes T1946.

Test Plan: Ran `arc diff --only` with added paths inside directories. Saw only "/" entries in the diff.

Reviewers: btrahan, vrana

Reviewed By: vrana

CC: aran, mbishopim3

Maniphest Tasks: T1946

Differential Revision: https://secure.phabricator.com/D4374
This commit is contained in:
epriestley 2013-01-09 12:34:37 -08:00
parent ed41f3f52c
commit d399354822

View file

@ -87,6 +87,11 @@ final class ArcanistSubversionAPI extends ArcanistRepositoryAPI {
$this->svnBaseRevisions = array();
foreach ($target->entry as $entry) {
$path = (string)$entry['path'];
// On Windows, we get paths with backslash directory separators here.
// Normalize them to the format everything else expects and generates.
if (phutil_is_windows()) {
$path = str_replace(DIRECTORY_SEPARATOR, '/', $path);
}
$mask = 0;
$props = (string)($entry->{'wc-status'}[0]['props']);