From LifeType Wiki
For a while, I have tried keeping my local sources in sync with the development tree, and had limited success. My old method was to use CVS for my changes, and subversion to download the developer changes. That way, the CVS and .svn directories would not conflict with each other. That works alright, but I have to use CVS to do the merging, instead of subversion, and once you have gotten used to subversion, it is hard to go back to CVS.
Later I used subversion in an undocumented way, and it turns out, unsupported, as the developers (or at least one who answered a question on a mailing list or forum about it) didn't even realize it would work. I would do something like the following.
svn export -r123 http://devel.lifetype.net/svn/plog/plog/trunk myversion svn import myversion http://example.com/svn/lifetype/devel # edit myversion svn commit myversion svn merge -r123:HEAD http://devel.lifetype.net/svn/plog/plog/trunk myversion # check for conflicts, etc. svn commit -m "merged lifetype trunk revs 123:245" myversion
This also worked relatively well, although I would always have to remember to svn commit prior to merging, or else sometimes lose track of my local changes. But, it generally worked well. But, no longer, because merging is no longer possible between repositories. It actually still works if the URL-type http:// https:// ssh+svn:// etc. is the same, but since it isn't supported, I figured I needed to find a new method.
I recently discovered SVK, "a decentralized version control system built with the robust Subversion filesystem. It supports repository mirroring, disconnected operation, history-sensitive merging, and integrates with other version control systems, as well as popular visual merge tools." What this means for you is that you can use subversion-like tools locally, as well as use subversion to merge the remote changes.
It took about an hour to get setup and figure out how I best wanted to keep everything merged nicely. My goal was to have a development tree (named devel), where I could test out my changes and a production/release tree (named www). I wanted to be able to have other people edit files in the devel tree (I would have been happy enough to restrict editing to devel, but in the end, it turns out editing in www is fine as well), without having to know anything about subversion (as long as they didn't modify at the same time, which isn't a problem due to the seldom edits in my deployment), have revision control via subversion of the local edits, and easily merge the LifeType development tree from time to time. All of this was satisfied by svk. Amazing! Give Chia-Liang Kao a cookie, or your money, whichever is easier.
Here are instructions for setting up your own svk/subversion repository to sync with LifeType:
svk depotmap --init svk mkdir //mirror svk mirror http://devel.lifetype.net/svn/plog/plog/trunk //mirror/lifetype/trunk/ svk sync //mirror/lifetype/trunk # that took a long time, I wanted to figure out how to # only grab recent # revisions, but I couldn't figure out how to do # it - probably put a fair amount of load on the devel server... # svk sync --skipto HEAD //mirror/lifetype/trunk *should* work, but there is a bug # in the current version - hasn't gotten much attention, it seems like. svk cp -p -r 2313 -m "copy from lifetype trunk, lifetype rev 3687" //mirror/lifetype/trunk //lifetype/devel svk checkout //lifetype/devel devel mv devel devel.svk svn export https://example.com/svn/lifetype/devel
# run various commands that effectively do: svk remove `svk status |grep "^!"` # this enables me to not have everything in the LifeType tree # in my main web server, ie. bin-devel, extra template directories, etc.
# then run (on a whim, but it did exactly the right thing # ie. went through the tree recursively, and added everything # that didn't exist before, and didn't give any errors about # files already added) svk add * svk commit -m "All local changes past up to current, based on rev 3687" svk smerge //mirror/lifetype/trunk //lifetype/devel
# done. In the future, I just have to do svk commit -m "blah blah, my changes" # and svk sync //mirror/lifetype/trunk svk smerge //mirror/lifetype/trunk //lifetype/devel
Very simple. You can also do svk push'es, to submit changes back up to the lifetype repository, but I haven't tried that yet.
Lastly, my production server is simply setup using subversion to access the svk repository, since svk stores its stuff in a subversion database.
svn checkout file:///home/jondaley/.svk/local/lifetype/devel # edit, etc. svn commit -m "blah blah, here I am editing in the devel tree" cd ../www/ # now that I have tested everything in the development tree, I can pull it # over in one chunk to the production server, with zero-downtime. svn update # this grabs my local changes (and any previously merged remote changes) # edit, etc. svn commit -m "blah blah, here I am editing in the production tree."
