{"thread":{"id":"9308","subject":"[PATCH] add series editor support.","startedAt":"2007-07-30T10:05:12Z","lastAt":"2007-07-30T18:27:56Z","messageCount":3,"participants":["Dmitry Monakhov","Benoit SIGOURE","Josef Sipek"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"49089","messageId":"20070730100512.GA14637@dnb.sw.ru","threadId":"9308","inReplyTo":null,"subject":"[PATCH] add series editor support.","fromName":"Dmitry Monakhov","fromEmail":"dmonakhov@openvz.org","sentAt":"2007-07-30T10:05:12Z","receivedAt":"2007-07-30T10:05:12Z","isPatch":true,"sender":{"key":"dmonakhov@openvz.org","avatar":null},"body":"Usually we have to edit series file directly (via editor).\nI think it is not bad idea to let guilt export this service.\nIMHO \"guilt-series -e\" it the best way to do it.\n\nSigned-off-by: Dmitry Monakhov <dmonakhov@openvz.org>\n---\n guilt-series |    9 +++++++--\n 1 files changed, 7 insertions(+), 2 deletions(-)\n\ndiff --git a/guilt-series b/guilt-series\nindex 62c3bb1..7594b2e 100755\n--- a/guilt-series\n+++ b/guilt-series\n@@ -3,7 +3,7 @@\n # Copyright (c) Josef \"Jeff\" Sipek, 2006, 2007\n #\n \n-USAGE=\"[-v | -g]\"\n+USAGE=\"[-v | -g | -e]\"\n . `dirname $0`/guilt\n \n while case \"$#\" in 0) break ;; esac\n@@ -13,13 +13,18 @@ do\n \t\tverbose=t ;;\n \t-g)\n \t\tgui=t ;;\n+\t-e)\n+\t\tedit=t ;;\n \t*)\n \t\tusage ;;\n \tesac\n \tshift\n done\n \n-if [ ! -z \"$gui\" ]; then\n+# edit -e ?\n+if [ \"$edit\" = \"t\" ]; then \n+\t$editor \"$GUILT_DIR/$branch/series\"\n+elif [ ! -z \"$gui\" ]; then\n \t[ -z \"`get_top`\" ] && die \"No patches applied.\"\n \tbottom=`head -1 $applied | cut -d: -f1`\n \ttop=`tail -1 $applied | cut -d: -f1`\n-- \n1.5.2.2\n"},{"id":"49094","messageId":"5C7E2F1B-A11F-4958-9662-88B0EFA07F79@lrde.epita.fr","threadId":"9308","inReplyTo":"20070730100512.GA14637@dnb.sw.ru","subject":"Re: [PATCH] add series editor support.","fromName":"Benoit SIGOURE","fromEmail":"tsuna@lrde.epita.fr","sentAt":"2007-07-30T10:26:24Z","receivedAt":"2007-07-30T10:26:24Z","isPatch":true,"sender":{"key":"tsunanet@gmail.com","avatar":"https://avatars.githubusercontent.com/u/128281?v=4"},"body":"On Jul 30, 2007, at 12:05 PM, Dmitry Monakhov wrote:\n\n> Usually we have to edit series file directly (via editor).\n> I think it is not bad idea to let guilt export this service.\n> IMHO \"guilt-series -e\" it the best way to do it.\n>\n> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>\n> ---\n>  guilt-series |    9 +++++++--\n>  1 files changed, 7 insertions(+), 2 deletions(-)\n>\n> diff --git a/guilt-series b/guilt-series\n> index 62c3bb1..7594b2e 100755\n> --- a/guilt-series\n> +++ b/guilt-series\n> @@ -3,7 +3,7 @@\n>  # Copyright (c) Josef \"Jeff\" Sipek, 2006, 2007\n>  #\n>\n> -USAGE=\"[-v | -g]\"\n> +USAGE=\"[-v | -g | -e]\"\n>  . `dirname $0`/guilt\n>\n>  while case \"$#\" in 0) break ;; esac\n> @@ -13,13 +13,18 @@ do\n>  \t\tverbose=t ;;\n>  \t-g)\n>  \t\tgui=t ;;\n> +\t-e)\n> +\t\tedit=t ;;\n>  \t*)\n>  \t\tusage ;;\n>  \tesac\n>  \tshift\n>  done\n>\n> -if [ ! -z \"$gui\" ]; then\n> +# edit -e ?\n> +if [ \"$edit\" = \"t\" ]; then\n> +\t$editor \"$GUILT_DIR/$branch/series\"\n> +elif [ ! -z \"$gui\" ]; then\n>  \t[ -z \"`get_top`\" ] && die \"No patches applied.\"\n>  \tbottom=`head -1 $applied | cut -d: -f1`\n>  \ttop=`tail -1 $applied | cut -d: -f1`\n\nHi,\nWhy do you use string comparisons instead of initializing all the  \nvariables to false and setting them to `:' or `true' so that you can  \nthen write if $edit; then ... ?  It's suboptimal.\n\nCheers,\n\n-- \nBenoit Sigoure aka Tsuna\nEPITA Research and Development Laboratory\n\n\n"},{"id":"49120","messageId":"20070730182756.GA14278@filer.fsl.cs.sunysb.edu","threadId":"9308","inReplyTo":"20070730100512.GA14637@dnb.sw.ru","subject":"Re: [PATCH] add series editor support.","fromName":"Josef Sipek","fromEmail":"jsipek@fsl.cs.sunysb.edu","sentAt":"2007-07-30T18:27:56Z","receivedAt":"2007-07-30T18:27:56Z","isPatch":true,"sender":{"key":"jsipek@fsl.cs.sunysb.edu","avatar":null},"body":"On Mon, Jul 30, 2007 at 02:05:12PM +0400, Dmitry Monakhov wrote:\n> Usually we have to edit series file directly (via editor).\n> I think it is not bad idea to let guilt export this service.\n> IMHO \"guilt-series -e\" it the best way to do it.\n> \n> Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>\n\nApplied with a small cleanup to make things a little bit more consistent (\n[ ! -z \"$edit\" ]   vs.  [ \"$edit\" = \"t\" ] ).\n\nThanks,\n\nJosef 'Jeff' Sipek.\n\n-- \nFailure is not an option,\nIt comes bundled with your Microsoft product.\n"}]}