# [PATCH] add series editor support.

3 messages from 2007-07-30 to 2007-07-30. Participants: Dmitry Monakhov, Benoit SIGOURE, Josef Sipek.
Thread: https://gitlist.dev/t/9308

## Dmitry Monakhov, 2007-07-30 10:05

Subject: [PATCH] add series editor support.
Message-ID: <20070730100512.GA14637@dnb.sw.ru>
URL: https://gitlist.dev/e/20070730100512.GA14637%40dnb.sw.ru

```
Usually we have to edit series file directly (via editor).
I think it is not bad idea to let guilt export this service.
IMHO "guilt-series -e" it the best way to do it.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
---
 guilt-series |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/guilt-series b/guilt-series
index 62c3bb1..7594b2e 100755
--- a/guilt-series
+++ b/guilt-series
@@ -3,7 +3,7 @@
 # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
 #
 
-USAGE="[-v | -g]"
+USAGE="[-v | -g | -e]"
 . `dirname $0`/guilt
 
 while case "$#" in 0) break ;; esac
@@ -13,13 +13,18 @@ do
 		verbose=t ;;
 	-g)
 		gui=t ;;
+	-e)
+		edit=t ;;
 	*)
 		usage ;;
 	esac
 	shift
 done
 
-if [ ! -z "$gui" ]; then
+# edit -e ?
+if [ "$edit" = "t" ]; then 
+	$editor "$GUILT_DIR/$branch/series"
+elif [ ! -z "$gui" ]; then
 	[ -z "`get_top`" ] && die "No patches applied."
 	bottom=`head -1 $applied | cut -d: -f1`
 	top=`tail -1 $applied | cut -d: -f1`
-- 
1.5.2.2

```

## Benoit SIGOURE, 2007-07-30 10:26

Subject: Re: [PATCH] add series editor support.
Message-ID: <5C7E2F1B-A11F-4958-9662-88B0EFA07F79@lrde.epita.fr>
URL: https://gitlist.dev/e/5C7E2F1B-A11F-4958-9662-88B0EFA07F79%40lrde.epita.fr
In-Reply-To: <20070730100512.GA14637@dnb.sw.ru>

```
On Jul 30, 2007, at 12:05 PM, Dmitry Monakhov wrote:

> Usually we have to edit series file directly (via editor).
> I think it is not bad idea to let guilt export this service.
> IMHO "guilt-series -e" it the best way to do it.
>
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
> ---
>  guilt-series |    9 +++++++--
>  1 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/guilt-series b/guilt-series
> index 62c3bb1..7594b2e 100755
> --- a/guilt-series
> +++ b/guilt-series
> @@ -3,7 +3,7 @@
>  # Copyright (c) Josef "Jeff" Sipek, 2006, 2007
>  #
>
> -USAGE="[-v | -g]"
> +USAGE="[-v | -g | -e]"
>  . `dirname $0`/guilt
>
>  while case "$#" in 0) break ;; esac
> @@ -13,13 +13,18 @@ do
>  		verbose=t ;;
>  	-g)
>  		gui=t ;;
> +	-e)
> +		edit=t ;;
>  	*)
>  		usage ;;
>  	esac
>  	shift
>  done
>
> -if [ ! -z "$gui" ]; then
> +# edit -e ?
> +if [ "$edit" = "t" ]; then
> +	$editor "$GUILT_DIR/$branch/series"
> +elif [ ! -z "$gui" ]; then
>  	[ -z "`get_top`" ] && die "No patches applied."
>  	bottom=`head -1 $applied | cut -d: -f1`
>  	top=`tail -1 $applied | cut -d: -f1`

Hi,
Why do you use string comparisons instead of initializing all the  
variables to false and setting them to `:' or `true' so that you can  
then write if $edit; then ... ?  It's suboptimal.

Cheers,

-- 
Benoit Sigoure aka Tsuna
EPITA Research and Development Laboratory



```

## Josef Sipek, 2007-07-30 18:27

Subject: Re: [PATCH] add series editor support.
Message-ID: <20070730182756.GA14278@filer.fsl.cs.sunysb.edu>
URL: https://gitlist.dev/e/20070730182756.GA14278%40filer.fsl.cs.sunysb.edu
In-Reply-To: <20070730100512.GA14637@dnb.sw.ru>

```
On Mon, Jul 30, 2007 at 02:05:12PM +0400, Dmitry Monakhov wrote:
> Usually we have to edit series file directly (via editor).
> I think it is not bad idea to let guilt export this service.
> IMHO "guilt-series -e" it the best way to do it.
> 
> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>

Applied with a small cleanup to make things a little bit more consistent (
[ ! -z "$edit" ]   vs.  [ "$edit" = "t" ] ).

Thanks,

Josef 'Jeff' Sipek.

-- 
Failure is not an option,
It comes bundled with your Microsoft product.

```
