Template Versioning: Week 4
So far this week I have:
- Reorganized my repo and tweaked my dev environment further
- Coded the VCSInterface interface
- Began writing the default VCS (the custom post based VCS
- Coded a bit of the revision class, but I may end up scrapping that class in favor of specifying additional VCSInterface methods…. that’s TBD once I have gotten further into coding the custom post based VCS adapter.
- Written a few functions that will be useful for coding the custom post based VCS and other vcs adapters.
- Laid the framework (written a function or two, created an array of VCSInterfaces) in order to facilitate the support of multiple VCS at one time
- Created a few new tickets for the various components of my project.
Triggering Commit Upon Save
I’m currently finishing up what I hope will result in the successful trigger of a commit upon the user saving the file via the theme editor. Right now it’s a bit hackish but here’s how I’m doing it:
The proposed filter in Trac ticket 16396 would be nice to have, and would render the above hacky way of triggering an automatic commit upon save of a theme file irrelevant.
Right now I’m considering the following questions:
- How should I deal with error messages from VCS including svn that say there are no changes since the last commit. Is this a problem I need to support with a main-plugin method such as has_file_been_modified($file_name) or do I leave it up to the individual VCS adapters? The answer to this should become clearer as I code the default VCS, but is worth a little early thought too.
- Should the plugin should support multiple VCS simultaneously. For instance could the user take advantage of both svn and the custom post based VCS? Right now I think that it should…. but if I support multiple VCS, then in the advanced mode UI do I let them select which vcs they wish to commit to or revert from, and how could I manage that without it getting messy?
- Is the advanced mode UI worthwhile? Would people use it, or would someone advanced enough to understand it just use their own workflow?