[U-Boot] [PATCH v6 13/20] buildman: Allow selection of the number of commits to build
Simon Glass
sjg at chromium.org
Sat Aug 9 23:33:09 CEST 2014
It is useful to be able to build only some of the commits in a branch. Add
support for the -c option to allow this. It was previously parsed by
buildman but not implemented.
Suggested-by: York Sun <yorksun at freescale.com>
Signed-off-by: Simon Glass <sjg at chromium.org>
---
Changes in v6: None
Changes in v5: None
Changes in v4:
- Add new patch to remove unused non-incremental build method code
Changes in v3: None
Changes in v2: None
tools/buildman/control.py | 31 +++++++++++++++++++------------
1 file changed, 19 insertions(+), 12 deletions(-)
diff --git a/tools/buildman/control.py b/tools/buildman/control.py
index 0c9e2cb..98a07a2 100644
--- a/tools/buildman/control.py
+++ b/tools/buildman/control.py
@@ -144,18 +144,25 @@ def DoBuildman(options, args):
# a merge commit (it will list all the commits that form part of the
# merge)
if options.branch:
- range_expr = gitutil.GetRangeInBranch(options.git_dir, options.branch)
- upstream_commit = gitutil.GetUpstream(options.git_dir, options.branch)
- series = patchstream.GetMetaDataForList(upstream_commit,
- options.git_dir, 1)
-
- # Conflicting tags are not a problem for buildman, since it does not
- # use them. For example, Series-version is not useful for buildman. On
- # the other hand conflicting tags will cause an error. So allow later
- # tags to overwrite earlier ones.
- series.allow_overwrite = True
- series = patchstream.GetMetaDataForList(range_expr, options.git_dir, None,
- series)
+ if count == -1:
+ range_expr = gitutil.GetRangeInBranch(options.git_dir,
+ options.branch)
+ upstream_commit = gitutil.GetUpstream(options.git_dir,
+ options.branch)
+ series = patchstream.GetMetaDataForList(upstream_commit,
+ options.git_dir, 1)
+
+ # Conflicting tags are not a problem for buildman, since it does
+ # not use them. For example, Series-version is not useful for
+ # buildman. On the other hand conflicting tags will cause an
+ # error. So allow later tags to overwrite earlier ones.
+ series.allow_overwrite = True
+ series = patchstream.GetMetaDataForList(range_expr,
+ options.git_dir, None, series)
+ else:
+ # Honour the count
+ series = patchstream.GetMetaDataForList(options.branch,
+ options.git_dir, count)
else:
series = None
options.verbose = True
--
2.0.0.526.g5318336
More information about the U-Boot
mailing list