| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set cover letter's subject automatically as the patch's subject when
there is only one patch.
[YOCTO #9410]
(From OE-Core rev: 162b80f8a4670befaf6ffd2c178671cf7370b767)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
So that we don't have specify "-u <contrib>" everytime, and
CPR_CONTRIB_REMOTE can be overrided by -u.
[YOCTO #9409]
(From OE-Core rev: 81c58fd33e725ce7dba693763646f4c30747bbd5)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 -a" or set CPR_CONTRIB_AUTO_PUSH in to create the
branch to simplify the steps.
[YOCTO #9408]
(From OE-Core rev: a569bec9219394703d1c1d9b28dd19bf5b058e7f)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fixed when git > 2.1.0:
$ ./scripts/create-pull-request -r HEAD^ -u contrib -b rbt/git
fatal: Not a valid revision: rbt/git
ERROR: git request-pull reported an error
This is because newer git requires both local and remote branch named as
rbt/git, but usually, we only named the remote branch as rbt/foo, and
foo for local branch.
Add a option '-l' to fix the problem, default is HEAD.
(From OE-Core rev: 98faa3ec872e06774b5870fcfb52f3ff91494779)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* at least with git 2.6.3 I see git request-pull failing
when there is only :{BRANCH} as ending commit
* $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib jansa/dizzy-backports:jansa/dizzy-backports
The following changes since commit 7bb182bdd130266100fc541fd09b82d09c51cd80:
build-appliance-image: Update to dizzy head revision (2015-09-29 14:56:04 +0100)
...
And finds correct 7 changes there
* $ git request-pull origin/dizzy git://git.openembedded.org/openembedded-core-contrib :jansa/dizzy-backports
warn: No match for commit 6068d1c90336ddc1fb32856efd1d9ccf07733896 found at git://git.openembedded.org/openembedded-core-contrib
warn: Are you sure you pushed 'jansa/dizzy-backports' there?
The following changes since commit 97756472d3a69eaca95d105494ffea78c6b077e0:
build-appliance-image: Update to dizzy head revision (2014-10-18 16:16:27 +0200)
...
and lists all commits in _current_ branch since origin/dizzy, then it refuses
to continue, because there are too many changes.
* 6068d1c90336ddc1fb32856efd1d9ccf07733896 is this commit in jansa/master-submitted
branch so it really shouldn't be included in pull request from jansa/dizzy branch.
* git help says:
<end>
Commit to end at (defaults to HEAD). This names the commit at the tip of the history you are asking to be pulled.
When the repository named by <url> has the commit at a tip of a ref that is different from the ref you have locally, you can use
the <local>:<remote> syntax, to have its local name, a colon :, and its remote name.
* maybe the syntax got changes since git 2.1.0 when Saul added :${BRANCH}
* I haven't found how to respect ${COMMIT_ID in the new syntax
(From OE-Core rev: 2336d1e5de671f538f0cd493b75d29e1dfdb0caf)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In some situations you might end-up with an empty ODIR (pull-xx/). The
most common reason is that you have applied your patches on 'master'
branch (or you are by mistake standing on the 'master' branch),
this will result in the default behavior that 'git format-patch'
will try to diff master..master.
Solve this by aborting the script with a proper error code and message
if ODIR is empty after the 'git format-patch' call (that is expected
to generate the cover-letter and patches).
(From OE-Core rev: 5ef9249bbae4f08eb9b981d10f31bd3348449c82)
Signed-off-by: Petter Mabäcker <petter@technux.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Made create-pull-request POSIX compatible:
- Replaced /bin/bash -> /bin/sh in shebang.
- Replaced usage of pushd/popd with generic shell commands.
- Tested on zsh and dash.
(From OE-Core rev: b5c77a94b97b316b7ea075841d18b73e6dccbf2d)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
create-pull-request -d path creates empty patches if directory
is specified as a path, i.e. ./bitbake or ./bitbake/ or full path.
It behaves expected way only if script is run with -d bitbake, i.e.
relative dir name doesn't contain '\'.
Fixed this unwanted behaviour by changing directory and running
git format-patch in it with --relative, without specifying
relative path as a parameter.
(From OE-Core rev: 3042956a86167f89beccc5d05f1fad1844e7c36a)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This options allows to generate patches against relative directory by
using git format-patch --relative option.
See more details about --relative option in git diff manual page.
For example generating bitbake patchsets from poky can be
done this way: create-pull-request -u contrib -d ./bitbake
(From OE-Core rev: 9b544125e1e3d2cc2db8f5d20d6fd0746f8cef5d)
Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
This breaks create-pull-request for git <2, which is many people.
This reverts commit 7ee64ea60ede5477b2f9a355d93bdc556e6b7895.
(From OE-Core rev: 26766ea8ee0ef121e54ff9084c4637aa8df984f4)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
On 2.0 versions of git, the create-pull-request script exits with the
warning "No match for commit... Are you sure you pushed 'HEAD' there?".
This is due to a change in behavior where git used to guess the branch
you meant, but no longer does. See the thread at
http://www.spinics.net/lists/git/msg233050.html for more information.
To accommodate the new behavior, if the COMMIT_ID is set to the default
of "HEAD", make it point explicitly to $BRANCH instead.
(From OE-Core rev: 7ee64ea60ede5477b2f9a355d93bdc556e6b7895)
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
If the git version is 1.7.9.5, then 1795 is bigger than 210 which causes
errors like:
fatal: No such ref: :rbt/bash
fatal: Needed a single revision
ERROR: git request-pull reported an error
Use the first 3 numbers to fix the problem.
(From OE-Core rev: d23a1d7df849a2a7d338b2805bba7694717cbe65)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: 5ffa98a95317e6bea436e4372b9202f4da0ce2ae)
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
| |
The script was erroring out without a hint on what failed.
(From OE-Core rev: 72266cfa3a12a19a94d9176ecca9d080658dbf2e)
Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Add logic in the create-pull-request to detect and warn about the
trailing white space inserted by patches.
(From OE-Core rev: 3e35310db3cd6d265092724a0e542b9616aca9c5)
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is common to use the same remote branch name as the local branch
name. In this case, it would be nice not to have to specify the
remote branch name.
Make the -b argument optional and assume the remote branch is the same
name as the local branch. Print a NOTE to this effect so as not to
catch the user by surprise:
NOTE: Assuming remote branch 'notthere', use -b to override.
If the remote branch doesn't exist, a WARNING is displayed just as if
the user had used -b to specify a non-existent branch:
WARNING: Branch 'notthere' was not found on the contrib git tree.
Please check your remote and branch parameter before sending.
(From OE-Core rev: 62570b7e3db44fbc3461f650abe6c4613940e068)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Decrease the similarity percentage needed to recognize a delete/add-pair followed by an edit,
as a rename.
This make reviewing patches easier.
(From OE-Core rev: 3944f5e02d22b70b3bcd733a80f005dbd8e248a2)
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
| |
If we can't find the URL, tell the user how to correct the issue.
(From OE-Core rev: e5edda2e84e19a90ca2b0a6d4c265e5d5f59d42a)
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
| |
(From OE-Core rev: fb556532d4320518b96808d773d9e42719293be4)
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing REMOTE_URL and REMOTE_REPO parsing made assumptions regarding
the git URL format used for the known repository types. In fact, both of
these ssh URL formats are valid for all the known repositories. Specifically:
ssh://git@server/repository/path
git@server:repository/path
Generalize the parsing to work with each of these for all push URLs matching
*@*. Tested with the following URLs:
ssh://git@git.pokylinux.org/poky-contrib
ssh://git@git.pokylinux.org/poky-contrib.git
git@git.pokylinux.org:poky-contrib
git@git.pokylinux.org:poky-contrib.git
(From OE-Core rev: 861c288e353e917374de938c4e5e927e116cd56c)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
| |
(From OE-Core rev: 66b5a6bed6e55f2c285e2c3644302a6f242db32b)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
| |
(From OE-Core rev: c7f76dfb37022805458a7aeab8a51e44437f9abd)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
| |
(From OE-Core rev: e504b149fe2f057e38c19642b3d71bf43be2d62a)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some remotes can use HTTPS and we don't need to check the certificate
of the host so wget call is changed to avoid it.
(From OE-Core rev: 027667824ca78d4f118d1917a515a675d966985c)
Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently it is difficult to know if a pull request is being sent for review
or just to be pulled.
Add a -c argument to add RFC to the subject prefix and a blurb requesting
review to the cover letter.
(From OE-Core rev: e4f66ec2a8af56fb4d0a85df46bfaa3bb1409d31)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Joshua Lock <josh@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Saul Wold <sgw@linux.intel.com>
Cc: Paul Eggleton <paul.eggleton@intel.com>
Cc: Joshua Lock <josh@linux.intel.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rather than requiring users to have public remotes and private remotes when
their development remotes are ssh based (and therefor unsuitable for a pull
request URL), rewrite the ones we know about from ssh://git@ to git://.
As the remote url vary from remote to remote, do the REMOTE_REPO regex per
remote.
With this infrastructure in place, future patches can augment the list of
known remotes for things like Git Hub, Gitorious, kernel.org, etc.
(From OE-Core rev: 3c34975414f1184a35ad8b6ca8a5303786f3475f)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Joshua Lock <josh@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Tom Rini <tom_rini@mentor.com>
Cc: Tom Rini <tom_rini@mentor.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Allow for arbitrary remotes via a new -u argument. Remove the hard coded
references to the pokylinux repositories. Create the WEB_URL from known
remotes. Future patches can add additional WEB_URL mappings for remotes
like Git Hub, Gitorious, and kernel.org.
Rather than duplicating the git request-pull command ourselves, just use
the existing one.
(From OE-Core rev: 847fa2542aad8233d31076d8eaf4ba3168a79eae)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Joshua Lock <josh@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Acked-by: Tom Rini <tom_rini@mentor.com>
Cc: Tom Rini <tom_rini@mentor.com>
Cc: Martin Jansa <martin.jansa@gmail.com>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Cc: Richard Purdie <richard.purdie@linuxfoundation.org>
Cc: Joshua Lock <josh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Indent with tabs, not spaces, to be consistent with other bash scripts.
(From OE-Core rev: bf78a66f3adfc720ee84ff457143722f3752e8c5)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Some initial cleanup prior to a significant overhaul.
(From OE-Core rev: 926ca57b0eca7d94b933d2949d04a20ff176e57d)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
Acked-by: Otavio Salvador <otavio@ossystems.com.br>
Cc: Otavio Salvador <otavio@ossystems.com.br>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
|
|
|
|
|
|
| |
git.openembedded.org/openembedded-core-contrib
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The previous create-pull-request only generated a cover letter. When used to
send to the list, it did not include the patches, which made it difficult
to perform peer review. A pull request without patches is typically only sent
by a maintainer. As we are not all maintainers, we need a means to easily
submit patches for review.
As we are accustomed to making pull requests, this script retains a
git-pull-style cover letter, while sending the relevant patches as responses
to the pull. This will provide the necessary context for peer review, and still
allow people to collapse threads and see no more mail than they were previously.
This version retains the relative_to, commit_id, and contrib_branch arguments
from the original, along with their default values. It adds several more,
resulting in a highly flexible tool.
The script creates a pull directory (pull-$$ by default, configurable via the -o
option) and populates it with a git-format-patch generated patch series and
cover letter. The cover letter is modified to include the git and http pull URLs
and branch name, as well as a basic signature from the author pulled from git's
user.name and user.email config. git-format-patch provides the shortlog and
diffstat of the series.
Breaking a bit from the original, this script maintains the [PATCH] subject
prefix in the cover letter (as opposed to [GIT PULL]. This is better suited to
the majority of developers (who are not maintainers). This prefix is
configurable with the -p option, allowing you to create an [RFC PATCH]
prefix, for example.
By default, the generated cover letter with contain "*** SUBJECT HERE ***" and
"*** BLURB HERE ***" tokens which you should replace with something
appropriate prior to sending the messages.
When developing multiple versions of a patch series, it can save time to
maintain a message.txt file, rather than having to retype the message body of
the cover letter every time. The -m option allows you to specify a message file
and replace the "*** BLURB HERE ***" token of the cover letter with the contents
of the message file.
Finally, the -s option will replace the "*** SUBJECT HERE ***" token in the cover
letter with the specified subject.
The generated patches are suitable for sending via sendmail.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The patches to follow completely rewrite the existing create-pull-request.
Rather than have an initial diff of the two files (which are not at all
similar) remove the original, and then create the new one.
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
CC: Nitin A Kamble <nitin.a.kamble@intel.com>
CC: Richard Purdie <rpurdie@linux.intel.com>
CC: Saul Wold <saul.wold@intel.com>
CC: Bruce Ashfield <bruce.ashfield@windriver.com>
|
|
|
|
| |
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
|
|
|
|
|
|
|
|
|
| |
With this change the create_pull_request will be able to generate pull
requests to master as well as distro/master branch.
Some documentation is added in the Usage messange of the script.
Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
|
|
This is the 1st version of create-pull-request script.
Using specified local commit-id or branch-name it
generates a short description of the changes;
and using poky-contrib branch-name it generates the
URL where these changes are already pushed
and are available for review and git-pull.
I prepared this script as per the input from Richard Purdie.
Signed-Off-By: Nitin A Kamble <nitin.a.kamble@intel.com>
|