Home › Forums › Discussion Forums › Out of Game › A Challenge, and an opportunity…. › Reply To: A Challenge, and an opportunity….
April 16, 2010 at 8:27 am #57743
- Markshire PCs:
Or you can use SVN.
Cayle – I HATE SVN. I work with it all the time. Yes, it keeps track of your versions, but it sucks the life out of your system, like a High Lich Priest…..
If you are comfy with SQL, then the little script thingee might work best. You could probably do it in Python in less than 50 lines.
init an empty dict
look in the vault directory
-For each file in the vault:
--assert filename in dict
--If there is an entry (assert filename in dict dies not throw an exception):
---If the timestamp in the dict is older than the current one in the filesystem:
----SQL INSERT statement (make sure that the file is pickled)
--If there is no entry (assertion exception):
---add the filename to the dict as a key and the last changed timestamp as value
The purpose of using INSERT instead of UPDATE is to keep multiple versions in the DB. You’d have to manually delete obsolete versions on occasion and you’d need a second script for retrieving the pickled file from the blob and repatriating it back to the file system.