~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/script/migration/data.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
    Important: you must have run all 12_to_13* and the final 152_to_1050300
13
13
               mig scripts ONCE and in correct order manually before attempting
14
14
               to use the new style migration stuff.
15
 
               
16
 
    @copyright: 2006 by Thomas Waldmann
 
15
 
 
16
    @copyright: 2006 MoinMoin:ThomasWaldmann
17
17
    @license: GNU GPL, see COPYING for details.
18
18
"""
19
19
 
20
20
import os
21
21
 
22
22
from MoinMoin import wikiutil
23
 
from MoinMoin.script._util import MoinScript
 
23
from MoinMoin.script import MoinScript
24
24
 
25
25
class PluginScript(MoinScript):
26
26
    """ Migration script class """
31
31
            "--all", action="store_true", dest="all_wikis",
32
32
            help="when given, update all wikis that belong to this farm"
33
33
        )
34
 
    
 
34
 
35
35
    def mainloop(self):
36
36
        self.init_request()
37
37
        request = self.request
39
39
        meta_fname = os.path.join(data_dir, 'meta')
40
40
        while True:
41
41
            try:
42
 
                meta = wikiutil.MetaDict(meta_fname)
 
42
                meta = wikiutil.MetaDict(meta_fname, request.cfg.cache_dir)
43
43
                try:
44
44
                    curr_rev = meta['data_format_revision']
45
45
                    mig_name = str(curr_rev)