mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-22 14:52:40 +01:00
Fix escaping of bookmarknames properly for arc patch
Summary: Fixes T4596. I misunderstood this issue and D8512 was not correct. Specifically: - The `hg log` needs to be escaped, since otherwise "arcpatch-x" is interpreted as a revset. - The `hg update` does not need to be escaped, since updating to a revset doesn't make sense and the command never treats its argument as a revset. - The `hg bookmark` does not need to be escaped, for similar reasons. Test Plan: - Ran these commands in isolation and got sensible, consistent results. - Ran `arc patch` several times in a row and got proper bookmark names. Reviewers: btrahan, durham, rvanvelzen Reviewed By: rvanvelzen Subscribers: epriestley Maniphest Tasks: T4596 Differential Revision: https://secure.phabricator.com/D8661
This commit is contained in:
parent
5280f3708e
commit
11e2c1688f
1 changed files with 3 additions and 3 deletions
|
@ -265,7 +265,7 @@ EOTEXT
|
|||
|
||||
list($err) = $repository_api->execManualLocal(
|
||||
'log -r %s',
|
||||
$proposed_name);
|
||||
hgsprintf('%s', $proposed_name));
|
||||
|
||||
// no error means hg log found a bookmark
|
||||
if (!$err) {
|
||||
|
@ -320,12 +320,12 @@ EOTEXT
|
|||
echo "Updating to the revision's base commit\n";
|
||||
$repository_api->execPassthru(
|
||||
'update %s',
|
||||
hgsprintf('%s', $base_revision));
|
||||
$base_revision);
|
||||
}
|
||||
|
||||
$repository_api->execxLocal(
|
||||
'bookmark %s',
|
||||
hgsprintf('%s', $branch_name));
|
||||
$branch_name);
|
||||
|
||||
echo phutil_console_format(
|
||||
"Created and checked out bookmark %s.\n",
|
||||
|
|
Loading…
Reference in a new issue