Prev: A portable LISP interpreter that includes all the major list-processing functions is described. A complete, annotated listing of the program's code, written in PASCAL, is included.
Next: non-blocking IO EAGAIN on write
From: python on 23 Jul 2010 16:35 I have some very simple use cases[1] for adding some version control capabilities to a product I'm working on. My product uses simple, text (UTF-8) based scripts that are independent of one another. I would like to "version control" these scripts on behalf of my users. By version control, I mean *very-simple* version control with no branching or merging - just the ability to store, list and restore a specific version of a file. The data store should be a local file with the ability to upsize to a multi-user database in the future. I'm looking for recommendations on possible solutions: 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? 2. Interface to a hosted version control system (SaaS) that provides a RESTful API. Any recommendations here? 3. Build this capability myself using Python and Python's DBI layer to store files in a local SQLite database at first (but with the ability to upsize to a real client server database in the future). Seems like a fun project to work on, but also smells like I'd be re-inventing the wheel with very little value added other than simpler deployment? Any suggestions appreciated. Malcolm [1] Here's my use cases: 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. 2. Get a history listing of all checkins for a specific file (version number, timestamp, file size, user, comment) 3. Check out a specific version of a file by version number. 4. Delete checked-in versions by version number, date range, and/or username. 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)
From: Günther Dietrich on 25 Jul 2010 14:42 python(a)bdurham.com wrote: >I have some very simple use cases[1] for adding some version control >capabilities to a product I'm working on. My product uses simple, text >(UTF-8) based scripts that are independent of one another. I would like >to "version control" these scripts on behalf of my users. By version >control, I mean *very-simple* version control with no branching or >merging - just the ability to store, list and restore a specific version >of a file. The data store should be a local file with the ability to >upsize to a multi-user database in the future. > >I'm looking for recommendations on possible solutions: > >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? > >2. Interface to a hosted version control system (SaaS) that provides a >RESTful API. Any recommendations here? > >3. Build this capability myself using Python and Python's DBI layer to >store files in a local SQLite database at first (but with the ability to >upsize to a real client server database in the future). Seems like a fun >project to work on, but also smells like I'd be re-inventing the wheel >with very little value added other than simpler deployment? > >Any suggestions appreciated. Use Mercurial (<http://mercurial.selenic.com>). It is written in python, can be extended by python modules/packages and can be used by python programs directly. >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. That's a basic task in mercurial (as probably in every version control system). >2. Get a history listing of all checkins for a specific file >(version number, timestamp, file size, user, comment) Also avalilable. I am not sure about file size and comment, but if you have the list of version numbers, you can extract this info from the repository easily. >3. Check out a specific version of a file by version number. See point 1. >4. Delete checked-in versions by version number, date range, >and/or username. I've never tried it with mercurial. There are a remove and a forget command. Maybe, one could use the rebase extension. But deleting changesets from a repository usually is a bad idea. >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) Also available. Regards, Günther
From: Ben Finney on 25 Jul 2010 21:04
"Günther Dietrich" <gd.usenet(a)spamfence.net> writes: > python(a)bdurham.com wrote: > > >I have some very simple use cases[1] for adding some version control > >capabilities to a product I'm working on. […] > >I'm looking for recommendations on possible solutions: > > > >1. Use an existing version control utility. […] > Use Mercurial (<http://mercurial.selenic.com>). It is written in > python, can be extended by python modules/packages and can be used by > python programs directly. Either of Mercurial or Bazaar <URL:http://bazaar.canonical.com/> will be good choices for the requirements specified. All of Günther's comments (including those I trimmed in this reply) apply equally to both Mercurial and Bazaar. You might like to ask questions in each of the support forums for those tools for more information. -- \ “To punish me for my contempt of authority, Fate has made me an | `\ authority myself.” —Albert Einstein, 1930-09-18 | _o__) | Ben Finney |