Page MenuHomePhabricator

Viewing file in editor doesn't work due wrong path
Closed, WontfixPublic

Description

On commit detail page it's possible to view file in external editor via "View Options > View in Editor" button. Problem is that path that Phabricator provides to the editor comes directly from repository and doesn't have any information on where this file is located locally on user machine.

For example in the SVN repository file is located at /projects/project_name/some_file.php, but the project_name has been checked out at /Volumes/web/project_name and the path to the editor should be /Volumes/web/project_name/some_file.php instead.

I'm not sure how this could even work in Phabricator because nobody has 1-to-1 mapping between working copy (svn)/repository (git/hg) location and file path stored in commit on Phabricator side.

To complicate things even more the folder name with a project can be totally different from one on the server.

Event Timeline

aik099 raised the priority of this task from to Needs Triage.
aik099 updated the task description. (Show Details)
aik099 added projects: Diffusion, Audit.
aik099 updated the task description. (Show Details)
aik099 added a subscriber: aik099.

You can use a path like /path/to/editor_symlinks/%r, then symlink working copies using callsigns.

For example, you might have symlinks like:

/path/to/editor_symlinks/P -> /var/web/phabricator
/path/to/editor_symlinks/Q -> /personal/projects/quiche

You recommend that I create symlinks on my machine and name them like path in SVN repository? Won't it be easier to have per user setting, like editor url, where I specify from=>to replacements pairs to be applied to repository file path before giving it to %f in editor url.

If you have View in Editor functionality, then I suppose it worked at some point. I wonder how it was used knowing all problems that I've experienced with it.