combo-layer: fix revlist taking into account file_filter

Submitted by João Henrique Freitas on May 29, 2014, 2:53 a.m.

Details

Message ID 1401332031-23133-2-git-send-email-joaohf@gmail.com
State Accepted
Commit c22e40900d8e33c2c884e714c11ddb771b86923f
Headers show

Commit Message

João Henrique Freitas May 29, 2014, 2:53 a.m.
If file_filter is set, git format-patch takes account but git rev-list
does not. So revlist is going to get with wrong revisions. And last_revision
will be updated with wrong revision. The next time that user run
combo-layer it complain about applying patches.

So ensure that 'git rev-list' are using file_filter as 'git format-patch'.

Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
---
 scripts/combo-layer | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch hide | download patch | download mbox

diff --git a/scripts/combo-layer b/scripts/combo-layer
index 9da1d3a..19d64e6 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -395,7 +395,7 @@  def action_update(conf, args):
         logger.debug("generated patch set:\n%s" % output)
         patchlist = output.splitlines()
 
-        rev_cmd = 'git rev-list --no-merges ' + rev_cmd_range
+        rev_cmd = "git rev-list --no-merges %s -- %s" % (rev_cmd_range, file_filter)
         revlist = runcmd(rev_cmd, ldir).splitlines()
 
         # Step 3: Call repo specific hook to adjust patch

Comments

Paul Eggleton May 29, 2014, 9:48 a.m.
On Wednesday 28 May 2014 23:53:51 João Henrique Ferreira de Freitas wrote:
> If file_filter is set, git format-patch takes account but git rev-list
> does not. So revlist is going to get with wrong revisions. And last_revision
> will be updated with wrong revision. The next time that user run
> combo-layer it complain about applying patches.
> 
> So ensure that 'git rev-list' are using file_filter as 'git format-patch'.
> 
> Signed-off-by: João Henrique Ferreira de Freitas <joaohf@gmail.com>
> ---
>  scripts/combo-layer | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/combo-layer b/scripts/combo-layer
> index 9da1d3a..19d64e6 100755
> --- a/scripts/combo-layer
> +++ b/scripts/combo-layer
> @@ -395,7 +395,7 @@ def action_update(conf, args):
>          logger.debug("generated patch set:\n%s" % output)
>          patchlist = output.splitlines()
> 
> -        rev_cmd = 'git rev-list --no-merges ' + rev_cmd_range
> +        rev_cmd = "git rev-list --no-merges %s -- %s" % (rev_cmd_range,
> file_filter) revlist = runcmd(rev_cmd, ldir).splitlines()
> 
>          # Step 3: Call repo specific hook to adjust patch

You're right, I'm not sure how we didn't pick up on this earlier. Thanks!

Acked-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Cheers,
Paul
---------------------------------------------------------------------
Intel Corporation (UK) Limited
Registered No. 1134945 (England)
Registered Office: Pipers Way, Swindon SN3 1RJ
VAT No: 860 2173 47

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.