[Commits] [wesnoth/wesnoth] a1ebdd: wmltools: split campaigns/add-ons into separate su...

GitHub noreply at github.com
Thu Aug 14 10:06:22 UTC 2014


  Branch: refs/heads/1.12
  Home:   https://github.com/wesnoth/wesnoth
  Commit: a1ebdd84435d0f5a514206ce39c5a660db8fe2c3
      https://github.com/wesnoth/wesnoth/commit/a1ebdd84435d0f5a514206ce39c5a660db8fe2c3
  Author: Groggy Dice <groggydice at yahoo.com>
  Date:   2014-08-14 (Thu, 14 Aug 2014)

  Changed paths:
    M data/tools/wesnoth/wmltools.py

  Log Message:
  -----------
  wmltools: split campaigns/add-ons into separate subtrees for wmlscope

The problem: wmlscope assigns each file to a directory-based subtree, and
assumes that it is visible to every other file in that subtree. The intent
is that each campaign (or add-on of another type) will be in its own
subtree.

However, wmlscope/wmltools has derived these subtrees based on what
arguments get passed to wmlscope, rather than checking whether campaigns
have actually been split out. For instance, invoking wmlscope with
"../data/core ../data/campaigns <userdata>/data/add-ons" will cause
wmlscope to see three subtrees, one of which consists of all mainline
campaigns and another that includes all the user's add-ons. This leads to
many spurious "more than one definition/resource is visible here" errors.

A wildcard like "data/campaigns/*" would be expanded to all the individual
campaign directories. However, the wmlscope user might not know that they
should do that. Also, until the glob module was imported recently, globbing
did not work in the Windows cmd shell.

The solution: declare "campaigns" and "add-ons" to be roots, and check for
their presence in the directory names. If indicated, split out the
subdirectories into their own subtrees. Since it is possible that the user
may have moved, copied, or drafted campaigns/add-ons to another folder
that isn't following Wesnoth convention, also check for that.





More information about the Commits mailing list