summaryrefslogtreecommitdiffstats
path: root/tools/patman
Commit message (Collapse)AuthorAgeFilesLines
* patman: Allow use outside of u-boot treeVadim Bendebury2013-01-312-9/+15
| | | | | | | | | | | | | | | | | | | | | | | | To make it usable in git trees not providing a patch checker implementation, add a command line option, allowing to suppress patch check. While we are at it, sort debug options alphabetically. Also, do not raise an exception if checkpatch.pl is not found - just print an error message suggesting to use the new option, and return nonzero status. . unit test passes: $ ./patman -t <unittest.result.TestResult run=7 errors=0 failures=0> . successfully used patman in the autotest tree to generate a patch email (with --no-check option) . successfully used patman in the u-boot tree to generate a patch email . `patman --help' now shows command line options ordered alphabetically Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Acked-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Add settings to the list of modules to doctestDoug Anderson2013-01-311-2/+3
| | | | | | The settings modules now has doctests, so run them. Signed-off-by: Doug Anderson <dianders@chromium.org>
* patman: Add the concept of multiple projectsDoug Anderson2013-01-314-4/+208
| | | | | | | | | | | | | | There are cases that we want to support different settings (or maybe even different aliases) for different projects. Add support for this by: * Adding detection for two big projects: U-Boot and Linux. * Adding default settings for Linux (U-Boot is already good with the standard patman defaults). * Extend the new "settings" feature in .patman to specify per-project settings. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Add support for settings in .patmanDoug Anderson2013-01-314-6/+54
| | | | | | | | | | | | | | | | | | | | | | This patch adds support for a [settings] section in the .patman file. In this section you can add settings that will affect the default values for command-line options. Support is added in a generic way such that any setting can be updated by just referring to the "dest" of the option that is passed to the option parser. At the moment options that would make sense to put in settings are "ignore_errors", "process_tags", and "verbose". You could override them like: [settings] ignore_errors: True process_tags: False verbose: True The settings functionality is also used in a future change which adds support for per-project settings. Signed-off-by: Doug Anderson <dianders@chromium.org>
* patman: Add a call to get_maintainer.pl if it existsDoug Anderson2013-01-313-2/+74
| | | | | | | | | For Linux the best way to figure out where to send a patch is with the "get_maintainer.pl" script. Add support for calling it from patman. Support is added unconditionally for "scripts/get_maintainer.pl" in case it is helpful for any other projects. Signed-off-by: Doug Anderson <dianders@chromium.org>
* patman: Add all CC addresses to the cover letterDoug Anderson2013-01-313-2/+15
| | | | | | | If we're sending a cover letter make sure to CC everyone that we're CCing on each of the individual patches. Signed-off-by: Doug Anderson <dianders@chromium.org>
* patman: Cache the CC list from MakeCcFile() for use in ShowActions()Doug Anderson2013-01-312-6/+13
| | | | | | | | | | Currently we go through and generate the CC list for patches twice. This gets slow when (in a future CL) we add a call to get_maintainer.pl on Linux. Instead of doing things twice, just cache the CC list when it is first generated. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Look for checkpatch in the scripts directoryDoug Anderson2013-01-311-1/+3
| | | | | | | | | The Linux kernel stores checkpatch.pl in the scripts directory. Add that to the search path to make things more automatic for kernel development. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Allow tests to run even if patman is in the pathDoug Anderson2013-01-311-2/+9
| | | | | | | | | | | Several of the patman doctests assume that patman was run with: ./patman Fix them so that they work even if patman is run with just "patman" (because patman is in the path). Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Add spaces back into patman testDoug Anderson2013-01-311-3/+3
| | | | | | | | | The patman test code was failing because some extra spaces got stripped when it was applied. These spaces are critical to the test code working. Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Issue empty change logs for unchanged patchesSimon Glass2012-11-141-8/+13
| | | | | | | | | | | | Often a particular patch may change only for some versions of a series. For versions where there is no change, issue a change log indicating that (for example 'Changes in v4: None'). For such lines, don't add a blank line afterwards, to conserve space. Use list.insert() instead of list = [item] + list. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Stefan Roese <sr@denx.de>
* patman: Add additional tags to ignoreSimon Glass2012-11-041-2/+2
| | | | | | | | | The BRANCH= tag can be used to indicate the destination branch for a commit. Ignore this tag. Also ignore the gerrit 'Commit-Ready:' tag. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: force git log commands to not use colorAlbert ARIBAUD2012-10-192-2/+3
| | | | | | | | | | Colored logs confuse patman when analyzing logs. Add --no-color option in git log commands in case the default config has color. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@ti.com>
* patman: Handle checkpatch.pl not providing file/line infoSimon Glass2012-10-151-2/+3
| | | | | | | | Sometimes we don't get a valid filename or line number from checkpatch.pl, for example if the patch is in a bad format. Deal with this by using a default value, rather than a stack trace. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Support Series-name tag to name a seriesSimon Glass2012-10-152-2/+7
| | | | | | | | Sometimes it is possible to forget the name of the branch you used to generate an upstream series. To assist with this, add an optional patman does not use this. Signed-off-by: Simon Glass <sjg@chromium.org>
* patman: Use reverse order for changelogOtavio Salvador2012-09-261-4/+4
| | | | | | | | | | Specially when many revisions are need for a patchset, the most interesting information is about the last set of changes so we output the changelog in reverse order to easy identification of most recent change set. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Do not Cc addresses included in To listOtavio Salvador2012-09-021-0/+7
| | | | | | | | | | In case an address is listed in the To list, those will be skipped on Cc list or user might end with a duplicated message. This fixes the case when a tag points to same address used as series destination thus avoiding duplicated sending. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
* patman: Allow for changelog use in first version of a seriesOtavio Salvador2012-09-021-3/+4
| | | | | | | | | When a patchset had a RFC series, a v1 might have a changelog of changes done since the RFC. The patch changes the range checked for changelog and allow it to start for version 1. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Acked-by: Simon Glass <sjg@chromium.org>
* patman: don't mess with signoffsIlya Yanok2012-09-021-11/+2
| | | | | | | | | | | | | | | | Currently patman assumes that there should be only one Signoff line and this is obviously incorrect: we often have to work with patches containing other people signoffs. Moreover, it's really desirable to preserve the comments between signoffs. So until some sophisticated signoff processing will be developed I suggest just don't mess with signoffs at all and treat them like plain text lines. The only drawback I've found so far is the case where you have a patch with someones else signoff but not yours and also have to patman tags under signoff line. In this case you will get extra empty line between signoffs. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* patman: don't mess with changelogIlya Yanok2012-09-021-3/+2
| | | | | | | | Don't try to sort and uniq changelog entries as this breaks multiline entries. It will be better to add some real multi-line support but for now just preserve the entries as is. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* patman: don't pick changes while processing patchesIlya Yanok2012-09-021-1/+2
| | | | | | | | We already got all changes from git log output and the comment to the ProcessLine function clearly states that 'patch' mode is not for scanning tags. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* patman: fix end of changes detectionIlya Yanok2012-09-021-0/+6
| | | | | | | | Changes may end in '---' line or Signoff line (generated by git format-patch) in case of Series-changes: lines being the last ones in commit message. So detect it properly. Signed-off-by: Ilya Yanok <ilya.yanok@cogentembedded.com>
* patman: Handle creation of patman config fileVikram Narayanan2012-06-193-3/+55
| | | | | | | | | | | | | patman shouts when it couldn't find a $(HOME)/.patman file. Handle it in a sane way by creating a new one for the user. It looks for a user.name and user.email in the global .gitconfig file, waits for the user input if it can't find there. Update the same in the README Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Acked-by: Simon Glass <sjg@chromium.org> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de>
* patman: Change the location of patman config fileVikram Narayanan2012-06-192-2/+2
| | | | | | | | | | Move the config file from ~/.config/patman to ~/.patman as it is more appropriate to have it there. Update the same in the README. Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Wolfgang Denk <wd@denx.de> Acked-by: Simon Glass <sjg@chromium.org>
* patman: Change the location of patman pathVikram Narayanan2012-04-301-3/+3
| | | | | | | Fix the location of patman path in README Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Cc: Simon Glass <sjg@chromium.org>
* patman: Fix a typo errorVikram Narayanan2012-04-301-1/+1
| | | | | | Signed-off-by: Vikram Narayanan <vikram186@gmail.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* Prepare v2012.04Wolfgang Denk2012-04-211-34/+34
| | | | | | Also tiny style cleanup to tools/patman/README Signed-off-by: Wolfgang Denk <wd@denx.de>
* Add 'patman' patch generation, checking and submission scriptSimon Glass2012-04-2113-0/+2354
What is this? ============= This tool is a Python script which: - Creates patch directly from your branch - Cleans them up by removing unwanted tags - Inserts a cover letter with change lists - Runs the patches through checkpatch.pl and its own checks - Optionally emails them out to selected people It is intended to automate patch creation and make it a less error-prone process. It is useful for U-Boot and Linux work so far, since it uses the checkpatch.pl script. It is configured almost entirely by tags it finds in your commits. This means that you can work on a number of different branches at once, and keep the settings with each branch rather than having to git format-patch, git send-email, etc. with the correct parameters each time. So for example if you put: in one of your commits, the series will be sent there. See the README file for full details. END Signed-off-by: Simon Glass <sjg@chromium.org>
OpenPOWER on IntegriCloud