tests/histedit-helpers.sh
author Gregory Szorc <gregory.szorc@gmail.com>
Sun, 28 Jun 2015 09:36:58 -0700
changeset 25701 1f88c0f6ff5a
parent 17085 35729bdd59b6
child 27350 890273343170
permissions -rw-r--r--
import-checker: resolve relative imports "from . import X" will produce an ImportFrom ast node with .module = None. This resulted in a run-time error from attempting to concatenate None with a str. Another problem with relative imports is that the prefix may be dynamic based on the "level" attribute of the import. e.g. "from ." has level 1 and "from .." has level 2. We teach the "fromlocal" function how to cope with relative imports. Where appropriate, the consumer passes in the level so relative module names may be resolved properly.

fixbundle() {
    grep -v 'saving bundle' | grep -v 'saved backup' | \
        grep -v added | grep -v adding | \
        grep -v "unable to find 'e' for patching" | \
        grep -v "e: No such file or directory"
}