Openembedded Core Discussions
 help / color / mirror / Atom feed
From: Robert Yang <liezhi.yang@windriver.com>
To: Bruce Ashfield <bruce.ashfield@gmail.com>
Cc: Patches and discussions about the oe-core layer
	<openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 1/3] create-pull-request: create branch on remote if not found
Date: Tue, 19 Apr 2016 11:13:15 +0800	[thread overview]
Message-ID: <5715A24B.9010406@windriver.com> (raw)
In-Reply-To: <CADkTA4Npd7C8ekZV2S787YYqskMDhu1Fr4B_nZT7Xi89eDYHiA@mail.gmail.com>



On 04/19/2016 11:00 AM, Bruce Ashfield wrote:
>
>
> On Mon, Apr 18, 2016 at 10:45 PM, Robert Yang <liezhi.yang@windriver.com
> <mailto:liezhi.yang@windriver.com>> wrote:
>
>     Before this patch, we need two steps to create PULL:
>     * Step 1, create branch:
>        $ git push <contrib> <local_branch>:<remote_branch>
>     * Step 2, create PULL:
>        $ create-pull-request -u <contrib> -l <local_branch> -b <remote_branch>
>     -r <local_branch>~<n>
>
>     We can see that the args used in step 1 are in step 2, so we can use
>     create-pull-request to create the branch if not found to simplify the
>     steps.
>
>
> I think this needs to be optional. When I'm running this script, I'm just
> looking to have something
> I've already pushed locally dumped. If I mess up, and don't have the branch that
> I've used
> pushed to my remote already (or for  whatever reason want/need different
> branches .. which
> was broken in previous updates to the script .. grrr),  I don't want something
> pushing a branch
> without be explicitly giving permission for that to happen.

Thanks, how about add an option:

"-a	automatically push/update local branch (-l) to remote branch (-b)"

Then it will always create/update the remote branch when -a is used.

// Robert

>
> Bruce
>
>
>     [YOCTO #9408]
>
>     Signed-off-by: Robert Yang <liezhi.yang@windriver.com
>     <mailto:liezhi.yang@windriver.com>>
>     ---
>       scripts/create-pull-request | 4 ++--
>       1 file changed, 2 insertions(+), 2 deletions(-)
>
>     diff --git a/scripts/create-pull-request b/scripts/create-pull-request
>     index 479ad6e..7dc9836 100755
>     --- a/scripts/create-pull-request
>     +++ b/scripts/create-pull-request
>     @@ -173,8 +173,8 @@ esac
>       if [ -n "$WEB_URL" ]; then
>              wget --no-check-certificate -q $WEB_URL -O /dev/null
>              if [ $? -ne 0 ]; then
>     -               echo "WARNING: Branch '$BRANCH' was not found on the contrib
>     git tree."
>     -               echo "         Please check your remote and branch parameter
>     before sending."
>     +               echo "Branch '$BRANCH' not found on '$REMOTE', creating it..."
>     +               git push $REMOTE $L_BRANCH:$BRANCH
>                      echo ""
>              fi
>       fi
>     --
>     2.7.4
>
>     --
>     _______________________________________________
>     Openembedded-core mailing list
>     Openembedded-core@lists.openembedded.org
>     <mailto:Openembedded-core@lists.openembedded.org>
>     http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
>
>
> --
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at its
> end"


  reply	other threads:[~2016-04-19  3:13 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-19  2:45 [PATCH 0/3] create-pull-request: 3 improvements (master branch only) Robert Yang
2016-04-19  2:45 ` [PATCH 1/3] create-pull-request: create branch on remote if not found Robert Yang
2016-04-19  3:00   ` Bruce Ashfield
2016-04-19  3:13     ` Robert Yang [this message]
2016-04-19 12:18       ` Bruce Ashfield
2016-04-20  0:48         ` Robert Yang
2016-04-19  2:45 ` [PATCH 2/3] create-pull-request: read remote from env var CONTRIB_REMOTE Robert Yang
2016-04-19  2:45 ` [PATCH 3/3] create-pull-request: set subject automatically for cover latter Robert Yang
2016-04-22  8:27 ` [PATCH 0/3] create-pull-request: 3 improvements (master branch only) Robert Yang
2016-05-11  7:33 ` Robert Yang
2016-08-02  8:53 ` Robert Yang

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=5715A24B.9010406@windriver.com \
    --to=liezhi.yang@windriver.com \
    --cc=bruce.ashfield@gmail.com \
    --cc=openembedded-core@lists.openembedded.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