summaryrefslogtreecommitdiff
path: root/scripts/list-overlaps
Commit message (Collapse)AuthorAgeFilesLines
* Make our use of json binary path safebaserock/richardmaw/bugfix/unicode-safe-jsonRichard Maw2014-07-111-2/+2
| | | | | | | | | | | | | | | | | | | | | json only accepts unicode. Various APIs such as file paths and environment variables allow binary data, so we need to support this properly. This patch changes every[1] use of json.load or json.dump to escape non-unicode data strings. This appears exactly as it used to if the input was valid unicode, if it isn't it will insert \xabcd escapes in the place of non-unicode data. When loading back in, if json.load is told to unescape it with `encoding='unicode-escape'` then it will convert it back correctly. This change was primarily to support file paths that weren't valid unicode, where this would choke and die. Now it works, but any tools that parsed the metadata need to unescape the paths. [1]: The interface to the remote repo cache uses json data, but I haven't changes its json.load calls to unescape the data, since the repo caches haven't been made to escape the data.
* python scripts: pep8ize codebaseRichard Maw2012-08-011-3/+4
| | | | | | | | | This was done with the aid of the pep8 script, available by running `easy_install pep8`. It may be worth making this part of ./check, but that will require putting pep8 into the development tools stratum. This should be easy, given pep8 has no external dependencies.
* fix tabs and line widths so ./check passesRichard Maw2012-06-141-5/+5
|
* tests: verify overlaps are written to the cacheRichard Maw2012-06-141-0/+44
This adds a new script called list-overlaps, which when given a json dump of the overlap can be used to query what is overlapping The tests use this script to check that the overlaps are detected