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
1=== modified file 'cmds.py'
2--- cmds.py 2011-01-29 02:51:40 +0000
3+++ cmds.py 2011-01-31 00:14:56 +0000
4@@ -297,11 +297,11 @@
5 source = True
6 return branch, build_options, source
7
8- def _get_upstream_branch(self, merge, export_upstream,
9+ def _get_upstream_branch(self, build_type, export_upstream,
10 export_upstream_revision, config, version):
11 upstream_branch = None
12 upstream_revision = None
13- if merge:
14+ if build_type == BUILD_TYPE_MERGE:
15 if export_upstream is None:
16 export_upstream = config.export_upstream
17 if export_upstream:
18@@ -381,9 +381,9 @@
19 PristineTarSource(tree, branch),
20 AptSource(),
21 ]
22- if merge:
23+ if build_type == BUILD_TYPE_MERGE:
24 upstream_branch, upstream_revision = self._get_upstream_branch(
25- merge, export_upstream, export_upstream_revision, config,
26+ build_type, export_upstream, export_upstream_revision, config,
27 changelog.version)
28 if upstream_branch is not None:
29 upstream_sources.append(UpstreamBranchSource(
30@@ -397,15 +397,15 @@
31 GetOrigSourceSource(tree, larstiq),
32 UScanSource(tree, larstiq),
33 ])
34- if split:
35+ if build_type == BUILD_TYPE_SPLIT:
36 upstream_sources.append(SelfSplitSource(tree))
37
38 upstream_provider = UpstreamProvider(changelog.package,
39 changelog.version, orig_dir, upstream_sources)
40
41- if merge:
42+ if build_type == BUILD_TYPE_MERGE:
43 distiller_cls = MergeModeDistiller
44- elif native:
45+ elif build_type == BUILD_TYPE_NATIVE:
46 distiller_cls = NativeSourceDistiller
47 else:
48 distiller_cls = FullSourceDistiller
49
50=== modified file 'debian/changelog'
51--- debian/changelog 2011-01-29 03:29:44 +0000
52+++ debian/changelog 2011-01-31 00:14:56 +0000
53@@ -35,8 +35,10 @@
54 * 'bzr merge-upstream' now also works in merge mode, and will simply
55 add a new entry for new upstream versions.
56 * merge-upstream will now keep epochs around. LP: #622678
57+ * Use enums for build types, and a priority scheme to figure out the
58+ build type. LP: #655277
59
60- -- Jelmer Vernooij <jelmer@debian.org> Sat, 29 Jan 2011 04:29:41 +0100
61+ -- Jelmer Vernooij <jelmer@debian.org> Mon, 31 Jan 2011 01:11:24 +0100
62
63 bzr-builddeb (2.5) unstable; urgency=low
64

Subscribers

People subscribed via source and target branches