Commit Graph

61 Commits

Author SHA1 Message Date
Andreas Bießmann
2386060c16 patman: fix gitutil for decorations
The git config parameter log.decorate is quite useful when working with git.
Patman, however can not handle the decorated output when parsing the commit.
To prevent this use the '--no-decorate' switch for git-log.

Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
Acked-by: Simon Glass <sjg@chromium.org>
2013-04-18 16:16:32 -04:00
Simon Glass
a1318f7cdc patman: Provide option to ignore bad aliases
Often it happens that patches include tags which don't have aliases. It
is annoying that patman fails in this case, and provides no option to
continue other than adding empty tags to the .patman file.

Correct this by adding a '-t' option to ignore tags that don't exist.
Print a warning instead.

Since running the tests is not a common operation, move this to --test
instead, to reserve -t for this new option.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Doug Anderson <dianders@chromium.org>
2013-04-08 15:09:03 -07:00
Doug Anderson
6d819925d0 patman: Allow specifying the message ID your series is in reply to
Some versions of git don't seem to prompt you for the message ID that
your series is in reply to.  Allow specifying this from the command
line.

Signed-off-by: Doug Anderson <dianders@chromium.org>
Acked-by: Simon Glass <sjg@chromium.org>
2013-04-04 14:04:34 -07:00
Simon Glass
5f6a1c4200 patman: Add additional git utilties
Add methods to find out the commits in a branch, clone a repo and
fetch from a repo.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-04-04 14:04:34 -07:00
Simon Glass
dc191505b9 patman: Allow commands to raise on error, or not
Make raise_on_error a parameter so that we can control which commands
raise and which do not. If we get an error reading the alias file, just
continue.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-04-04 14:04:33 -07:00
Simon Glass
a10fd93cbc patman: Make command methods return a CommandResult
Rather than returning a list of things, return an object. That makes it
easier to access the returned items, and easier to extend the return
value later.

Signed-off-by: Simon Glass <sjg@chromium.org>
2013-04-04 14:04:33 -07:00
Doug Anderson
8568baed3b patman: Add support for settings in .patman
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>
2013-01-31 15:23:40 -08:00
Doug Anderson
a970048e75 patman: Allow tests to run even if patman is in the path
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>
2013-01-31 15:23:39 -08:00
Albert ARIBAUD
7f14f30a6d patman: force git log commands to not use color
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>
2012-10-19 15:25:46 -07:00
Vikram Narayanan
87d65558ef patman: Handle creation of patman config file
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>
2012-06-19 22:51:55 +02:00
Simon Glass
0d24de9d55 Add 'patman' patch generation, checking and submission script
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>
2012-04-21 17:26:17 +02:00