From: Jani Nikula <jani.nikula@intel.com>
To: Rodrigo Vivi <rodrigo.vivi@gmail.com>,
Rodrigo Vivi <rodrigo.vivi@intel.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: Re: [maintainer-tools PATCH 2/2] dim: Accept patchwork URLs as apply-branch optional argument.
Date: Thu, 17 Aug 2017 10:45:43 +0300 [thread overview]
Message-ID: <87inhmab88.fsf@nikula.org> (raw)
In-Reply-To: <CABVU7+uNsYK5d3-KuWXswojqRk9qtPvZKA3TYcOAzjKDz=XpsQ@mail.gmail.com>
On Wed, 16 Aug 2017, Rodrigo Vivi <rodrigo.vivi@gmail.com> wrote:
> On Wed, Aug 16, 2017 at 11:13 AM, Rodrigo Vivi <rodrigo.vivi@intel.com> wrote:
>> Instead of having to manually download mbox from patchwork
>> let's make dim to do it directly.
>>
>> Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
>> Cc: Jani Nikula <jani.nikula@intel.com>
>> Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
>> ---
>> dim | 18 ++++++++++++++++++
>> 1 file changed, 18 insertions(+)
>>
>> diff --git a/dim b/dim
>> index e98d23b24ec0..73b48da7f436 100755
>> --- a/dim
>> +++ b/dim
>> @@ -756,6 +756,16 @@ function dim_push
>> dim_push_branch $(git_current_branch) "$@"
>> }
>>
>> +function download_mbox
>> +{
>> + wget -q --spider ${1}
>> + if [ $? -ne "0" ]; then
>> + echoerr "URL ${1} not found."
>> + exit 1
>> + fi
>> + wget -q ${1} -O $2
>> +}
>> +
>> # ensure we're on branch $1, and apply patches. the rest of the arguments are
>> # passed to git am.
>> dim_alias_ab=apply-branch
>> @@ -772,6 +782,14 @@ function dim_apply_branch
>> assert_repo_clean
>>
>> case $1 in
>> + *"patchwork.freedesktop.org"*"mbox")
>> + download_mbox $1 $file
>> + shift
>> + ;;
>> + *"patchwork.freedesktop.org"*)
>
> Another thing that I'd like to do is to be able to give the patchwork
> id directly, but I don't want to mess with the $@ going to git
> directly so I'm not sure which way would be better...
Personally I prefer using message-id based patchwork references:
http://patchwork.freedesktop.org/patch/msgid/20170811113907.6716-1-jani.nikula@intel.com
> maybe parse for something like
> "pw="*)
> download_mbox ${1#pw=} $file
> so we could use
> dim aq pw=170802
>
> ?
> suggestions?
The ways around this are argument parsing in apply-branch or adding
another dim subcommand.
Btw one missing piece is handling series mboxes, which do apply, but
only the last commit from an mbox gets all the checks and Link: tags
etc.
BR,
Jani.
>
>
>> + download_mbox $1/mbox $file
>> + shift
>> + ;;
>> *".patch" | *".mbox")
>> cat $1 > $file
>> shift
>> --
>> 2.13.2
>>
>> _______________________________________________
>> Intel-gfx mailing list
>> Intel-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
--
Jani Nikula, Intel Open Source Technology Center
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2017-08-17 7:40 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-16 18:13 [maintainer-tools PATCH 1/2] dim: Accept .mbox and .patch files as apply-branch optional argument Rodrigo Vivi
2017-08-16 18:13 ` [maintainer-tools PATCH 2/2] dim: Accept patchwork URLs " Rodrigo Vivi
2017-08-16 18:17 ` Rodrigo Vivi
2017-08-17 7:45 ` Jani Nikula [this message]
2017-08-17 16:18 ` Rodrigo Vivi
2017-08-17 16:49 ` Rodrigo Vivi
2017-08-17 7:37 ` Jani Nikula
2017-08-17 16:08 ` Rodrigo Vivi
2017-08-17 7:30 ` [maintainer-tools PATCH 1/2] dim: Accept .mbox and .patch files " Jani Nikula
2017-08-17 7:57 ` Daniel Vetter
2017-08-17 8:12 ` Jani Nikula
2017-08-17 8:40 ` Daniel Vetter
2017-08-17 16:24 ` Rodrigo Vivi
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=87inhmab88.fsf@nikula.org \
--to=jani.nikula@intel.com \
--cc=daniel.vetter@ffwll.ch \
--cc=intel-gfx@lists.freedesktop.org \
--cc=rodrigo.vivi@gmail.com \
--cc=rodrigo.vivi@intel.com \
/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.