Page MenuHomePhabricator

Get rid of "sourcePath" and "sourceMachine" as Diff attributes
Open, Needs TriagePublic

Description

See PHI1394. Currently, if you run arc diff from a working directory with: more than 255 characters; or (probably) non-UTF8 characters, the operation fails:

{"result":null,"error_code":"ERR-CONDUIT-CORE","error_info":"#1406: Data too long for column 'sourcePath' at row 1"}

The desired path forward here is likely to remove sourcePath and sourceMachine. Previously, see T838.

(These fields do power some arc behavior today so we can't strictly just rip them out, and it's possible that unusual/niche workflows care about them.)

Related Objects

Event Timeline

epriestley renamed this task from Get rid of "sourcePath" and "host" as Diff attributes to Get rid of "sourcePath" and "sourceMachine" as Diff attributes.Aug 22 2019, 2:11 AM
epriestley updated the task description. (Show Details)

sourceMachine is currently exposed only in the UI.

sourcePath is exposed in the UI, and in differential.query.

Arcanist uses sourcePath in ArcanistSubversionAPI->loadWorkingCopyDifferentialRevisions(). This has several callsites and it's desirable to keep it working. Basically, if a user runs arc diff in a working copy of rXYZ, where rXYZ is a Subversion repository, and that user has multiple open revisions, we use the sourcePath to guess which revision they mean to update.

We could replace this by marking the working copy with some random identifier instead, or by writing the "current" revision somewhere. These approaches are slightly nice because they survive renaming or moving the working copy, but also slightly not-nice because they're kind of magical and hard to observe.

Or we could ignore it and just prompt the user, although this would reduce the usability of arc in Subversion.

sourcePath is also used in arc list, although this use isn't important and only slightly improves sort order.