Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Side by Side Diff: adblockplus/build.py

Issue 30033563: Issue 7415 - ABP data is not being migrated
Patch Set: Created March 28, 2019, 2:01 p.m.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | adblockplus/issue-7415.patch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # coding: utf-8 2 # coding: utf-8
3 3
4 # This file is part of Adblock Plus <https://adblockplus.org/>, 4 # This file is part of Adblock Plus <https://adblockplus.org/>,
5 # Copyright (C) 2006-present eyeo GmbH 5 # Copyright (C) 2006-present eyeo GmbH
6 # 6 #
7 # Adblock Plus is free software: you can redistribute it and/or modify 7 # Adblock Plus is free software: you can redistribute it and/or modify
8 # it under the terms of the GNU General Public License version 3 as 8 # it under the terms of the GNU General Public License version 3 as
9 # published by the Free Software Foundation. 9 # published by the Free Software Foundation.
10 # 10 #
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 def _patch_abp(patched_dir): 47 def _patch_abp(patched_dir):
48 shutil.copytree(_BASE_DIR, patched_dir) 48 shutil.copytree(_BASE_DIR, patched_dir)
49 abp_dir = os.path.join(patched_dir, _ABP_DIR) 49 abp_dir = os.path.join(patched_dir, _ABP_DIR)
50 abp_core_dir = os.path.join(abp_dir, _ABP_CORE_DIR) 50 abp_core_dir = os.path.join(abp_dir, _ABP_CORE_DIR)
51 subprocess.check_call(["hg", "import", "-q", "-R", abp_core_dir, 51 subprocess.check_call(["hg", "import", "-q", "-R", abp_core_dir,
52 os.path.join(patched_dir, "issue-6070.patch")]) 52 os.path.join(patched_dir, "issue-6070.patch")])
53 53
54 subprocess.check_call(["hg", "import", "-q", "-R", abp_core_dir, 54 subprocess.check_call(["hg", "import", "-q", "-R", abp_core_dir,
55 os.path.join(patched_dir, "issue-6108.patch")]) 55 os.path.join(patched_dir, "issue-6108.patch")])
56 56
57 subprocess.check_call(["hg", "import", "-q", "-R", abp_dir,
58 os.path.join(patched_dir, "issue-7415.patch")])
59
57 if __name__ == "__main__": 60 if __name__ == "__main__":
58 if len(sys.argv) < 2: 61 if len(sys.argv) < 2:
59 error_message = "Usage: %s XPI_PATH" % os.path.basename(sys.argv[0]) 62 error_message = "Usage: %s XPI_PATH" % os.path.basename(sys.argv[0])
60 print >>sys.stderr, error_message 63 print >>sys.stderr, error_message
61 sys.exit(1) 64 sys.exit(1)
62 65
63 xpi_path = sys.argv[1] 66 xpi_path = sys.argv[1]
64 patched_dir = tempfile.NamedTemporaryFile().name 67 patched_dir = tempfile.NamedTemporaryFile().name
65 try: 68 try:
66 _patch_abp(patched_dir) 69 _patch_abp(patched_dir)
67 _build_abp(patched_dir, xpi_path) 70 _build_abp(patched_dir, xpi_path)
68 finally: 71 finally:
69 shutil.rmtree(patched_dir) 72 shutil.rmtree(patched_dir)
OLDNEW
« no previous file with comments | « no previous file | adblockplus/issue-7415.patch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld