# HG changeset patch # User Paul Boddie # Date 1316981906 -7200 # Node ID 65e9878b1625423146260e9cff1548fba0c90937 # Parent 61df4406786d875562f15c0fa8e1394f44511cd5 Added support for preserving the site files when migrating Wiki instances. diff -r 61df4406786d -r 65e9878b1625 moinsetup.py --- a/moinsetup.py Sun Sep 25 22:01:59 2011 +0200 +++ b/moinsetup.py Sun Sep 25 22:18:26 2011 +0200 @@ -1062,12 +1062,18 @@ finally: wikiconfig.close() - def migrate_instance(self, test=0): + def migrate_instance(self, test=0, change_site=0): """ Migrate the Wiki to the currently supported layout. If 'test' is - specified and set to a true value, only print whether the migration can - be performed. + specified and set to a non-empty or true value, only print whether the + migration can be performed. + + If 'change_site' is specified and set to a non-empty or true value, the + site definitions will be updated; this will overwrite any changes made + to the site definitions after they were last produced by moinsetup, and + care must be taken to ensure that things like access controls are + re-added to the definitions after this action is performed. """ conf_dir = join(self.common_dir, "conf") @@ -1117,11 +1123,12 @@ # Now attempt to reconfigure the Wiki. - print "Reconfigure the Wiki, the Web script and the site files." + print "Reconfigure the Wiki, the Web script%s." % (change_site and " and the site files" or "") if not test: self.configure_moin() self.edit_moin_web_script() - self.make_site_files() + if change_site: + self.make_site_files() def install_theme(self, theme_dir, theme_name=None):