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

Side by Side Diff: adblockplus/issue-2510.patch

Issue 29347343: Issue 4278 - Update ABP for Firefox dependency to version 2.7.3 (Closed)
Patch Set: Created July 7, 2016, 6:48 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 | « adblockplus/issue-2509.patch ('k') | dependencies » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 # HG changeset patch
2 # User Felix Dahlke <felix@adblockplus.org>
3 # Date 1431547667 -7200
4 # Wed May 13 22:07:47 2015 +0200
5 # Node ID 7e0cd0610aecdfe47450a26ae6e13c81fcb60d81
6 # Parent ae1c968784024553c3a2eaf4c446757798be7e13
7 Issue 2510 - Support Adblock Browser
8
9 diff -r ae1c96878402 -r 7e0cd0610aec chrome.manifest
10 --- a/chrome.manifest Tue May 12 23:01:08 2015 +0200
11 +++ b/chrome.manifest Wed May 13 22:07:47 2015 +0200
12 @@ -3,4 +3,4 @@
13 locale adblockplus {{LOCALE}} chrome/locale/{{LOCALE}}/
14
15 # fennec settings
16 -override chrome://adblockplus/content/ui/settings.xul chrome://adblockplus/cont ent/ui/fennecSettings.xul application={a23983c0-fd0e-11dc-95ff-0800200c9a66} app lication={aa3c5121-dab2-40e2-81ca-7ea25febc110}
17 +override chrome://adblockplus/content/ui/settings.xul chrome://adblockplus/cont ent/ui/fennecSettings.xul application={a23983c0-fd0e-11dc-95ff-0800200c9a66} app lication={aa3c5121-dab2-40e2-81ca-7ea25febc110} application={55aba3ac-94d3-41a8- 9e25-5c21fe874539}
18 diff -r ae1c96878402 -r 7e0cd0610aec dependencies
19 --- a/dependencies Tue May 12 23:01:08 2015 +0200
20 +++ b/dependencies Wed May 13 22:07:47 2015 +0200
21 @@ -1,4 +1,4 @@
22 _root = hg:https://hg.adblockplus.org/ git:https://github.com/adblockplus/
23 _self = buildtools/ensure_dependencies.py
24 -buildtools = buildtools hg:97e2e12af6e8 git:ef69bbc
25 +buildtools = buildtools hg:f9f01a4c16af git:
26 adblockplusui = adblockplusui hg:75a50600e10a git:7ebacdc
27 diff -r ae1c96878402 -r 7e0cd0610aec ensure_dependencies.py
28 --- a/ensure_dependencies.py Tue May 12 23:01:08 2015 +0200
29 +++ b/ensure_dependencies.py Wed May 13 22:07:47 2015 +0200
30 @@ -34,6 +34,10 @@
31 buildtools = buildtools hg:016d16f7137b git:f3f8692f82e5
32 """
33
34 +SKIP_DEPENDENCY_UPDATES = os.environ.get(
35 + "SKIP_DEPENDENCY_UPDATES", ""
36 +).lower() not in ("", "0", "false")
37 +
38 class Mercurial():
39 def istype(self, repodir):
40 return os.path.exists(os.path.join(repodir, ".hg"))
41 @@ -97,7 +101,20 @@
42 return subprocess.check_output(command, cwd=repo).strip()
43
44 def pull(self, repo):
45 + # Fetch tracked branches, new tags and the list of available remote branche s
46 subprocess.check_call(["git", "fetch", "--quiet", "--all", "--tags"], cwd=r epo)
47 + # Next we need to ensure all remote branches are tracked
48 + newly_tracked = False
49 + remotes = subprocess.check_output(["git", "branch", "--remotes"], cwd=repo)
50 + for match in re.finditer(r"^\s*(origin/(\S+))$", remotes, re.M):
51 + remote, local = match.groups()
52 + with open(os.devnull, "wb") as devnull:
53 + if subprocess.call(["git", "branch", "--track", local, remote],
54 + cwd=repo, stdout=devnull, stderr=devnull) == 0:
55 + newly_tracked = True
56 + # Finally fetch any newly tracked remote branches
57 + if newly_tracked:
58 + subprocess.check_call(["git", "fetch", "--quiet", "origin"], cwd=repo)
59
60 def update(self, repo, rev):
61 subprocess.check_call(["git", "checkout", "--quiet", rev], cwd=repo)
62 @@ -167,7 +184,7 @@
63
64 def safe_join(path, subpath):
65 # This has been inspired by Flask's safe_join() function
66 - forbidden = set([os.sep, os.altsep]) - set([posixpath.sep, None])
67 + forbidden = {os.sep, os.altsep} - {posixpath.sep, None}
68 if any(sep in subpath for sep in forbidden):
69 raise Exception("Illegal directory separator in dependency path %s" % subpa th)
70
71 @@ -188,6 +205,11 @@
72 if os.path.exists(target):
73 return
74
75 + if SKIP_DEPENDENCY_UPDATES:
76 + logging.warning("SKIP_DEPENDENCY_UPDATES environment variable set, "
77 + "%s not cloned", target)
78 + return
79 +
80 parenttype = get_repo_type(parentrepo)
81 type = None
82 for key in roots:
83 @@ -227,15 +249,21 @@
84 return
85
86 resolved_revision = repo_types[type].get_revision_id(target, revision)
87 - if not resolved_revision:
88 - logging.info("Revision %s is unknown, downloading remote changes" % revisio n)
89 - repo_types[type].pull(target)
90 - resolved_revision = repo_types[type].get_revision_id(target, revision)
91 + current_revision = repo_types[type].get_revision_id(target)
92 +
93 + if resolved_revision != current_revision:
94 + if SKIP_DEPENDENCY_UPDATES:
95 + logging.warning("SKIP_DEPENDENCY_UPDATES environment variable set, "
96 + "%s not checked out to %s", target, revision)
97 + return
98 +
99 if not resolved_revision:
100 - raise Exception("Failed to resolve revision %s" % revision)
101 + logging.info("Revision %s is unknown, downloading remote changes" % revis ion)
102 + repo_types[type].pull(target)
103 + resolved_revision = repo_types[type].get_revision_id(target, revision)
104 + if not resolved_revision:
105 + raise Exception("Failed to resolve revision %s" % revision)
106
107 - current_revision = repo_types[type].get_revision_id(target)
108 - if resolved_revision != current_revision:
109 logging.info("Updating repository %s to revision %s" % (target, resolved_re vision))
110 repo_types[type].update(target, resolved_revision)
111
112 @@ -247,6 +275,7 @@
113 return
114 if level >= 10:
115 logging.warning("Too much subrepository nesting, ignoring %s" % repo)
116 + return
117
118 if overrideroots is not None:
119 config["_root"] = overrideroots
120 diff -r ae1c96878402 -r 7e0cd0610aec lib/appSupport.js
121 --- a/lib/appSupport.js Tue May 12 23:01:08 2015 +0200
122 +++ b/lib/appSupport.js Wed May 13 22:07:47 2015 +0200
123 @@ -690,6 +690,7 @@
124 }
125
126 case "fennec2":
127 + case "adblockbrowser":
128 {
129 exports.isKnownWindow = (window) => window.document.documentElement.id == " main-window";
130
131 diff -r ae1c96878402 -r 7e0cd0610aec lib/objectTabs.js
132 --- a/lib/objectTabs.js Tue May 12 23:01:08 2015 +0200
133 +++ b/lib/objectTabs.js Wed May 13 22:07:47 2015 +0200
134 @@ -178,7 +178,8 @@
135 {
136 // Object tabs aren't usable in Fennec
137 let {application} = require("info");
138 - if (application == "fennec" || application == "fennec2")
139 + if (application == "fennec" || application == "fennec2" ||
140 + application == "adblockbrowser")
141 return;
142
143 let {Prefs} = require("prefs");
144 diff -r ae1c96878402 -r 7e0cd0610aec metadata.gecko
145 --- a/metadata.gecko Tue May 12 23:01:08 2015 +0200
146 +++ b/metadata.gecko Wed May 13 22:07:47 2015 +0200
147 @@ -34,6 +34,7 @@
148 thunderbird=29.0/39.0
149 seamonkey=2.26/2.36
150 toolkit=29.0/39.0
151 +adblockbrowser=1.0/1.0
152
153 [mapping]
154 chrome/content/ui/firstRun.html = adblockplusui/firstRun.html
OLDNEW
« no previous file with comments | « adblockplus/issue-2509.patch ('k') | dependencies » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld