Merge lp:~jelmer/bzr-builddeb/655277-build-type-enum into lp:bzr-builddeb

Proposed by Jelmer Vernooij
Status: Merged
Merged at revision: 505
Proposed branch: lp:~jelmer/bzr-builddeb/655277-build-type-enum
Merge into: lp:bzr-builddeb
Diff against target: 63 lines (+10/-8)
2 files modified
cmds.py (+7/-7)
debian/changelog (+3/-1)
To merge this branch: bzr merge lp:~jelmer/bzr-builddeb/655277-build-type-enum
Reviewer Review Type Date Requested Status
James Westby Approve
Review via email: mp+47950@code.launchpad.net

Description of the change

the build type enum was introduced a while ago, but not yet used everywhere.

This branch changes the last few places (all in cmds.py) to use the build type enum rather than the independent booleans, where possible.

This fixes bug 655277, but also one of the issues that statik ran into with the mergeWithUpstream property in svn checkouts not working.

To post a comment you must log in.
Revision history for this message
James Westby (james-w) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'cmds.py'
--- cmds.py 2011-01-29 02:51:40 +0000
+++ cmds.py 2011-01-31 00:14:56 +0000
@@ -297,11 +297,11 @@
297 source = True297 source = True
298 return branch, build_options, source298 return branch, build_options, source
299299
300 def _get_upstream_branch(self, merge, export_upstream,300 def _get_upstream_branch(self, build_type, export_upstream,
301 export_upstream_revision, config, version):301 export_upstream_revision, config, version):
302 upstream_branch = None302 upstream_branch = None
303 upstream_revision = None303 upstream_revision = None
304 if merge:304 if build_type == BUILD_TYPE_MERGE:
305 if export_upstream is None:305 if export_upstream is None:
306 export_upstream = config.export_upstream306 export_upstream = config.export_upstream
307 if export_upstream:307 if export_upstream:
@@ -381,9 +381,9 @@
381 PristineTarSource(tree, branch),381 PristineTarSource(tree, branch),
382 AptSource(),382 AptSource(),
383 ]383 ]
384 if merge:384 if build_type == BUILD_TYPE_MERGE:
385 upstream_branch, upstream_revision = self._get_upstream_branch(385 upstream_branch, upstream_revision = self._get_upstream_branch(
386 merge, export_upstream, export_upstream_revision, config,386 build_type, export_upstream, export_upstream_revision, config,
387 changelog.version)387 changelog.version)
388 if upstream_branch is not None:388 if upstream_branch is not None:
389 upstream_sources.append(UpstreamBranchSource(389 upstream_sources.append(UpstreamBranchSource(
@@ -397,15 +397,15 @@
397 GetOrigSourceSource(tree, larstiq),397 GetOrigSourceSource(tree, larstiq),
398 UScanSource(tree, larstiq),398 UScanSource(tree, larstiq),
399 ])399 ])
400 if split:400 if build_type == BUILD_TYPE_SPLIT:
401 upstream_sources.append(SelfSplitSource(tree))401 upstream_sources.append(SelfSplitSource(tree))
402 402
403 upstream_provider = UpstreamProvider(changelog.package,403 upstream_provider = UpstreamProvider(changelog.package,
404 changelog.version, orig_dir, upstream_sources)404 changelog.version, orig_dir, upstream_sources)
405405
406 if merge:406 if build_type == BUILD_TYPE_MERGE:
407 distiller_cls = MergeModeDistiller407 distiller_cls = MergeModeDistiller
408 elif native:408 elif build_type == BUILD_TYPE_NATIVE:
409 distiller_cls = NativeSourceDistiller409 distiller_cls = NativeSourceDistiller
410 else:410 else:
411 distiller_cls = FullSourceDistiller411 distiller_cls = FullSourceDistiller
412412
=== modified file 'debian/changelog'
--- debian/changelog 2011-01-29 03:29:44 +0000
+++ debian/changelog 2011-01-31 00:14:56 +0000
@@ -35,8 +35,10 @@
35 * 'bzr merge-upstream' now also works in merge mode, and will simply35 * 'bzr merge-upstream' now also works in merge mode, and will simply
36 add a new entry for new upstream versions.36 add a new entry for new upstream versions.
37 * merge-upstream will now keep epochs around. LP: #62267837 * merge-upstream will now keep epochs around. LP: #622678
38 * Use enums for build types, and a priority scheme to figure out the
39 build type. LP: #655277
3840
39 -- Jelmer Vernooij <jelmer@debian.org> Sat, 29 Jan 2011 04:29:41 +010041 -- Jelmer Vernooij <jelmer@debian.org> Mon, 31 Jan 2011 01:11:24 +0100
4042
41bzr-builddeb (2.5) unstable; urgency=low43bzr-builddeb (2.5) unstable; urgency=low
4244

Subscribers

People subscribed via source and target branches