Merge ~racb/git-ubuntu:unglobal-parent-overrides into git-ubuntu:master
- Git
- lp:~racb/git-ubuntu
- unglobal-parent-overrides
- Merge into master
Status: | Merged |
---|---|
Approved by: | Nish Aravamudan |
Approved revision: | baf6159f2646ef0f9d5072e9f9ee4bd9f0dd8144 |
Merge reported by: | Nish Aravamudan |
Merged at revision: | baf6159f2646ef0f9d5072e9f9ee4bd9f0dd8144 |
Proposed branch: | ~racb/git-ubuntu:unglobal-parent-overrides |
Merge into: | git-ubuntu:master |
Diff against target: |
316 lines (+48/-40) 3 files modified
gitubuntu/importer.py (+43/-25) gitubuntu/importlocal.py (+2/-3) gitubuntu/importppa.py (+3/-12) |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Nish Aravamudan | Approve | ||
Server Team CI bot | continuous-integration | Approve | |
Review via email:
|
Commit message
Make Jenkins happy
Description of the change
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Robie Basak (racb) wrote : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Server Team CI bot (server-team-bot) wrote : | # |
PASSED: Continuous integration, rev:baf6159f264
https:/
Executed test runs:
SUCCESS: Checkout
SUCCESS: Style Check
SUCCESS: Unit Tests
SUCCESS: Integration Tests
IN_PROGRESS: Declarative: Post Actions
Click here to trigger a rebuild:
https:/
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) wrote : | # |
I know it's not a performance critical path, but does it make sense to make this @lru_cache()? Operationally, we don't want this to change under us, and it seems like it could during an operation?
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) : | # |
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) wrote : | # |
Barring that issue, I'm happy to land this and the follow-on.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Robie Basak (racb) wrote : | # |
Which function do you mean? parse_parentfile is only called from the main function still I think (in the end)?
I did plan @lru_cache, but didn't refactor the code to re-parse every time anyway.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) wrote : | # |
Right, parse_parentfile before would not reparse, because _PARENT_OVERRIDES would be defined on second invocation (poor man's @lru_cache :); so if we want to be strictly functionally equivalent, we would keep that behavior. I suppose it does not matter, but we don't assert (nor is it mentioned in the comments) that calling the method will reparse every time.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Robie Basak (racb) wrote : | # |
I see. Yes - I suppose that's a functional change to parse_parentfile. But I don't think it makes sense to maintain the old behaviour (specifically that protection). A grep for parse_parentfile confirms that we are only ever calling it once from the three main functions (import, importppa and importlocal). If I were to write this from scratch, I wouldn't include this protection, so I think it makes sense to drop it.
I can explicitly call out that change in the commit message if you wish. But I think that not having @lru_cache is the right thing to do.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) wrote : | # |
No, that's fine, I just wanted to make sure it was intentional.
![](/+icing/build/overlay/assets/skins/sam/images/close.gif)
Nish Aravamudan (nacc) : | # |
Preview Diff
1 | diff --git a/gitubuntu/importer.py b/gitubuntu/importer.py | |||
2 | index 5e4fe00..cdd34e2 100644 | |||
3 | --- a/gitubuntu/importer.py | |||
4 | +++ b/gitubuntu/importer.py | |||
5 | @@ -317,8 +317,7 @@ def main( | |||
6 | 317 | 317 | ||
7 | 318 | os.makedirs(workdir, exist_ok=True) | 318 | os.makedirs(workdir, exist_ok=True) |
8 | 319 | 319 | ||
11 | 320 | # now sets a global _PARENT_OVERRIDES | 320 | parent_overrides = parse_parentfile(parentfile, pkgname) |
10 | 321 | parse_parentfile(parentfile, pkgname) | ||
12 | 322 | 321 | ||
13 | 323 | only_debian, history_found = import_publishes( | 322 | only_debian, history_found = import_publishes( |
14 | 324 | repo=repo, | 323 | repo=repo, |
15 | @@ -333,6 +332,7 @@ def main( | |||
16 | 333 | workdir=workdir, | 332 | workdir=workdir, |
17 | 334 | skip_orig=skip_orig, | 333 | skip_orig=skip_orig, |
18 | 335 | allow_applied_failures=allow_applied_failures, | 334 | allow_applied_failures=allow_applied_failures, |
19 | 335 | parent_overrides=parent_overrides, | ||
20 | 336 | ) | 336 | ) |
21 | 337 | 337 | ||
22 | 338 | if not history_found: | 338 | if not history_found: |
23 | @@ -354,6 +354,7 @@ def main( | |||
24 | 354 | workdir=workdir, | 354 | workdir=workdir, |
25 | 355 | skip_orig=skip_orig, | 355 | skip_orig=skip_orig, |
26 | 356 | allow_applied_failures=allow_applied_failures, | 356 | allow_applied_failures=allow_applied_failures, |
27 | 357 | parent_overrides=parent_overrides, | ||
28 | 357 | ) | 358 | ) |
29 | 358 | 359 | ||
30 | 359 | update_devel_branches( | 360 | update_devel_branches( |
31 | @@ -846,7 +847,6 @@ def import_patches_applied_tree(repo, dsc_pathname): | |||
32 | 846 | shutil.rmtree(extract_dir) | 847 | shutil.rmtree(extract_dir) |
33 | 847 | repo.clean_repository_state() | 848 | repo.clean_repository_state() |
34 | 848 | 849 | ||
35 | 849 | _PARENT_OVERRIDES = None | ||
36 | 850 | def parse_parentfile(parentfile, pkgname): | 850 | def parse_parentfile(parentfile, pkgname): |
37 | 851 | """Extract parent overrides from a file | 851 | """Extract parent overrides from a file |
38 | 852 | 852 | ||
39 | @@ -862,13 +862,13 @@ def parse_parentfile(parentfile, pkgname): | |||
40 | 862 | The <changelog parent version> is the prior version in the | 862 | The <changelog parent version> is the prior version in the |
41 | 863 | child publish's debian/changelog. | 863 | child publish's debian/changelog. |
42 | 864 | 864 | ||
45 | 865 | Keyword Arguments: | 865 | :param str parentfile: path to parent overrides file |
46 | 866 | parentfile -- Path to parent overrides file | 866 | :param str pkgname: source package name on which to filter |
47 | 867 | :rtype: dict | ||
48 | 868 | :returns: dictionary keyed by version string of dictionaries keyed by | ||
49 | 869 | 'changelog_parent' of strings of changelog parent versions. | ||
50 | 867 | """ | 870 | """ |
55 | 868 | global _PARENT_OVERRIDES | 871 | parent_overrides = dict() |
52 | 869 | if _PARENT_OVERRIDES: | ||
53 | 870 | return | ||
54 | 871 | _PARENT_OVERRIDES = dict() | ||
56 | 872 | try: | 872 | try: |
57 | 873 | with open(parentfile) as f: | 873 | with open(parentfile) as f: |
58 | 874 | for line in f: | 874 | for line in f: |
59 | @@ -882,22 +882,30 @@ def parse_parentfile(parentfile, pkgname): | |||
60 | 882 | continue | 882 | continue |
61 | 883 | if m.group('pkgname') != pkgname: | 883 | if m.group('pkgname') != pkgname: |
62 | 884 | continue | 884 | continue |
64 | 885 | _PARENT_OVERRIDES[m.group('childversion')] = { | 885 | parent_overrides[m.group('childversion')] = { |
65 | 886 | 'changelog_parent': m.group('parent2version') | 886 | 'changelog_parent': m.group('parent2version') |
66 | 887 | } | 887 | } |
67 | 888 | except FileNotFoundError: | 888 | except FileNotFoundError: |
68 | 889 | pass | 889 | pass |
69 | 890 | 890 | ||
71 | 891 | def override_parents(repo, spi, namespace): | 891 | return parent_overrides |
72 | 892 | |||
73 | 893 | def override_parents(parent_overrides, repo, spi, namespace): | ||
74 | 894 | """ | ||
75 | 895 | returns: (unapplied, applied) where both elements of the tuple are commit | ||
76 | 896 | hash strings of the changelog parent to use, incorporating any defined | ||
77 | 897 | overrides. | ||
78 | 898 | rtype: tuple(str, str) | ||
79 | 899 | """ | ||
80 | 892 | unapplied_changelog_parent_commit = None | 900 | unapplied_changelog_parent_commit = None |
81 | 893 | applied_changelog_parent_commit = None | 901 | applied_changelog_parent_commit = None |
82 | 894 | 902 | ||
83 | 895 | unapplied_changelog_parent_tag = repo.get_import_tag( | 903 | unapplied_changelog_parent_tag = repo.get_import_tag( |
85 | 896 | _PARENT_OVERRIDES[spi.version]['changelog_parent'], | 904 | parent_overrides[spi.version]['changelog_parent'], |
86 | 897 | namespace | 905 | namespace |
87 | 898 | ) | 906 | ) |
88 | 899 | applied_changelog_parent_tag = repo.get_applied_tag( | 907 | applied_changelog_parent_tag = repo.get_applied_tag( |
90 | 900 | _PARENT_OVERRIDES[spi.version]['changelog_parent'], | 908 | parent_overrides[spi.version]['changelog_parent'], |
91 | 901 | namespace | 909 | namespace |
92 | 902 | ) | 910 | ) |
93 | 903 | if unapplied_changelog_parent_tag is not None: | 911 | if unapplied_changelog_parent_tag is not None: |
94 | @@ -906,13 +914,13 @@ def override_parents(repo, spi, namespace): | |||
95 | 906 | parent_changelog_version, _ = repo.get_changelog_versions_from_treeish( | 914 | parent_changelog_version, _ = repo.get_changelog_versions_from_treeish( |
96 | 907 | str(unapplied_changelog_parent_tag.peel().id), | 915 | str(unapplied_changelog_parent_tag.peel().id), |
97 | 908 | ) | 916 | ) |
99 | 909 | if parent_changelog_version != _PARENT_OVERRIDES[spi.version]['changelog_parent']: | 917 | if parent_changelog_version != parent_overrides[spi.version]['changelog_parent']: |
100 | 910 | logging.error('Found a tag corresponding to ' | 918 | logging.error('Found a tag corresponding to ' |
101 | 911 | 'changelog parent override ' | 919 | 'changelog parent override ' |
102 | 912 | 'version %s, but d/changelog ' | 920 | 'version %s, but d/changelog ' |
103 | 913 | 'version (%s) differs. Will ' | 921 | 'version (%s) differs. Will ' |
104 | 914 | 'orphan commit.' % ( | 922 | 'orphan commit.' % ( |
106 | 915 | _PARENT_OVERRIDES[spi.version]['changelog_parent'], | 923 | parent_overrides[spi.version]['changelog_parent'], |
107 | 916 | parent_changelog_version | 924 | parent_changelog_version |
108 | 917 | ) | 925 | ) |
109 | 918 | ) | 926 | ) |
110 | @@ -924,7 +932,7 @@ def override_parents(repo, spi, namespace): | |||
111 | 924 | repo.tag_to_pretty_name(unapplied_changelog_parent_tag) | 932 | repo.tag_to_pretty_name(unapplied_changelog_parent_tag) |
112 | 925 | ) | 933 | ) |
113 | 926 | else: | 934 | else: |
115 | 927 | if _PARENT_OVERRIDES[spi.version]['changelog_parent'] == '-': | 935 | if parent_overrides[spi.version]['changelog_parent'] == '-': |
116 | 928 | logging.debug('Not setting changelog parent as specified ' | 936 | logging.debug('Not setting changelog parent as specified ' |
117 | 929 | 'in override file.' | 937 | 'in override file.' |
118 | 930 | ) | 938 | ) |
119 | @@ -932,7 +940,7 @@ def override_parents(repo, spi, namespace): | |||
120 | 932 | raise ParentOverrideError( | 940 | raise ParentOverrideError( |
121 | 933 | "Specified changelog parent override (%s) for version " | 941 | "Specified changelog parent override (%s) for version " |
122 | 934 | "(%s) not found in tags. Unable to proceed." % ( | 942 | "(%s) not found in tags. Unable to proceed." % ( |
124 | 935 | _PARENT_OVERRIDES[spi.version]['changelog_parent'], | 943 | parent_overrides[spi.version]['changelog_parent'], |
125 | 936 | spi.version, | 944 | spi.version, |
126 | 937 | ) | 945 | ) |
127 | 938 | ) | 946 | ) |
128 | @@ -1057,7 +1065,13 @@ def update_devel_branches( | |||
129 | 1057 | 1065 | ||
130 | 1058 | 1066 | ||
131 | 1059 | # imports a package based upon source package information | 1067 | # imports a package based upon source package information |
133 | 1060 | def import_unapplied_spi(repo, spi, namespace, skip_orig): | 1068 | def import_unapplied_spi( |
134 | 1069 | repo, | ||
135 | 1070 | spi, | ||
136 | 1071 | namespace, | ||
137 | 1072 | skip_orig, | ||
138 | 1073 | parent_overrides, | ||
139 | 1074 | ): | ||
140 | 1061 | """Imports a source package from Launchpad into the git | 1075 | """Imports a source package from Launchpad into the git |
141 | 1062 | repository | 1076 | repository |
142 | 1063 | 1077 | ||
143 | @@ -1118,7 +1132,7 @@ def import_unapplied_spi(repo, spi, namespace, skip_orig): | |||
144 | 1118 | ) | 1132 | ) |
145 | 1119 | 1133 | ||
146 | 1120 | # sanity check on spph and d/changelog agreeing on the latest version | 1134 | # sanity check on spph and d/changelog agreeing on the latest version |
148 | 1121 | if spi.version not in _PARENT_OVERRIDES: | 1135 | if spi.version not in parent_overrides: |
149 | 1122 | assert spi.version == changelog_version, ( | 1136 | assert spi.version == changelog_version, ( |
150 | 1123 | 'source pkg version: {} != changelog version: {}'.format( | 1137 | 'source pkg version: {} != changelog version: {}'.format( |
151 | 1124 | spi.version, changelog_version)) | 1138 | spi.version, changelog_version)) |
152 | @@ -1144,7 +1158,7 @@ def import_unapplied_spi(repo, spi, namespace, skip_orig): | |||
153 | 1144 | upload_parent_commit = None | 1158 | upload_parent_commit = None |
154 | 1145 | unapplied_parent_commit = None | 1159 | unapplied_parent_commit = None |
155 | 1146 | 1160 | ||
157 | 1147 | if spi.version in _PARENT_OVERRIDES: | 1161 | if spi.version in parent_overrides: |
158 | 1148 | logging.debug( | 1162 | logging.debug( |
159 | 1149 | '%s is specified in the parent override file.', | 1163 | '%s is specified in the parent override file.', |
160 | 1150 | spi.version | 1164 | spi.version |
161 | @@ -1154,7 +1168,7 @@ def import_unapplied_spi(repo, spi, namespace, skip_orig): | |||
162 | 1154 | ( | 1168 | ( |
163 | 1155 | unapplied_changelog_parent_commit, | 1169 | unapplied_changelog_parent_commit, |
164 | 1156 | _ | 1170 | _ |
166 | 1157 | ) = override_parents(repo, spi, namespace) | 1171 | ) = override_parents(parent_overrides, repo, spi, namespace) |
167 | 1158 | except ParentOverrideError as e: | 1172 | except ParentOverrideError as e: |
168 | 1159 | logging.error("%s" % e) | 1173 | logging.error("%s" % e) |
169 | 1160 | return | 1174 | return |
170 | @@ -1180,7 +1194,7 @@ def import_unapplied_spi(repo, spi, namespace, skip_orig): | |||
171 | 1180 | # if the parent was imported via a parent override | 1194 | # if the parent was imported via a parent override |
172 | 1181 | # itself, assume it is valid without checking its | 1195 | # itself, assume it is valid without checking its |
173 | 1182 | # tree's debian/changelog, as it wasn't used | 1196 | # tree's debian/changelog, as it wasn't used |
175 | 1183 | if (version not in _PARENT_OVERRIDES and | 1197 | if (version not in parent_overrides and |
176 | 1184 | parent_changelog_version != version | 1198 | parent_changelog_version != version |
177 | 1185 | ): | 1199 | ): |
178 | 1186 | logging.error( | 1200 | logging.error( |
179 | @@ -1257,7 +1271,8 @@ def import_applied_spi( | |||
180 | 1257 | repo, | 1271 | repo, |
181 | 1258 | spi, | 1272 | spi, |
182 | 1259 | namespace, | 1273 | namespace, |
184 | 1260 | allow_applied_failures | 1274 | allow_applied_failures, |
185 | 1275 | parent_overrides, | ||
186 | 1261 | ): | 1276 | ): |
187 | 1262 | """Imports a source package from Launchpad into the git | 1277 | """Imports a source package from Launchpad into the git |
188 | 1263 | repository | 1278 | repository |
189 | @@ -1304,7 +1319,7 @@ def import_applied_spi( | |||
190 | 1304 | 1319 | ||
191 | 1305 | applied_changelog_parent_commit = None | 1320 | applied_changelog_parent_commit = None |
192 | 1306 | 1321 | ||
194 | 1307 | if spi.version in _PARENT_OVERRIDES: | 1322 | if spi.version in parent_overrides: |
195 | 1308 | logging.debug('%s is specified in the parent override file.' % | 1323 | logging.debug('%s is specified in the parent override file.' % |
196 | 1309 | spi.version | 1324 | spi.version |
197 | 1310 | ) | 1325 | ) |
198 | @@ -1313,6 +1328,7 @@ def import_applied_spi( | |||
199 | 1313 | _, | 1328 | _, |
200 | 1314 | applied_changelog_parent_commit, | 1329 | applied_changelog_parent_commit, |
201 | 1315 | ) = override_parents( | 1330 | ) = override_parents( |
202 | 1331 | parent_overrides, | ||
203 | 1316 | repo, | 1332 | repo, |
204 | 1317 | spi, | 1333 | spi, |
205 | 1318 | namespace, | 1334 | namespace, |
206 | @@ -1336,7 +1352,7 @@ def import_applied_spi( | |||
207 | 1336 | # if the parent was imported via a parent override | 1352 | # if the parent was imported via a parent override |
208 | 1337 | # itself, assume it is valid without checking its | 1353 | # itself, assume it is valid without checking its |
209 | 1338 | # tree's debian/changelog, as it wasn't used | 1354 | # tree's debian/changelog, as it wasn't used |
211 | 1339 | if (version not in _PARENT_OVERRIDES and | 1355 | if (version not in parent_overrides and |
212 | 1340 | parent_changelog_version != version | 1356 | parent_changelog_version != version |
213 | 1341 | ): | 1357 | ): |
214 | 1342 | logging.error('Found a tag corresponding to ' | 1358 | logging.error('Found a tag corresponding to ' |
215 | @@ -1435,6 +1451,7 @@ def import_publishes( | |||
216 | 1435 | workdir, | 1451 | workdir, |
217 | 1436 | skip_orig, | 1452 | skip_orig, |
218 | 1437 | allow_applied_failures, | 1453 | allow_applied_failures, |
219 | 1454 | parent_overrides, | ||
220 | 1438 | ): | 1455 | ): |
221 | 1439 | history_found = False | 1456 | history_found = False |
222 | 1440 | only_debian = False | 1457 | only_debian = False |
223 | @@ -1471,6 +1488,7 @@ def import_publishes( | |||
224 | 1471 | repo=repo, | 1488 | repo=repo, |
225 | 1472 | spi=srcpkg_information, | 1489 | spi=srcpkg_information, |
226 | 1473 | namespace=_namespace, | 1490 | namespace=_namespace, |
227 | 1491 | parent_overrides=parent_overrides, | ||
228 | 1474 | ) | 1492 | ) |
229 | 1475 | except NoPublicationHistoryException: | 1493 | except NoPublicationHistoryException: |
230 | 1476 | logging.warning("No publication history found for %s in %s.", | 1494 | logging.warning("No publication history found for %s in %s.", |
231 | diff --git a/gitubuntu/importlocal.py b/gitubuntu/importlocal.py | |||
232 | index 13f8690..b514edf 100644 | |||
233 | --- a/gitubuntu/importlocal.py | |||
234 | +++ b/gitubuntu/importlocal.py | |||
235 | @@ -15,7 +15,6 @@ from gitubuntu.run import run, runq | |||
236 | 15 | from gitubuntu.version import VERSION | 15 | from gitubuntu.version import VERSION |
237 | 16 | from gitubuntu.importer import ( | 16 | from gitubuntu.importer import ( |
238 | 17 | parse_parentfile, | 17 | parse_parentfile, |
239 | 18 | _PARENT_OVERRIDES, | ||
240 | 19 | import_orig, | 18 | import_orig, |
241 | 20 | import_dsc, | 19 | import_dsc, |
242 | 21 | get_changelog_for_commit, | 20 | get_changelog_for_commit, |
243 | @@ -84,7 +83,7 @@ def main( | |||
244 | 84 | 83 | ||
245 | 85 | repo.clean_repository_state() | 84 | repo.clean_repository_state() |
246 | 86 | 85 | ||
248 | 87 | parse_parentfile(parentfile, pkgname) | 86 | parent_overrides = parse_parentfile(parentfile, pkgname) |
249 | 88 | 87 | ||
250 | 89 | unapplied_import_tree_hash = import_patches_unapplied_tree(repo, dsc_path) | 88 | unapplied_import_tree_hash = import_patches_unapplied_tree(repo, dsc_path) |
251 | 90 | 89 | ||
252 | @@ -137,7 +136,7 @@ def main( | |||
253 | 137 | # if the parent was imported via a parent override | 136 | # if the parent was imported via a parent override |
254 | 138 | # itself, assume it is valid without checking its | 137 | # itself, assume it is valid without checking its |
255 | 139 | # tree's debian/changelog, as it wasn't used | 138 | # tree's debian/changelog, as it wasn't used |
257 | 140 | if (version not in _PARENT_OVERRIDES and | 139 | if (version not in parent_overrides and |
258 | 141 | parent_changelog_version != version | 140 | parent_changelog_version != version |
259 | 142 | ): | 141 | ): |
260 | 143 | logging.error('Found a tag corresponding to ' | 142 | logging.error('Found a tag corresponding to ' |
261 | diff --git a/gitubuntu/importppa.py b/gitubuntu/importppa.py | |||
262 | index 835b0aa..a2d27d3 100644 | |||
263 | --- a/gitubuntu/importppa.py | |||
264 | +++ b/gitubuntu/importppa.py | |||
265 | @@ -8,26 +8,15 @@ import sys | |||
266 | 8 | from gitubuntu.cache import CACHE_PATH | 8 | from gitubuntu.cache import CACHE_PATH |
267 | 9 | from gitubuntu.git_repository import ( | 9 | from gitubuntu.git_repository import ( |
268 | 10 | GitUbuntuRepository, | 10 | GitUbuntuRepository, |
269 | 11 | GitUbuntuRepositoryFetchError, | ||
270 | 12 | ) | 11 | ) |
271 | 13 | from gitubuntu.importer import ( | 12 | from gitubuntu.importer import ( |
272 | 14 | cleanup, | ||
273 | 15 | parse_parentfile, | 13 | parse_parentfile, |
274 | 16 | _PARENT_OVERRIDES, | ||
275 | 17 | import_orig, | ||
276 | 18 | import_dsc, | ||
277 | 19 | get_changelog_for_commit, | ||
278 | 20 | import_unapplied_spi, | 14 | import_unapplied_spi, |
279 | 21 | import_applied_spi, | 15 | import_applied_spi, |
280 | 22 | import_patches_unapplied_tree, | ||
281 | 23 | import_patches_applied_tree, | ||
282 | 24 | ) | 16 | ) |
283 | 25 | from gitubuntu.source_information import ( | 17 | from gitubuntu.source_information import ( |
284 | 26 | GitUbuntuSourceInformation, | 18 | GitUbuntuSourceInformation, |
285 | 27 | NoPublicationHistoryException, | 19 | NoPublicationHistoryException, |
286 | 28 | SourceExtractionException, | ||
287 | 29 | launchpad_login_auth, | ||
288 | 30 | GitUbuntuSourceInformation, | ||
289 | 31 | ) | 20 | ) |
290 | 32 | from gitubuntu.version import VERSION | 21 | from gitubuntu.version import VERSION |
291 | 33 | try: | 22 | try: |
292 | @@ -110,7 +99,7 @@ def main( | |||
293 | 110 | 99 | ||
294 | 111 | os.makedirs(workdir, exist_ok=True) | 100 | os.makedirs(workdir, exist_ok=True) |
295 | 112 | 101 | ||
297 | 113 | parse_parentfile(pkgname, parentfile) | 102 | parent_overrides = parse_parentfile(pkgname, parentfile) |
298 | 114 | 103 | ||
299 | 115 | history_found = False | 104 | history_found = False |
300 | 116 | try: | 105 | try: |
301 | @@ -126,6 +115,7 @@ def main( | |||
302 | 126 | spi=srcpkg_information, | 115 | spi=srcpkg_information, |
303 | 127 | namespace=namespace, | 116 | namespace=namespace, |
304 | 128 | skip_orig=skip_orig, | 117 | skip_orig=skip_orig, |
305 | 118 | parent_overrides=parent_overrides, | ||
306 | 129 | ) | 119 | ) |
307 | 130 | except DownloadError: | 120 | except DownloadError: |
308 | 131 | # it is non-fatal for a PPA to not have files for older | 121 | # it is non-fatal for a PPA to not have files for older |
309 | @@ -159,6 +149,7 @@ def main( | |||
310 | 159 | spi=srcpkg_information, | 149 | spi=srcpkg_information, |
311 | 160 | namespace=namespace, | 150 | namespace=namespace, |
312 | 161 | allow_applied_failures=allow_applied_failures, | 151 | allow_applied_failures=allow_applied_failures, |
313 | 152 | parent_overrides=parent_overrides, | ||
314 | 162 | ) | 153 | ) |
315 | 163 | except DownloadError: | 154 | except DownloadError: |
316 | 164 | # it is non-fatal for a PPA to not have files for older | 155 | # it is non-fatal for a PPA to not have files for older |
I compared the result of importing memcached (something that has a parent override defined) on the merge base (1e67e4c) and on this branch (baf6159). All the branches and tags resulted in identical commit hashes except for the pristine-tar branches. I smoke-checked that the pristine-tar branches visually looked completed in both cases by running git ls-tree on them.
importer/ import/ 1.1.12- 1 correctly had no parent in both 1e67e4c and baf6159.