From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: david@fromorbit.com
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 17/16] libxfs-apply: port to stgit
Date: Tue, 22 Nov 2016 10:26:44 -0800 [thread overview]
Message-ID: <20161122182644.GP16813@birch.djwong.org> (raw)
In-Reply-To: <147830447710.26713.9536263528122988931.stgit@birch.djwong.org>
Teach libxfs-apply how to talk to a stgit repository
and fix a minor typo in the guilt hunk of apply_patch.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
tools/libxfs-apply | 29 ++++++++++++++++++++++++++++-
1 file changed, 28 insertions(+), 1 deletion(-)
diff --git a/tools/libxfs-apply b/tools/libxfs-apply
index 8df1a49..5cf0879 100755
--- a/tools/libxfs-apply
+++ b/tools/libxfs-apply
@@ -66,6 +66,7 @@ PATCH=
COMMIT_ID=
VERBOSE=
GUILT=0
+STGIT=0
while [ $# -gt 0 ]; do
case "$1" in
@@ -95,6 +96,12 @@ if [ $? -eq 0 ]; then
GUILT=1
fi
+# Are we using stgit? This works even if no patch is applied.
+stg top &> /dev/null
+if [ $? -eq 0 ]; then
+ STGIT=1
+fi
+
#this is pulled from the guilt code to handle commit ids sanely.
# usage: munge_hash_range <hash range>
#
@@ -332,7 +339,27 @@ apply_patch()
guilt refresh
else
echo "Guilt push failed!"
- read -r -p "Skip of Fail [s|F]? " response
+ 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!"
+ fi
+ fi
+ elif [ $STGIT -eq 1 ]; then
+ [ -n "$VERBOSE" ] || echo "$REPO looks like a stgit directory."
+ PATCHES=`stg series | wc -l`
+ if [ -n "$VERBOSE" -a $PATCHES -gt 0 ]; then
+ echo -n "Top patch is: "
+ stg top
+ fi
+
+ stg import -n $_patch_name $_new_patch.2
+ if [ $? -ne 0 ]; then
+ echo "stgit push 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"
prev parent reply other threads:[~2016-11-22 18:26 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-05 0:07 [PATCH v2 00/16] xfsprogs: miscellaneous libxfs cleanups Darrick J. Wong
2016-11-05 0:08 ` [PATCH 01/16] xfs_repair: fix some potential null pointer deferences Darrick J. Wong
2016-11-15 10:14 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 02/16] xfs_repair: fix bogus rmapbt record owner check Darrick J. Wong
2016-11-15 10:15 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 03/16] xfs_io: fix libxfs naming violation Darrick J. Wong
2016-11-15 10:15 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 04/16] libxfs: remove unnecessary hascrc test in btree verifiers Darrick J. Wong
2016-11-15 10:16 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 05/16] xfs: set XFS_DA_OP_OKNOENT in xfs_attr_get Eric Sandeen
2016-11-15 10:16 ` Christoph Hellwig
2016-11-15 13:41 ` Eric Sandeen
2016-11-16 5:21 ` Dave Chinner
2016-11-22 18:21 ` Darrick J. Wong
2016-11-22 18:21 ` [PATCH v2 " Darrick J. Wong
2016-11-05 0:08 ` [PATCH 06/16] libxfs: refactor btree crc verifier Darrick J. Wong
2016-11-15 10:17 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 07/16] libxfs: fix whitespace to match the kernel Darrick J. Wong
2016-11-15 10:17 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 08/16] libxfs: return bool from sb_version_hasmetauuid Darrick J. Wong
2016-11-15 10:17 ` Christoph Hellwig
2016-11-05 0:08 ` [PATCH 09/16] xfs: fix btree cursor error cleanups Brian Foster
2016-11-15 10:18 ` Christoph Hellwig
2016-11-22 18:23 ` [PATCH v2 " Darrick J. Wong
2016-11-05 0:09 ` [PATCH 10/16] libxfs: clean up _dir2_data_freescan Darrick J. Wong
2016-11-15 10:19 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 11/16] tools: create libxfs-diff to compare libxfses Darrick J. Wong
2016-11-15 10:19 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 12/16] libxfs: fix line lengths Darrick J. Wong
2016-11-15 10:20 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 13/16] libxfs: synchronize dinode_verify with userspace Darrick J. Wong
2016-11-15 10:20 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 14/16] libxfs: remove useless stuff from the kernel Darrick J. Wong
2016-11-15 10:20 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 15/16] xfs: check return value of _trans_reserve_quota_nblks Darrick J. Wong
2016-11-15 10:21 ` Christoph Hellwig
2016-11-05 0:09 ` [PATCH 16/16] xfs: check minimum block size for CRC filesystems Darrick J. Wong
2016-11-15 10:22 ` Christoph Hellwig
2016-11-22 18:26 ` Darrick J. Wong [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=20161122182644.GP16813@birch.djwong.org \
--to=darrick.wong@oracle.com \
--cc=david@fromorbit.com \
--cc=linux-xfs@vger.kernel.org \
/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;
as well as URLs for NNTP newsgroup(s).