logo

Personal tools
Vasudeva Development VSA Specifications vsPloneLibrary and Subversion integration
Document Actions

vsPloneLibrary and Subversion integration

Repository structure

  • <repository root>/<bookid>/<bookid>.txt
  • repository root is a configurable parameter
  • each book file has a special timestamp on a first line: "Timestamp: YYYYMMDDHHMMSS". It is maintained only by the system.

Upload of a new book

  1. check whether <repository root>/<bookid> exits in repo, if not create it
  2. checkout <repository root>/<bookid> into a temporary working copy <wc>
  3. check whether <wc>/<bookid>.txt does not exist, if so then it is a book update (see next section)
  4. check whether there is no timestamp, if so refuse the file (new file cannot have a timestamp, it is probably a different book)
  5. add a current timestamp
  6. save the file into <wc>/<bookid>.txt
  7. add it under svn control
  8. commit it

Book update

Steps 1.-3. as above have been already performed.

  1. check whether timestamps in <wc>/<bookid>.txt (from repository) and uploaded file are equal. If not refuse the file.
  2. update the timestamp
  3. save the file in <wc>/<bookid>.txt
  4. commit it

Book download

The book file is simply retrieved from repository.

Subversion credentials

We will use the same credentials as for plone authentification. Under normal circumstances the credential string is constructed like that:

from base64 import encodestring
encodestring("username:password")

The encoded credential string can be retrieved from REQUEST.get("__ac"). If the decoded string is ":", it will mean that SessionCrumbler product is in place. Then the encoded string will be obtained from REQUEST.SESSION.get("__ac").get("ac") .

page created by Atmasamarpan Novy last modified 2007-02-08 14:26