So I m pretty new to version control but I m trying to use Mercurial on my Mac to keep a large Python data analysis program organized. I typically clone my main repository, tweak the clone s code a bit, and run the code on my data. If the changes were successful I commit and eventually push the changes back to my main repository. I guess that s a pretty typical workflow under version control.
My problem is that my code is run on the command-line, with several command-line arguments that refer to data files in the current working directory (and I have many such directories I need to test the code in, and they re outside of version control). So before using Mercurial I just kept my code in one ~/bin directory which was part of my PATH environment variable. Now, with version control, I need to either (1) after each edit, copy my current clone s executables to the ~/bin directory before running the code on the command line, or (2) each time I clone my code, add my current clone s path to the PATH, or (3) specify the entire/path/to/my/programs on the command line each time I run the code. None of these are very convenient, and I m left feeling like there must be an elegant solution that I just don t know. Maybe something involving Mercurial s hooks? I want my under-revision code to be runnable on the command line between commits, so this seemed to rule out hooks, but I don t know... Many thanks for any suggestions!