Page MenuHomePhabricator

Warn users about explicitly providing PATH for SVN hosted repositories
Closed, ResolvedPublic

Description

Subversion strips PATH for commit hooks, but we expect to be able to run svnlook (and maybe a few other commands) from within the hook. The "right" fix for this is to just add those paths to environment.append-paths (even though they may be redundant with PATH) but this is pretty obscure and we don't warn you about it or detect/hint about this issue.

Event Timeline

epriestley raised the priority of this task from to Normal.
epriestley updated the task description. (Show Details)
epriestley added a project: Diffusion.
epriestley added subscribers: epriestley, mbishopim3.

I updated the documentation for this already, but we should add an explicit status check for it. Specifically, the issue is:

  • When SVN runs commit hooks, it wipes out all of the environmental variables as it invokes the script.
  • This includes PATH.
  • The Phabricator commit hook needs to run svnlook from within the hook.
  • If svnlook is available in PATH, but not in environment.append-paths, the hook will fail to find the binary. This is pretty subtle and confusing.

Instead, on this screen:

Screen_Shot_2014-03-27_at_1.39.53_PM.png (740×1 px, 145 KB)

...near the checks for svn, svnserve, and svnadmin, we should:

  1. Test for svnlook, and raise an error if it's not found.
  2. Test that svnlook is a descendant of some path in environment.append-paths, and raise a more specific error if not. This error can just advise users to add the correct path to environment.append-paths.