Feature request: add diff id option to exernal editor


#1

Obviously I don’t have paid support, so I’m not expecting this request to be prioritized or anything. Just wanted to put this request here to see if there’s any interest for it among the developers here.

I’m talking about the external editor here: https://secure.phabricator.com/book/phabricator/article/external_editor/
You can configure it with the following parameters: %f (filename), %r (repo callsign), %l (line number). It seems like it’s basically meant to view files that you have a local copy of. However, it’s not really usable during differential (code review). For example, if I am reviewing D500, there is no guarantee that I also have D500 on my local copy.

There is (in my opinion) one simple fix to this: Add some option %diff or %d that contains the differential id! Why this is so useful: it allows people to set up some webservice that uses the conduit API to fetch the file in question, even if it’s not on their local pc. Then, some editor that just accepts raw text as input can be used.

In my opinion this can make code review a lot nicer. For example, Jupyter notebooks don’t display nicely during code review. With this option, you could use an external jupyter notebook previewer, such as: https://github.com/jsvine/nbpreview

If this request is ignored, I don’t really care that much, but I just think it would be a nice, and hopefully not too complex, thing to add.