sillsdev / chorus

End-user collaboration library via 3-way xml merging and hg dvcs under the hood
6 stars 26 forks source link

Allow overriding path to Mercurial via environment variable #352

Closed rmunn closed 2 weeks ago

rmunn commented 3 weeks ago

In order to test https://github.com/sillsdev/chorus/issues/350 and similar changes more easily, it might be useful to be able to specify the Mercurial folder and/or the name of the binary to run via an environment variable, similarly to how the CHORUSDEBUGGING and CHORUS_LOCAL_TIMEOUT_SECONDS environment variables allow Chorus's behavior to be controlled.

I suggest CHORUS_PATH_TO_MERCURIAL_FOLDER to set the folder without setting the exe name, CHORUS_HG_EXE to set the name of the executable to run without specifying the path (so that one can switch from hg to chg and back), and CHORUS_PATH_TO_HG_EXECUTABLE to set the entire path (if that one is set, then CHORUS_PATH_TO_MERCURIAL_FOLDER and CHORUS_HG_EXE are both ignored). These names line up with the names of the constants in src/LibChorus/MercurialLocation.cs.

The alternative is to have to change the Chorus code (and build a new NuGet package) if we want to use chg instead of hg.