Page MenuHomePhabricator

Fix escaping of bookmarknames properly for `arc patch`
ClosedPublic

Authored by epriestley on Apr 1 2014, 3:05 PM.
Tags
None
Referenced Files
F14081037: D8661.diff
Fri, Nov 22, 6:13 PM
Unknown Object (File)
Thu, Nov 21, 10:53 AM
Unknown Object (File)
Sat, Nov 16, 10:54 PM
Unknown Object (File)
Wed, Oct 30, 10:23 AM
Unknown Object (File)
Thu, Oct 24, 6:47 AM
Unknown Object (File)
Oct 9 2024, 3:46 PM
Unknown Object (File)
Oct 9 2024, 3:46 PM
Unknown Object (File)
Oct 9 2024, 3:46 PM
Subscribers

Details

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.

Diff Detail

Repository
rARC Arcanist
Branch
hgsprintf
Lint
Lint Passed
Unit
No Test Coverage

Event Timeline

epriestley retitled this revision from to Fix escaping of bookmarknames properly for `arc patch`.
epriestley updated this object.
epriestley edited the test plan for this revision. (Show Details)
$ arc patch D1034
Bookmark name arcpatch-D1034 already exists; trying a new name.
Bookmark name arcpatch-D1034-1 already exists; trying a new name.
Updating to the revision's base commit
2 files updated, 0 files merged, 6 files removed, 0 files unresolved
Created and checked out bookmark arcpatch-D1034-2.
Downloading binary data for 'derpy.jpg'...
 OKAY  Successfully committed patch.

$ hg bookmark
   'arcpatch-D1034'          33:d84d423cbe25
   'arcpatch-D615'           33:d84d423cbe25
   a                         16:68dc5c265a92
   arcpatch-D1034-1          34:53efceff16a1
 * arcpatch-D1034-2          35:48e688704165
   ...
This revision is now accepted and ready to land.Apr 1 2014, 3:19 PM
epriestley updated this revision to Diff 20542.

Closed by commit rARC11e2c1688fef (authored by @epriestley).