incubator-bloodhound-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From g..@apache.org
Subject svn commit: r1360726 - /incubator/bloodhound/trunk/trac/trac/admin/console.py
Date Thu, 12 Jul 2012 15:26:31 GMT
Author: gjm
Date: Thu Jul 12 15:26:31 2012
New Revision: 1360726

URL: http://svn.apache.org/viewvc?rev=1360726&view=rev
Log:
trac: add an option to avoid creating the initial wiki pages - #85

Modified:
    incubator/bloodhound/trunk/trac/trac/admin/console.py

Modified: incubator/bloodhound/trunk/trac/trac/admin/console.py
URL: http://svn.apache.org/viewvc/incubator/bloodhound/trunk/trac/trac/admin/console.py?rev=1360726&r1=1360725&r2=1360726&view=diff
==============================================================================
--- incubator/bloodhound/trunk/trac/trac/admin/console.py (original)
+++ incubator/bloodhound/trunk/trac/trac/admin/console.py Thu Jul 12 15:26:31 2012
@@ -396,11 +396,15 @@ in order to initialize and prepare the p
 
         arg = self.arg_tokenize(line)
         inherit_paths = []
+        add_wiki = True
         i = 0
         while i < len(arg):
             item = arg[i]
             if item.startswith('--inherit='):
                 inherit_paths.append(arg.pop(i)[10:])
+            elif item.startswith('--nowiki'):
+                add_wiki = False
+                arg.pop(i)
             else:
                 i += 1
         arg = arg or [''] # Reset to usual empty in case we popped the only one
@@ -441,11 +445,12 @@ in order to initialize and prepare the p
                 traceback.print_exc()
                 sys.exit(1)
 
-            # Add a few default wiki pages
-            printout(_(" Installing default wiki pages"))
-            pages_dir = pkg_resources.resource_filename('trac.wiki', 
-                                                        'default-pages') 
-            WikiAdmin(self.__env).load_pages(pages_dir)
+            if add_wiki:
+                # Add a few default wiki pages
+                printout(_(" Installing default wiki pages"))
+                pages_dir = pkg_resources.resource_filename('trac.wiki',
+                                                            'default-pages')
+                WikiAdmin(self.__env).load_pages(pages_dir)
 
             if repository_dir:
                 try:



Mime
View raw message