diff mbox

apply-stable-patches: fix --check-already range

Message ID 1398878559-19841-1-git-send-email-kamal@canonical.com
State New
Headers show

Commit Message

Kamal Mostafa April 30, 2014, 5:22 p.m. UTC
The --check-already feature wasn't really working properly due an improper
range specification.

Signed-off-by: Kamal Mostafa <kamal@canonical.com>
---
 stable/apply-stable-patches | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Luis Henriques April 30, 2014, 6:14 p.m. UTC | #1
Kamal Mostafa <kamal@canonical.com> writes:

> The --check-already feature wasn't really working properly due an improper
> range specification.
>
> Signed-off-by: Kamal Mostafa <kamal@canonical.com>
> ---
>  stable/apply-stable-patches | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/stable/apply-stable-patches b/stable/apply-stable-patches
> index ccceec8..075cc70 100755
> --- a/stable/apply-stable-patches
> +++ b/stable/apply-stable-patches
> @@ -503,7 +503,7 @@ class ApplyStablePatches(StdApp):
>                  else:
>                      remove(filename)
>  		if 'check_already' in self.cfg:
> -		    status, result = run_command('git log --oneline -n 1 --since="%s" -i --grep="^commit %s upstream\.$"' % (merge_base, change[0]) )
> +		    status, result = run_command('git log --oneline -n 1 %s..HEAD -i --grep="^commit %s upstream\.$"' % (merge_base, change[0]) )
>  		    if result[0].strip() != '':
>  			already_file = '%s/%s' % (already_dir, filename)
>  			if path.exists(already_file):

Cheers,
diff mbox

Patch

diff --git a/stable/apply-stable-patches b/stable/apply-stable-patches
index ccceec8..075cc70 100755
--- a/stable/apply-stable-patches
+++ b/stable/apply-stable-patches
@@ -503,7 +503,7 @@  class ApplyStablePatches(StdApp):
                 else:
                     remove(filename)
 		if 'check_already' in self.cfg:
-		    status, result = run_command('git log --oneline -n 1 --since="%s" -i --grep="^commit %s upstream\.$"' % (merge_base, change[0]) )
+		    status, result = run_command('git log --oneline -n 1 %s..HEAD -i --grep="^commit %s upstream\.$"' % (merge_base, change[0]) )
 		    if result[0].strip() != '':
 			already_file = '%s/%s' % (already_dir, filename)
 			if path.exists(already_file):