##// END OF EJS Templates
fuzz: remove debug prints from revlog_corpus.py...
Augie Fackler -
r44247:98eb12ea default draft
parent child Browse files
Show More
@@ -1,28 +1,25 b''
1 from __future__ import absolute_import, print_function
1 from __future__ import absolute_import
2
2
3 import argparse
3 import argparse
4 import os
4 import os
5 import zipfile
5 import zipfile
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 # typically a standalone index
12 # typically a standalone index
13 changelog = os.path.join(reporoot, '.hg', 'store', '00changelog.i')
13 changelog = os.path.join(reporoot, '.hg', 'store', '00changelog.i')
14 # an inline revlog with only a few revisions
14 # an inline revlog with only a few revisions
15 contributing = os.path.join(
15 contributing = os.path.join(
16 reporoot, '.hg', 'store', 'data', 'contrib', 'fuzz', 'mpatch.cc.i'
16 reporoot, '.hg', 'store', 'data', 'contrib', 'fuzz', 'mpatch.cc.i'
17 )
17 )
18
18
19 print(changelog, os.path.exists(changelog))
20 print(contributing, os.path.exists(contributing))
21
22 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
19 with zipfile.ZipFile(args.out[0], "w", zipfile.ZIP_STORED) as zf:
23 if os.path.exists(changelog):
20 if os.path.exists(changelog):
24 with open(changelog) as f:
21 with open(changelog) as f:
25 zf.writestr("00changelog.i", f.read())
22 zf.writestr("00changelog.i", f.read())
26 if os.path.exists(contributing):
23 if os.path.exists(contributing):
27 with open(contributing) as f:
24 with open(contributing) as f:
28 zf.writestr("contributing.i", f.read())
25 zf.writestr("contributing.i", f.read())
General Comments 0
You need to be logged in to leave comments. Login now