equal
deleted
inserted
replaced
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: |