Details

Applies to
MoinMoin/macro/Include.py
Purpose
make the Include macro easier to modify
Description
my intention is to refactor MoinMoin/macro/Include.py, i.e. make no changes to its behaviour; this will take a couple of patches

Patches

The patches are published here: http://vc.gerg.ca/hg/moin-1.9-refactor-include-patches . That is an MQ repository, i.e. a repository of .hg/patches from a clone of the canonical moin/1.9 repository.

In order, the patches are:

  1. Add tests for Include macro.
  2. Factor out several functions that setup the list of pages to include.
  3. Factor out functions that work on including a single page.
  4. Factor out the body of the main loop of execute() to include_page().
  5. Factor out parse_args() and IncludeArgs class for parsing/storing args passed to the macro.

  6. Check for macroInclude_pagelist[inc_name] > 1 is bogus: add comment and assertion.

You can review the patches by cloning my MQ repository into a clean clone of moin/1.9:

http://hg.moinmo.in/moin/1.9 moin-1.9
cd moin-1.9
hg clone http://vc.gerg.ca/hg/moin-1.9-refactor-include-patches .hg/patches
hg qpush/qpop/etc at will...

Discussion

Plan


CategoryMoinMoinPatch

MoinMoin: MoinMoinPatch/RefactorIncludeMacro (last edited 2009-01-29 23:20:39 by 69-196-167-3)