contrib/fuzz/dirstate_corpus.py
changeset 43076 2372284d9457
parent 41015 b444407f635b
child 43836 ba84a1ae4ae5
equal deleted inserted replaced
43075:57875cf423c9 43076:2372284d9457
     6 
     6 
     7 ap = argparse.ArgumentParser()
     7 ap = argparse.ArgumentParser()
     8 ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
     8 ap.add_argument("out", metavar="some.zip", type=str, nargs=1)
     9 args = ap.parse_args()
     9 args = ap.parse_args()
    10 
    10 
    11 reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__),
    11 reporoot = os.path.normpath(os.path.join(os.path.dirname(__file__), '..', '..'))
    12                                          '..', '..'))
       
    13 dirstate = os.path.join(reporoot, '.hg', 'dirstate')
    12 dirstate = os.path.join(reporoot, '.hg', 'dirstate')
    14 
    13 
    15 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
    14 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
    16     if os.path.exists(dirstate):
    15     if os.path.exists(dirstate):
    17         with open(dirstate) as f:
    16         with open(dirstate) as f: