def update(path, dryRun=False):
    return
    say('Downloading backref data...')
    constants.quiet = float('inf')
    if (not dryRun):
        specs = defaultdict(dict)
        backrefs = defaultdict((lambda : defaultdict(list)))
        for (i, testPath) in enumerate(findTestFiles()):
            if (i > 1):
                break
            print(i, testNameForPath(testPath))
            doc = Spec(inputFilename=testPath)
            doc.preprocess()
            if doc.md.ED:
                url = doc.md.ED
            elif doc.md.TR:
                url = doc.md.TR
            else:
                continue
            referencingShortname = doc.md.vshortname
            for ref in processRefs(doc.externalRefsUsed):
                (_, _, referencedID) = ref.url.partition('#')
                referencedID = urllib.parse.unquote(referencedID)
                referencedShortname = ref.spec
                referencingLinks = findAll("[href='{0}']".format(ref.url), doc)
                referencingIDs = [link.get('id') for link in referencingLinks if link.get('id')]
                referencingURLs = ['{0}#{1}'.format(url, id) for id in referencingIDs]
                backrefs[referencedShortname][referencedID].append({'shortname': referencingShortname, 'urls': referencingURLs})
    print(config.printjson(backrefs))
def update(path, dryRun=False):
    return
    say('Downloading backref data...')
    constants.quiet = float('inf')
    if (not dryRun):
        specs = defaultdict(dict)
        backrefs = defaultdict((lambda : defaultdict(list)))
        for (i, testPath) in enumerate(findTestFiles()):
            if (i > 1):
                break
            print(i, testNameForPath(testPath))
            doc = Spec(inputFilename=testPath)
            doc.preprocess()
            if doc.md.ED:
                url = doc.md.ED
            elif doc.md.TR:
                url = doc.md.TR
            else:
                continue
            referencingShortname = doc.md.vshortname
            for ref in processRefs(doc.externalRefsUsed):
                (_, _, referencedID) = ref.url.partition('#')
                referencedID = urllib.parse.unquote(referencedID)
                referencedShortname = ref.spec
                referencingLinks = findAll("[href='{0}']".format(ref.url), doc)
                referencingIDs = [link.get('id') for link in referencingLinks if link.get('id')]
                referencingURLs = ['{0}#{1}'.format(url, id) for id in referencingIDs]
                backrefs[referencedShortname][referencedID].append({'shortname': referencingShortname, 'urls': referencingURLs})
    print(config.printjson(backrefs))