|
SyncrSubversion
Syncr: Subversion
Warning: Work in progress. IntroductionSynchronize Subversion commits with django. Dependencies
AppSubversionSyncr
ModelsSubversionSync
* Warning: This option make the synchronization significantly longer.. Revision
SynchronizingFor this syncr app I'm playing with an experimental and hopefully easier way to call the script with Django's command management. First there is two ways to specify your repositories. The first one is to use settings.py to hold your configurations, like this;
SVN_SYNCS = (
{'url': 'http://django-syncr.googlecode.com/svn/trunk/'},
)
This is the absolute minimal configuration needed. The next thing to do in order to sync is type this command in your project folder; python manage.py subversion sync For convenience, I've also created the reset command, which will drop every Revision entries. python manage.py subversion reset Before explaining the other method, here's how to specify more options, like authentification and how to override defaults settings for specific repositories;
def authenticate(realm, username, may_save):
return True, 'MyUserName', 'MyPassword', True
SVN_SYNCS = (
{'url': 'https://django-syncr.googlecode.com/svn/trunk/', 'get_login': authenticate, 'discover_changed_paths': True, 'end': 50, 'start': 1000},
)
The second method is even easier, if there is no SVN_SYNCS property in settings.py, the script will look into the database and sync every entries found in the table SubversionSync. You cannot use both method at the same time, it's either one or the other. Settings
Common ErrorsSync Error: columns revision, svnPath are not unique For the table Revision I use unique_together on revision and svnPath to enforce uniqueness. So it's normal to see this error when synchronizing. It only means that the record was already in the database. |
Sign in to add a comment