Changeset View
Changeset View
Standalone View
Standalone View
src/workflow/ArcanistPatchWorkflow.php
Show First 20 Lines • Show All 704 Lines • ▼ Show 20 Lines | if ($repository_api instanceof ArcanistSubversionAPI) { | ||||
// (for instance, from 'example.c' to 'Example.c'). As of now, Git | // (for instance, from 'example.c' to 'Example.c'). As of now, Git | ||||
// can not apply these patches on case-insensitive filesystems and | // can not apply these patches on case-insensitive filesystems and | ||||
// there is no way to build a patch which works. | // there is no way to build a patch which works. | ||||
throw new ArcanistUsageException(pht('Unable to apply patch!')); | throw new ArcanistUsageException(pht('Unable to apply patch!')); | ||||
} | } | ||||
// in case there were any submodule changes involved | // in case there were any submodule changes involved | ||||
$repository_api->execpassthru('submodule update --init --recursive'); | $repository_api->execPassthru('submodule update --init --recursive'); | ||||
if ($this->shouldCommit()) { | if ($this->shouldCommit()) { | ||||
if ($bundle->getFullAuthor()) { | if ($bundle->getFullAuthor()) { | ||||
$author_cmd = csprintf('--author=%s', $bundle->getFullAuthor()); | $author_cmd = csprintf('--author=%s', $bundle->getFullAuthor()); | ||||
} else { | } else { | ||||
$author_cmd = ''; | $author_cmd = ''; | ||||
} | } | ||||
Show All 36 Lines | if ($repository_api instanceof ArcanistSubversionAPI) { | ||||
$future->write($bundle->toGitPatch()); | $future->write($bundle->toGitPatch()); | ||||
try { | try { | ||||
$future->resolvex(); | $future->resolvex(); | ||||
} catch (CommandException $ex) { | } catch (CommandException $ex) { | ||||
echo phutil_console_format( | echo phutil_console_format( | ||||
"\n<bg:red>** %s **</bg>\n", | "\n<bg:red>** %s **</bg>\n", | ||||
pht('Patch Failed!')); | pht('Patch Failed!')); | ||||
$stderr = $ex->getStdErr(); | $stderr = $ex->getStderr(); | ||||
if (preg_match('/case-folding collision/', $stderr)) { | if (preg_match('/case-folding collision/', $stderr)) { | ||||
echo phutil_console_wrap( | echo phutil_console_wrap( | ||||
phutil_console_format( | phutil_console_format( | ||||
"\n<bg:yellow>** %s **</bg> %s\n", | "\n<bg:yellow>** %s **</bg> %s\n", | ||||
pht('WARNING'), | pht('WARNING'), | ||||
pht( | pht( | ||||
"This patch may have failed because it attempts to change ". | "This patch may have failed because it attempts to change ". | ||||
"the case of a filename (for instance, from '%s' to '%s'). ". | "the case of a filename (for instance, from '%s' to '%s'). ". | ||||
▲ Show 20 Lines • Show All 332 Lines • Show Last 20 Lines |