~ubuntu-branches/ubuntu/intrepid/moin/intrepid-updates

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Sivan Greenberg
  • Date: 2006-07-09 19:28:02 UTC
  • Revision ID: james.westby@ubuntu.com-20060709192802-oaeuvt4v3e9300uj
Tags: 1.5.3-1ubuntu1
* Merge new debian version.
* Reapply Ubuntu changes:
    + debian/rules:
      - Comment out usage of control.ubuntu.in (doesn't fit!).
    + debian/control.in:
      - Dropped python2.3 binary package.
    + debian/control:
      - Dropped python2.3 binary, again.
      - Dropped python2.3-dev from Build-Depends-Indep.
    + debian/patches/001-attachment-xss-fix.patch:
      - Dropped this patch. It's now in upstream's distribution.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: iso-8859-1 -*-
 
2
"""
 
3
    MoinMoin - migration from base rev 1050300
 
4
 
 
5
    We add a filter plugin dir here.
 
6
 
 
7
    @copyright: 2006 by Thomas Waldmann
 
8
    @license: GNU GPL, see COPYING for details.
 
9
"""
 
10
from MoinMoin.script.migration.migutil import opj, listdir, copy_file, move_file, copy_dir, makedir
 
11
 
 
12
def execute(script, data_dir, rev):
 
13
    plugindir = opj(data_dir, 'plugin')
 
14
    for d in ['filter', ]:
 
15
        thisdir = opj(plugindir, d)
 
16
        makedir(thisdir)
 
17
        fname = opj(thisdir, '__init__.py')
 
18
        f = open(fname, 'w')
 
19
        f.write('''\
 
20
# -*- coding: iso-8859-1 -*-
 
21
 
 
22
from MoinMoin.util import pysupport
 
23
 
 
24
modules = pysupport.getPackageModules(__file__)
 
25
''')
 
26
        f.close()
 
27
    return rev+1
 
28