emded revision control in Python application?

Prasad, Ramit ramit.prasad at jpmorgan.com
Fri Jun 22 12:48:04 EDT 2012


>        I have an application that would benefit from collaborative
> working. Over time users construct a "data environment" which is a
> number of files in JSON format contained in a few directories (in the
> future I'll probably place these in a zip so the environment is
> contained within a single file). At the moment there is one individual
> constructing the data environment, and me occasionally applying
> corrections after being e-mailed the files. But in the future there
> might be several individuals in various locations.
> 
> As a minimum requirement I need to embed some sort of version control,
> so that changes committed by one individual will be seen in the local
> environments of the others. Some of the work involves editing graphs
> which have restrictions on their structure. In this case it would be
> useful for edits to be committed / seen in real time. The users will not
> be particularly technical, so the version control will have to happen
> relatively quietly in the background.
> 
> My immediate thoughts are to (somehow) embed Mercurial or Subversion. It
> would certainly be useful to be able to revert to a previous version of
> the data environment if an individual does something silly. But I'm not
> actually convinced that this is the whole solution for collaborative
> working. Any advice regarding the embedding of a version control system
> or alternative approaches would be appreciated. I haven't tried anything
> like this before. The desktop application is written in Python (2.6)
> with a wxPython (2.8) GUI. Given the nature of the application / data
> the machines involved might be locally networked but without web access
> (if this makes a difference). TIA.

Why not just stick the configs (binary blob or JSON string) in something 
like a sqlite database and store that database centrally accessible[1]? 
Something like subversion might be overkill.

A table like the following would work if you want to track each file 
separately:
table_name(  revision_number, file/config name, data, username, timestamp ).

Otherwise, if you want to track "environments" and not files:
table_name(  revision_number, data, username, timestamp ).

Where revision number can be a sequence used to track / change
current configuration. I recommend storing each file separately in the
database.

[1] http://www.sqlite.org/faq.html#q5


Ramit


Ramit Prasad | JPMorgan Chase Investment Bank | Currencies Technology
712 Main Street | Houston, TX 77002
work phone: 713 - 216 - 5423

--

This email is confidential and subject to important disclaimers and
conditions including on offers for the purchase or sale of
securities, accuracy and completeness of information, viruses,
confidentiality, legal privilege, and legal entity disclaimers,
available at http://www.jpmorgan.com/pages/disclosures/email.  



More information about the Python-list mailing list