view tests/test-check-pyflakes.t @ 29471:c4fc33c477da

hgweb: expose list of per-repo labels to templates hgweb currently offers limited functionality for "classifying" repositories. This patch aims to change that. The web.labels config option list is introduced. Its values are exposed to the "index" and "summary" templates. Custom templates can use template features like ifcontains() to e.g. look for the presence of a specific label and engage specific behavior. For example, a site operator may wish to assign a "defunct" label to a repository so the repository is prominently marked as dead in repository indexes.
author Gregory Szorc <gregory.szorc@gmail.com>
date Thu, 30 Jun 2016 18:59:53 -0700
parents 3dad34e9d134
children 06587edd1233
line wrap: on
line source

#require test-repo pyflakes hg10

  $ . "$TESTDIR/helpers-testrepo.sh"
  $ cd "`dirname "$TESTDIR"`"

run pyflakes on all tracked files ending in .py or without a file ending
(skipping binary file random-seed)

  $ hg locate 'set:**.py or grep("^#!.*python")' 2>/dev/null \
  > | xargs pyflakes 2>/dev/null | "$TESTDIR/filterpyflakes.py"
  tests/filterpyflakes.py:61: undefined name 'undefinedname'