Been thinking about exactly how to handle adding diffs to the subversion module.

I see a few options..

1) Store EVERYTHING in the db
* all previous revisions
* Huge disk space storing everything in the db

2) Fetch as needed
* Slow, network issues, etc
* optional caching for refreshing

3) Combo
* Fetch diffs as needed, only store diff between last revision and file, Store in DB
* cache any other requests as needed, ls, arbitrary (?) diffs, etc, but fetch on the fly

I'm thinking of going the 3 route.
Ideas?

Comments

DaveNotik’s picture

Nothing to say re: which scenario is better, but so I understand: you've opted to deeply integrate diffs versus go with a third-party tool (like ViewCVS, as drupal.org does)? If so, that's good news -- I think it's important that this be done right and in full.

markc’s picture

If the only thing the subversion.module is concerned with is to deal with subversion repositories then 1) would be a reasonable option to consider, however, I believe we really want to see a trac like clone developed which deals with problem/feature/bug ticket tracking and intergrated documentation along with overall project creation and management. 2) would be the simplest to implement but I agree with you that 3) would be the best option to go with... basically keep in the DB the last most likely to be requested data and try to cache anything else where possible.

. would the Drupal native cache system by good enough ?
. what about cache per session vs global (that everyone sees) ?

I would suggest not to worry too much about efficiency of svn lookups at this stage and just get the required svn usage functionality in place first, then rely of real world profiling to streamline the lookups later. I say this because it may be possible to incorporate same kind of caching scheme in the svn.so module itself using mmap or shmget. This is where relying more on using the svn.so module instead of the svn exe could have serious advantages into the future.

halkeye’s picture

I got diff support in cvs now.

i'm using the cache, and just storing for a limited amount of time. If this doesn't work out, it can be switched to db later.

halkeye’s picture

Status: Active » Fixed

beta version is in cvs now

(note, cvs version should still work with 4.7)

Anonymous’s picture

Status: Fixed » Closed (fixed)