2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
1 |
#!/bin/sh
|
2 |
#
|
|
8687.15.2
by Karl Fogel
In files modified by r8688, change "<YEARS>" to "2009", as per |
3 |
# Copyright 2009 Canonical Ltd. This software is licensed under the
|
8687.15.3
by Karl Fogel
Shorten the copyright header block to two lines. |
4 |
# GNU Affero General Public License version 3 (see the file LICENSE).
|
8687.15.4
by Karl Fogel
Add the copyright header block to more files; tweak format in a few files. |
5 |
#
|
6 |
# Lists pages that are unregistered or missing titles
|
|
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
7 |
|
8 |
LPDIR=lib/canonical/launchpad |
|
9 |
REGISTRY="lib/canonical/launchpad/zcml/*.zcml lib/canonical/*.zcml |
|
14027.3.1
by Jeroen Vermeulen
Fix lots of lint in recently-changed files. |
10 |
lib/canonical/launchpad/*.zcml *.zcml
|
1716.1.159
by Christian Reis
Improve check-templates removing false positives |
11 |
lib/zope/app/exception/browser/configure.zcml
|
12 |
lib/zope/app/debugskin/configure.zcml
|
|
13 |
lib/canonical/launchpad/webapp/*.zcml
|
|
14 |
lib/canonical/launchpad/browser/*.py"
|
|
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
15 |
|
16 |
MASTER_MACRO='metal:use-macro="context/@@main_template/master"' |
|
17 |
||
14027.3.1
by Jeroen Vermeulen
Fix lots of lint in recently-changed files. |
18 |
for f in $LPDIR/templates/*.pt; do |
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
19 |
base=`basename $f` |
20 |
clean=`echo $base | cut -d. -f1 | tr - _` |
|
1716.1.163
by Christian Reis
Removing unused page templates, and updating check-templates to deal with corner cases |
21 |
if echo $base | grep -qa ^template-; then |
22 |
# Ignore template-* prefixed files.
|
|
23 |
continue
|
|
24 |
fi
|
|
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
25 |
if grep -qs $base $REGISTRY; then |
26 |
if grep -q $MASTER_MACRO $f; then |
|
1716.1.163
by Christian Reis
Removing unused page templates, and updating check-templates to deal with corner cases |
27 |
# If this is a page that should require a title
|
3644.1.33
by Brad Bollenbach
move pagetitles back to the launchpad directory, with a comment explaining why it's there and not in webapp or browser |
28 |
grep -qs $clean $LPDIR/pagetitles.py || \ |
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
29 |
echo "** Missing Title: $base" |
30 |
fi
|
|
31 |
else
|
|
3644.1.33
by Brad Bollenbach
move pagetitles back to the launchpad directory, with a comment explaining why it's there and not in webapp or browser |
32 |
if grep $clean $LPDIR/pagetitles.py | grep -vqs ^\# ; then |
1716.1.163
by Christian Reis
Removing unused page templates, and updating check-templates to deal with corner cases |
33 |
# Why is the page not registered but has a title listed?
|
2415
by Canonical.com Patch Queue Manager
[trivial] Fix missing pagetitles, improve our basic test coverage for those pages, and add utilities/check-templates.sh which verifies if all templates are registered and properly pagetitled. Only one page title missing, but that's Salgado's fault |
34 |
echo Not registered, but has title: $base |
35 |
else
|
|
36 |
echo Not registered: $base |
|
37 |
fi
|
|
38 |
fi
|
|
39 |
done
|
|
40 |