From: Saul Wold <sgw@linux.intel.com>
To: Paul Eggleton <paul.eggleton@linux.intel.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [PATCH] scripts/combo-layer: specify branch when getting current revision
Date: Fri, 24 Aug 2012 11:19:37 -0700 [thread overview]
Message-ID: <5037C5B9.1030202@linux.intel.com> (raw)
In-Reply-To: <1345555030-24506-1-git-send-email-paul.eggleton@linux.intel.com>
On 08/21/2012 06:17 AM, Paul Eggleton wrote:
> Handle the case during update where the configured branch is not
> currently checked out in the component repository by just specifying
> it in the places where it was not previously.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> ---
> scripts/combo-layer | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/scripts/combo-layer b/scripts/combo-layer
> index 448fe71..330faca 100755
> --- a/scripts/combo-layer
> +++ b/scripts/combo-layer
> @@ -191,7 +191,7 @@ def action_init(conf, args):
> branch = repo.get('branch', "master")
> file_filter = repo.get('file_filter', "")
> runcmd("git archive %s | tar -x -C %s %s" % (branch, extract_dir, file_filter), ldir)
> - lastrev = runcmd("git rev-parse HEAD", ldir).strip()
> + lastrev = runcmd("git rev-parse %s" % branch, ldir).strip()
> conf.update(name, "last_revision", lastrev, initmode=True)
> runcmd("git add .")
> if conf.localconffile:
> @@ -475,7 +475,8 @@ def apply_patchlist(conf, repos):
> else:
> logger.info("No patches to apply from %s" % name)
> ldir = conf.repos[name]['local_repo_dir']
> - lastrev = runcmd("git rev-parse HEAD", ldir).strip()
> + branch = conf.repos[name].get('branch', "master")
> + lastrev = runcmd("git rev-parse %s" % branch, ldir).strip()
>
> if lastrev != repo['last_revision']:
> conf.update(name, "last_revision", lastrev)
>
Merged into OE-Core
Thanks
Sau!
prev parent reply other threads:[~2012-08-24 18:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-21 13:17 [PATCH] scripts/combo-layer: specify branch when getting current revision Paul Eggleton
2012-08-24 18:19 ` Saul Wold [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5037C5B9.1030202@linux.intel.com \
--to=sgw@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=paul.eggleton@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox