iain duncan schrieb: > It's about time I got to using source control properly for my tg > projects. Wondering if anyone has put any tips up anywhere on how to > best go about this for someone new to subversion. Or if anyone wants to > share what they do, perhaps I could make a wiki page out of the results.
I'd really advise you to read the SVN Book [1], if you have not already done so. It's very understandable and not too long (you can leave out most of the administration stuff). Using SVN for turbogears projects is mostly straight forward, I usually add '*.pyc' and '*.pyo' to the "global-ignores" list in /etc/subversion/config and add "*.py = svn:eol-style=native" to the "[auto-props]" section in that file and set enable-auto-props=yes. You also might want to set 'svn:ignore' to '*.py' for the 'templates' folder and all of its subfolders (the setting is non-recursive), so that compiled Kid templates are not committed. You then have to add the __init__.py file manually. I'd also advise you to follow the "Recommended repository layout" [2], since most OS projects do the same and it makes creating tags and branches very easy. If you install a Trac server for your project, you get a really nice repository browser (much nicer than the standard HTTP access method), which also allows users to download SVN snapshots without the need for direct SVN access through svnserve or http. If you want to give other developers write access to the repository, I would recommend setting up a special user account for the SVN repository and then follow the setup described here [3]. Here's a svnserve wrapper script which I use, that gets executed through the "command" parameter of the keys in authorized_keys [4] Further best practices are: - Write a deployment script that automatically tags the SVN reporitory for every deployment, so you can easily revert to a working state later. - Create a little shell alias for marking a file for SVN keyword substitution: alias svnkeywords="svn propset 'svn:keywords' 'Date Rev Author Id HeadURL' I then have the following in my Python source files: __author__ = "$Author:$" __revision__ = "$Rev:$" __date__ = "$Date:$" - use a GUI like RapidSVN or Workbench for committing changes. They make it a lot easier to select files for committing, viewing diffs and writing commit log messages. That's it for the moment. HTH, Chris [1] http://svnbook.red-bean.com/ [2] http://tinyurl.com/3xv82u [3] http://tinyurl.com/ho2pa [4] http://paste.turbogears.org/paste/1407 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TurboGears" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/turbogears?hl=en -~----------~----~----~----~------~----~------~--~---

