diff options
author | Simon Glass <sjg@chromium.org> | 2014-12-01 17:33:54 -0700 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2015-01-14 21:16:52 -0800 |
commit | 2a9e2c6a0962cb04a12d833cc5c1c0920fa3b4f5 (patch) | |
tree | e924ed1920811a80eba92fe066cf6ae0a1ac8a03 /tools/buildman/control.py | |
parent | 1a915675104771e8afea399a62778c598289775f (diff) | |
download | u-boot-2a9e2c6a0962cb04a12d833cc5c1c0920fa3b4f5.tar.gz |
buildman: Try to guess the upstream commit
Buildman normally obtains the upstream commit by asking git. Provided that
the branch was created with 'git checkout -b <branch> <some_upstream>' then
this normally works.
When there is no upstream, we can try to guess one, by looking up through
the commits until we find a branch. Add a function to try this and print
a warning if buildman ends up relying on it.
Also update the documentation to match.
Signed-off-by: Simon Glass <sjg@chromium.org>
Suggested-by: Wolfgang Denk <wd@denx.de>
Diffstat (limited to 'tools/buildman/control.py')
-rw-r--r-- | tools/buildman/control.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/buildman/control.py b/tools/buildman/control.py index 48797e90a7..cec02c6d53 100644 --- a/tools/buildman/control.py +++ b/tools/buildman/control.py @@ -127,12 +127,12 @@ def DoBuildman(options, args, toolchains=None, make_func=None, boards=None, if not options.branch: count = 1 else: - count = gitutil.CountCommitsInBranch(options.git_dir, - options.branch) + count, msg = gitutil.CountCommitsInBranch(options.git_dir, + options.branch) if count is None: - str = ("Branch '%s' not found or has no upstream" % - options.branch) - sys.exit(col.Color(col.RED, str)) + sys.exit(col.Color(col.RED, msg)) + if msg: + print col.Color(col.YELLOW, msg) count += 1 # Build upstream commit also if not count: |