Edgewall Software

Ticket #586: repo-paths-trac-admin.6.diff

File repo-paths-trac-admin.6.diff, 1.8 KB (added by quannon.au@…, 4 years ago)

Fix for creating regular (no subpath) trac sites

  • trac-admin

    diff -u scripts/trac-admin scripts2/trac-admin
    old new  
    443443                    raise KeyboardInterrupt 
    444444                except Exception, e: 
    445445                    print repository_dir, 'Repository access error: %s' % e 
    446  
     446            print 
     447            print ' Please specify the relative subpath in the Subversion repository.' 
     448            print ' Leave this blank to show entire repository ' 
     449            print 
     450            while 1: 
     451                try: 
     452                    drp = '' 
     453                    prompt = 'Repository Subpath [%s]> ' % drp 
     454                    repository_path = raw_input(prompt) or drp                    
     455                    break 
     456                except KeyboardInterrupt: 
     457                    raise KeyboardInterrupt 
    447458            print 
    448459            print ' Please enter location of Trac page templates.' 
    449460            print ' Default is the location of the site-wide templates' \ 
     
    472483            print ' Configuring Project' 
    473484            print '  trac.repository_dir' 
    474485            self.__env.set_config('trac', 'repository_dir', repository_dir) 
     486            print '  trac.repository_path' 
     487            self.__env.set_config('trac', 'repository_path', repository_path) 
    475488            print '  trac.templates_dir' 
    476489            self.__env.set_config('trac', 'templates_dir', templates_dir) 
    477490            print '  project.name' 
     
    484497 
    485498            from trac import sync 
    486499            print ' Indexing repository' 
    487             sync.sync(cnx, rep, fs_ptr, pool) 
     500            sync.sync(cnx, rep, repository_path, fs_ptr, pool) 
    488501            print 'Done.' 
    489502        except Exception, e: 
    490503            print 'Failed to initialize database.', e