On Wed, 2016-01-27 at 16:01 +0000, George Dunlap wrote:
> On 27/01/16 15:45, Ian Campbell wrote:
> > For most patch series setting up a GH account and pushing the changes to it
> > etc is pure overhead (or at least optional), there is no need to encourage
> > it for most series, nor even necessarily to encourage people to proactively
> > push to a repo, we can always ask if we find the series to hard to review
> > as patches.
> 
> It did take me a while to find a system that made it not a pain to apply
> patch series from xen-devel, and the solution I have now is very
> particular to the combination of e-mail tools that I happen to use; I'm
> not sure how transferrable they are.

I use the script below, which apart from needing a way to see the message
id of mails is independent of any mail tools. For git send-email generated
series I use it as:

    ~/get-msgid -g '2 5' '    <    
1447415999-22003-1-git-send-email-o...@aepfle.de    >    ' | git am

(where 2 and 5 come come from the message id of the first and last patch
mails and it will apply the whole range, note that git send-email often has
patch #1 with msgid=2 due to the cover letter)

> So while I've managed to get things to a point where I don't have much
> pain, it's probably something that could use some work as a project in
> general.  "Encouraging most people to include public git branches" is
> one option to help that; "Having a mail bot that gave you git-am'able
> mbox files" is another.

Sure, but none of that is a blocker for what Doug is actually asking for
feedback on here, which really doesn't need to go off into the weeds
regarding some other future workflow which it may or may not enable, in
order to make a decision.

Ian.

#!/bin/bash

help()
{
    echo "help!" 1>&2
}

GIT=
while getopts g: OPT ; do
        case $OPT in
            g)  GIT="$OPTARG" ;;
            h)  help ; exit 1 ;;
            \?) exit 1 ;;
        esac
done
shift $(expr $OPTIND - 1)

fetch_messages()
{
    for i in $@ ; do
        echo "Fetching Message ID $i" 1>&2
        if [ -n "$X" ] ; then
            ssh celaeno cat /srv/mldrop/xen-devel/"\"$i\""
        else
            #wget -O - -q http://bugs.xenproject.org/xen/mid/"$i"/raw
            i=${i/\+/%2B}
            curl --silent http://bugs.xenproject.org/xen/mid/"$i"/raw
        fi
    done
}

if [ -z "$GIT" ] ; then
    fetch_messages $@
else
    #<1349427871-31195-4-git-send-email-anthony.per...@citrix.com>
    for i in $@ ; do
        PATTERN=$(echo "$i" | sed -e 
's/^\(<[0-9]*-[0-9]*-\)[0-9]*\(-.*>\)/\1@@NR@@\2/g')
        echo "GIT pattern $PATTERN" 1>&2
        for n in $(seq $GIT) ; do
            MSG=$(echo "$PATTERN" | sed -e "s/@@NR@@/$n/")
            fetch_messages $MSG
        done
    done
fi

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to