Light-weight/very-simple version control under Windows using Python?

Thomas Jollans thomas at jollans.com
Fri Jul 23 16:49:40 EDT 2010


On 07/23/2010 10:35 PM, python at bdurham.com wrote:
> 1. Use an existing version control utility. There are lots of options
> here(!), any recommendations on a light weight, open source one that
> xcopy installs under Windows with lots of command line options?

You could just go with Mercurial, you know. Very popular, powerful,
portable, distributed (so you need no server infrastructure...), free
software of course, and written in Python, so interfacing it from Python
isn't that hard. It also scales up and down very well, so you can easily
change your mind about what you want it to do later if you want to.

> 1. Check a file in with optional comment and username; ideally
> get a version number that can be used to reference this specific
> check-in in the future.

trivial.

> 2. Get a history listing of all checkins for a specific file
> (version number, timestamp, file size, user, comment)

trivial as in that's the whole point.

> 3. Check out a specific version of a file by version number.

Mercurial, and the other distributed VCS, don't technically track
changes to files, they track changes to the whole repository (think
"directory" if you're not acquainted with DVCS) -- as with any other
existing solution you might use, you'll have to think a bit more on its
(whatever tool you end up using) terms.

> 4. Delete checked-in versions by version number, date range,
> and/or username.

Do you really want to do this? It's possible, even with Mercurial, but
do you really want to create history just to delete it later? Think
about it.

> 5. (Optional) Diff 2 versions of a file by version number and
> return diff in richly formatted format that visually shows
> changes via color and font effects (strikethru) (I'm thinking
> of using BeyondCompare for this if not present in a simple
> version control tool)

Yeah, just look for a nice graphical diff tool. KDiff3 springs to mind,
I think that's what comes bundled with TortoiseHg on Windows.




More information about the Python-list mailing list