I've started using version control to better manage revisions to my PowerShell code. I decided to use Mercurial for 3 main reasons:
- As a DVCS, it doesn't require a server.
- If I want to, I can store a private repository online for free (bitbucket.org)
- It seemed simpler to use than Git.
Mercurial works well for versioning PowerShell Modules since each module is contained in its own directory. However, I have some scripts that don't belong in a module, but I would still like to version them. These scripts are in a ".\Scripts" directory that is added to $env:PATH
so I can easily run them from the command line. Since these scripts aren't really related to each other, it doesn't make much sense to create a single repository for the Scripts directory.
How should I version single scripts?
I've thought of the following options:
- Create subdirectory for each script/related scripts.
- Use temporary repositories until the script is "stable" then add the script to the main "Scripts" directory and version the collection of scripts as one. This would reduce the number of changesets introduced to the "Scripts" repository.
Is there a tool that better handles versioning single files? Is there better way for versioning single files with Mercurial? Any other ideas?