Edgewall Software

Ticket #156: trac_dont_init_svn.patch

File trac_dont_init_svn.patch, 1.6 KB (added by dmbrucker@…, 7 years ago)

skip svn initialization given '—none'

  • trac/scripts/admin.py

     
    480480    ## Initenv 
    481481    _help_initenv = [('initenv', 
    482482                      'Create and initialize a new environment interactively'), 
    483                      ('initenv <projectname> <db> <repospath> <templatepath>', 
     483                     ('initenv <projectname> <db> <repospath|--none> <templatepath>', 
    484484                      'Create and initialize a new environment from arguments')] 
    485485 
    486486    def do_initdb(self, line): 
     
    512512        print ' Please specify the absolute path to the project Subversion repository.' 
    513513        print ' Repository must be local, and trac-admin requires read+write' 
    514514        print ' permission to initialize the Trac database.' 
     515        print ' Specify \'--none\' to skip initialization of the subversion' 
     516        print ' repository (use trac without source control).' 
    515517        print 
    516518        drp = '/var/svn/test' 
    517519        prompt = 'Path to repository [%s]> ' % drp 
     
    580582            self._do_wiki_load(default_dir('wiki'), cursor) 
    581583            cnx.commit() 
    582584 
    583             print ' Indexing repository' 
    584             repos = self.__env.get_repository() 
    585             repos.sync() 
     585            if repository_dir != '--none': 
     586                print ' Indexing repository' 
     587                repos = self.__env.get_repository() 
     588                repos.sync() 
    586589 
    587590        except Exception, e: 
    588591            print 'Failed to initialize environment.', e