scripts/combo-layer: checkout branch in update when pull is disabled
PATCH 1/1 scripts/combo-layer: checkout branch in update when pull is disabled
If the user selects not to pull the component repos, at least ensure that the correct branch is checked out before proceeding.
Signed-off-by Paul Eggleton <[email protected]>
--- scripts/combo-layer | 4 ++++ 1 file changed, 4 insertions(+)
scripts/combo-layer +4 -0
@@ -356,6 +356,10 @@ def action_update(conf, args): branch = repo.get('branch', "master") repo_patch_dir = os.path.join(os.getcwd(), patch_dir, name) + if conf.nopull: + # Need to do this here as we didn't call action_pull that would do it otherwise + runcmd("git checkout %s" % branch, ldir) + # Step 2: generate the patch list and store to patch dir logger.info("Generating patches from %s..." % name) if dest_dir != ".":
Signature · 1 line
1.7.9.5
Quoted 13 lines · On Tuesday 21 August 2012 11:40:55 Paul Eggleton wrote:
If the user selects not to pull the component repos, at least ensure that the correct branch is checked out before proceeding.
Signed-off-by Paul Eggleton <[email protected]>--- scripts/combo-layer | 4 ++++ 1 file changed, 4 insertions(+)scripts/combo-layer +0
-0
scripts/combo-layer def action_update(conf, args): · line 365
Quoted 10 lines
scripts/combo-layer +3
-0@@ -356,6 +356,10 @@ def action_update(conf, args): branch = repo.get('branch', "master") repo_patch_dir = os.path.join(os.getcwd(), patch_dir, name) + if conf.nopull: + # Need to do this here as we didn't call action_pull that would do it otherwise + runcmd("git checkout %s" % branch, ldir) + # Step 2: generate the patch list and store to patch dir logger.info("Generating patches from %s..." % name) if dest_dir != ".":
Actually as Richard points out we don't need to be doing the checkout here - we can just specify the branch in the one or two places where it isn't already specified. A different patch is on its way.
Cheers,
Paul
Signature · 2 lines
Paul Eggleton Intel Open Source Technology Centre