From: Ian Campbell <ian.campbell@citrix.com>
To: Ian Jackson <Ian.Jackson@eu.citrix.com>
Cc: xen-devel@lists.xen.org
Subject: Re: [PATCH OSSTEST] cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch
Date: Fri, 11 Sep 2015 15:52:57 +0100 [thread overview]
Message-ID: <1441983177.3549.72.camel@citrix.com> (raw)
In-Reply-To: <22002.59247.557461.279474@mariner.uk.xensource.com>
On Fri, 2015-09-11 at 15:38 +0100, Ian Jackson wrote:
> Ian Campbell writes ("[PATCH OSSTEST] cri-common: Refactor
> select_prevxenbranch to cri-getprevxenbranch"):
> > This moves it outside any prevailing set -x and reduces the amount of
> > noise in various logs.
> ...
> > +#!/bin/bash
> > +
> > +xenbranch=$1
>
> Missing set -e.
So it is, oops.
8>---------------
>From 884b2571763164d7964de1d4dd6fd71ee1a4b6e9 Mon Sep 17 00:00:00 2001
From: Ian Campbell <ian.campbell@citrix.com>
Date: Fri, 11 Sep 2015 10:52:49 +0100
Subject: [PATCH OSSTEST v2] cri-common: Refactor select_prevxenbranch to
cri-getprevxenbranch
To: osstest
This moves it outside any prevailing set -x and reduces the amount of
noise in various logs.
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
---
v2: set -e
---
cri-common | 16 +---------------
cri-getprevxenbranch | 21 +++++++++++++++++++++
2 files changed, 22 insertions(+), 15 deletions(-)
create mode 100755 cri-getprevxenbranch
diff --git a/cri-common b/cri-common
index 94696ab..2669485 100644
--- a/cri-common
+++ b/cri-common
@@ -61,21 +61,7 @@ repo_tree_rev_fetch_git () {
}
select_prevxenbranch () {
- local b
- local p
- for b in $(./mg-list-all-branches) ; do # already sorted by version
- case "$b" in
- xen*)
- if [ "x$b" = "x$xenbranch" ] ; then
- break
- else
- p=$b
- fi
- ;;
- *) ;;
- esac
- done
- prevxenbranch=$p
+ prevxenbranch=`./cri-getprevxenbranch $xenbranch`
}
select_xenbranch () {
diff --git a/cri-getprevxenbranch b/cri-getprevxenbranch
new file mode 100755
index 0000000..37ea0ee
--- /dev/null
+++ b/cri-getprevxenbranch
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+xenbranch=$1
+p=
+
+set -e
+
+for b in $(./mg-list-all-branches) ; do # already sorted by version
+ case "$b" in
+ xen*)
+ if [ "x$b" = "x$xenbranch" ] ; then
+ break
+ else
+ p=$b
+ fi
+ ;;
+ *) ;;
+ esac
+done
+
+echo $p
--
2.5.1
prev parent reply other threads:[~2015-09-11 14:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-11 10:06 [PATCH OSSTEST] cri-common: Refactor select_prevxenbranch to cri-getprevxenbranch Ian Campbell
2015-09-11 14:38 ` Ian Jackson
2015-09-11 14:52 ` Ian Campbell [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=1441983177.3549.72.camel@citrix.com \
--to=ian.campbell@citrix.com \
--cc=Ian.Jackson@eu.citrix.com \
--cc=xen-devel@lists.xen.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).