Save case directories in subversion??
- rather than trying to store the case directories for production runs on the web server alongside the run database, we could store them in a subversion repository...
- initial case directory would need to be imported into the repository...rather than asking users to make a new directory tree for the case inside the repository and then issue 'svn import' a script could be written to handle this
- case directories could easily be pointed to by the run database
- case directories could easily be extracted and used to reproduce a run...any changes resulting in a new case directory could be committed back into the repository and tagged...
- versions could be easily created, viewed and diffed using familiar svn commands
- uploading of case directory can be done from any machine with a svn client (ie pretty much all our production machines) rather than a gzipped tar-ball from a user's own machine...
- will require some kind of documentation to identify exactly where along the production run the new version of the case directory was used...use a ChangeLog file?...rely on subversion's documentation?
- may want to use a separate repository from source code? "ccsm-cases"
- requires svn client on web server to process uploaded information - this shouldn't be a problem
- may hamper ability to migrate to a third party host if need arises
Proposed changes to create_newcase
pardon my pseudo-code...
if ( arg_for_skip_rundb != 'TRUE' ) then
if ( no_svn_client_available or user/password_is_invalid ) then
echo "unable to contact rundb to verify casename is unique"
echo "duplicate casenames are bad - visit website to verify casename by hand"
echo "to skip this message when running create_newcase, use arg_for_skip_rundb = 'TRUE'"
exit
endif
if ( case_info_already_in_rundb ) then
echo "casename already in use - find another casename"
exit
endif
if ( casename_is_merely_reserved_in_rundb ) then
echo "casename is reserved by $reserver - acknowledge/continue or quit?"
if ( quit ) exit
else
echo "no info for casename in rundb - would you like to reserve it?"
if ( yes ) reserve casename in rundb
endif
endif