All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bill O'Donnell <billodo@redhat.com>
To: Eric Sandeen <sandeen@sandeen.net>
Cc: linux-xfs <linux-xfs@vger.kernel.org>
Subject: Re: [PATCH 3/3] libxfs-apply: minor improvements
Date: Thu, 12 Jan 2017 13:08:22 -0600	[thread overview]
Message-ID: <20170112190822.GA27976@redhat.com> (raw)
In-Reply-To: <7f6aba51-3b6d-0ba2-57b8-344bc7fc32b7@sandeen.net>

On Thu, Jan 12, 2017 at 11:15:52AM -0600, Eric Sandeen wrote:
> Three quick improvements to libxfs-apply:
> 
> - Skip already-cross-merged commits, based on the
>   "Source XXX commit" line in the commitlog.
> 
> - Be clearer about which patch failed if it does
> 
> - Clean up guilt better after a failed application
> 
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>

Reviewed-by: Bill O'Donnell <billodo@redhat.com>

> ---
>  tools/libxfs-apply | 14 ++++++++++++--
>  1 file changed, 12 insertions(+), 2 deletions(-)
> 
> diff --git a/tools/libxfs-apply b/tools/libxfs-apply
> index 5cf0879..e7d7e0a 100755
> --- a/tools/libxfs-apply
> +++ b/tools/libxfs-apply
> @@ -288,6 +288,7 @@ apply_patch()
>  	local _current_commit=$3
>  	local _new_patch=`mktemp`
>  	local _source="kernel"
> +	local _target="xfsprogs"
>  
>  	# filter just the libxfs parts of the patch
>  	if [ $SOURCE == "xfsprogs" ]; then
> @@ -301,6 +302,7 @@ apply_patch()
>  
>  		filter_kernel_patch $_patch > $_new_patch
>  		_source="xfsprogs"
> +		_target="kernel"
>  	elif [ $SOURCE == "kernel" ]; then
>  
>  		[ -n "$VERBOSE" ] || lsdiff $_patch | grep -q "[ab]/fs/xfs/libxfs/"
> @@ -315,6 +317,13 @@ apply_patch()
>  		fail "Unknown source repo type: $SOURCE"
>  	fi
>  
> +	grep -q "Source $_target commit: " $_patch
> +	if [ "$?" -eq "0" ]; then
> +		echo "$_patch_name already synced up"
> +		echo "$_skipping commit $_current_commit"
> +		return
> +	fi
> +
>  	# now munge the header to be in the correct format.
>  	fixup_header_format $_source $_new_patch > $_new_patch.2
>  
> @@ -338,14 +347,15 @@ apply_patch()
>  		if [ $? -eq 0 ]; then
>  			guilt refresh
>  		else
> -			echo "Guilt push failed!"
> +			echo "Guilt push of $_current_commit $_patch_name failed!"
>  			read -r -p "Skip or Fail [s|F]? " response
>  			if [ -z "$response" -o "$response" != "s" ]; then
>  				echo "Force push patch, fix and refresh."
>  				echo "Restart from commit $_current_commit"
>  				fail "Manual cleanup required!"
>  			else
> -				echo "Skipping. Manual series file cleanup needed!"
> +				echo "Skipping."
> +				guilt delete -f $_patch_name
>  			fi
>  		fi
>  	elif [ $STGIT -eq 1 ]; then
> -- 
> 1.8.3.1
> 
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2017-01-12 19:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-12 17:08 [PATCH 0/3] xfsprogs: small fixes Eric Sandeen
2017-01-12 17:13 ` [PATCH 1/3] Update licenses in COPYING file Eric Sandeen
2017-01-12 17:46   ` Alex Elder
2017-01-12 18:43   ` [PATCH 1/3 V2] Clean up license text " Eric Sandeen
2017-01-12 19:05     ` Bill O'Donnell
2017-01-12 17:14 ` [PATCH 2/3] build: add .tar.xz target Eric Sandeen
2017-01-12 19:06   ` Bill O'Donnell
2017-01-12 17:15 ` [PATCH 3/3] libxfs-apply: minor improvements Eric Sandeen
2017-01-12 19:08   ` Bill O'Donnell [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=20170112190822.GA27976@redhat.com \
    --to=billodo@redhat.com \
    --cc=linux-xfs@vger.kernel.org \
    --cc=sandeen@sandeen.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.