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

Discussion in 'Python' started by python@bdurham.com, Jul 23, 2010.

  1. Guest

    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)
     
    , Jul 23, 2010
    #1
    1. Advertising

  2. Anssi Saari Guest

    Re: Light-weight/very-simple version control under Windows usingPython?

    writes:

    > 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?


    Personally, I like RCS. It seems fulfil your requirements. You can get
    it for Windows from http://www.cs.purdue.edu/homes/trinkle/RCS/.
     
    Anssi Saari, Jul 25, 2010
    #2
    1. Advertising

  3. 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
     
    Günther Dietrich, Jul 25, 2010
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. moondaddy
    Replies:
    4
    Views:
    776
    S. Justin Gengo
    Jun 29, 2004
  2. Song Ching Koh
    Replies:
    2
    Views:
    10,012
    Nils O. =?iso-8859-1?Q?Sel=E5sdal?=
    Oct 31, 2003
  3. j
    Replies:
    2
    Views:
    411
    James Birchfield
    Nov 26, 2003
  4. Malcolm Greene
    Replies:
    7
    Views:
    655
    Stefan Behnel
    Mar 7, 2008
  5. Nasir_Jointecn

    Light weight laptop

    Nasir_Jointecn, Aug 6, 2008, in forum: HTML
    Replies:
    1
    Views:
    416
    richard
    Aug 6, 2008
Loading...

Share This Page