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

« back to all changes in this revision

Viewing changes to MoinMoin/script/old/migration/152_to_1050300.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:
1
1
#!/usr/bin/env python
2
2
"""
3
3
    Migration from moin 1.5.2 to moin 1.5.3
4
 
    
 
4
 
5
5
    We just make sure that there is a "meta" file in your data directory that
6
6
    stores the "revision" level of it (so future mig scripts can tell if they
7
7
    need to run or not [e.g. because you already have run them]).
8
 
    
 
8
 
9
9
    This is the last "old style" migration script.
10
10
 
11
11
    Steps for a successful migration:
13
13
        1. You do NOT need to stop your wiki for this mig script.
14
14
 
15
15
        2. Change directory to: .../MoinMoin/script/old/migration
16
 
        
 
16
 
17
17
        3. Run this script as a user who may write to the data_dir of your wiki
18
18
           and supply the pathes to the data_dir you want to migrate. If you
19
19
           have multiple wikis, you may specify multiple pathes on the command
20
20
           line:
21
21
 
22
22
           sudo -u www-data ./152_to_1050300.py /my/path/to/data
23
 
                                 
 
23
 
24
24
        4. That's it.
25
25
           Future mig scripts now can auto-detect the data_dir revision level.
26
26
 
58
58
 
59
59
if __name__ == '__main__':
60
60
    if len(sys.argv) < 2:
61
 
        data_dirs = ['data',]
 
61
        data_dirs = ['data', ]
62
62
    else:
63
63
        data_dirs = sys.argv[1:]
64
64
    migrate(data_dirs)