29 Jan, 2018
1 commit
-
All of these host tools are apparently written for Python2,
not Python3.Use 'python2' in the shebang line according to PEP 394
(https://www.python.org/dev/peps/pep-0394/).Signed-off-by: Masahiro Yamada
Reviewed-by: Simon Glass
22 Jan, 2018
1 commit
-
get_maintainer.pl quotes names which it considers unsafe, i.e. anything
containing [^a-zA-Z0-9_ \-]. This confuses patman, it will duplicate
addresses which are also in Series-to/cc. Strip the quotes.Signed-off-by: Stefan Brüns
Reviewed-by: Simon Glass
23 Nov, 2017
1 commit
-
The checkpatch tool was updated but the patman tests were not. Fix this.
Signed-off-by: Simon Glass
14 Sep, 2017
1 commit
-
This section of the settings file may be missing. Handle that gracefully
rather than emitting an error.Also update patman to write this section when a new settings file is
created.Fixes: e11aa602 (patman: add support for omitting bouncing addresses)
Signed-off-by: Simon Glass
Reviewed-by: Chris Packham
Tested-by: Bin Meng
12 Sep, 2017
1 commit
-
Add support for reading a list of bouncing addresses from a in-tree file
(doc/bounces) and from the ~/.patman config file. These addresses are
stripped from the Cc list.Signed-off-by: Chris Packham
Reviewed-by: Simon Glass
Reviewed-by: Philipp Tomsich >
09 Jun, 2017
10 commits
-
The existing test (patman --test) only covers basic checkpatch output.
We have had some problems with unicode processing and could use test
coverage for the various tags patman supports.Add a new functional test which runs most of the patman flow on a few
test commits and checks that the results are correct.See the documentation in the test for a description of what it does.
Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
This is not a good variable name in Python because 'list' is a type. It
shows up highlighted in some editors. Rename it.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
Allow the add_maintainers parameter to be a list of maintainers, thus
allowing us to simulate calling the script in tests without actually
needing it to work.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
Add some unicode to the test patches to make sure that patman does the
right thing.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
There is no need for this function to return the same object that was
passed in. Drop the return value.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
Unicode characters may appear in input patches so we should not warn about
them. Drop this warning.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
This is not a good variable name in Python because 'str' is a type. It
shows up highlighted in some editors. Rename it.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
The communication filter reads data in blocks and converts each block to
unicode (if necessary) one at a time. In the unlikely event that a unicode
character in the input spans a block this will not work. We get an error
like:UnicodeDecodeError: 'utf8' codec can't decode bytes in position 1022-1023:
unexpected end of dataThere is no need to change the input to unicode, so the easiest fix is to
drop this feature.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
Don't mess with the email address when outputting them. Just make sure
they are encoded with utf-8.Signed-off-by: Simon Glass
Tested-by: Philipp Tomsich -
This change encodes the CC list to UTF-8 to avoid failures on
maintainer-addresses that include non-ASCII characters (observed on
Debian 7.11 with Python 2.7.3).Without this, I get the following failure:
Traceback (most recent call last):
File "tools/patman/patman", line 159, in
options.add_maintainers)
File "[snip]/u-boot/tools/patman/series.py", line 234, in MakeCcFile
print(commit.patch, ', '.join(set(list)), file=fd)
UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 81: ordinal not in range(128)
from Heiko's email address:
[..., u'"Heiko St\xfcbner" ', ...]While with this change added this encodes to:
"=?UTF-8?q?Heiko=20St=C3=BCbner?= "Signed-off-by: Philipp Tomsich
Reviewed-by: Simon Glass
Signed-off-by: Simon Glass
Tested-by: Simon Glass
Tested-by: Philipp Tomsich
14 Apr, 2017
1 commit
-
os.read() returns a byte array in Python 3.5.2 and needs to be converted
into a string. Check if the returned value is an instance of bytes and
if it is decode it as a utf-8 string. If it is not a utf-8 encoded string
the decoding may fail with an exception.Prior to this fix the comparisions check data == "" would fail when data
was b'' and would cause an infinite memory leaking loop. joins would
also fail with an exception below but due to the infinite loop it never
made it that far.Signed-off-by: George McCollister
Acked-by: Simon Glass
08 Feb, 2017
2 commits
-
When gathering addresses for the Cc list patman would encounter a
UnicodeDecodeError due to non-ascii characters in the author name.
Address this by explicitly using utf-8 when building the Cc list.Signed-off-by: Chris Packham
Acked-by: Simon Glass -
It is convenient to be able to deal with checkpatch warnings in the same
way as build warnings. Tools such as emacs and kate can quickly locate
the source file and line automatically.To achieve this, adjust the format to match the C compiler, and output to
stderr.Signed-off-by: Simon Glass
09 Oct, 2016
7 commits
-
In python 3.x StringIO is no longer a module, and the class can instead
be found in the io module. Adjust the code in the doctest input to
account for both.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
In python 3.x the iteritems() method has been removed from dictionaries,
and the items() method does effectively the same thing. On python 2.x
using items() is a little less efficient since it involves copying data,
but as speed isn't a concern in this code switch to using items() anyway
for simplicity.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
In python 3.x module names used in import statements are case sensitive,
and the configparser module is named in all lower-case. Import it as such
in order to avoid errors when running with python 3.x.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
Syntax for exception handling is a little more strict in python 3.x.
Convert all uses to a form accepted by both python 2.x & python 3.x.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
In python 3.x, print must be used as a function call. Convert all print
statements to the function call style, importing from __future__ where
we print with no trailing newline or print to a file object.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
In preparation for running on python 3.x, which will refuse to run
scripts which mix tabs & spaces for indentation, replace 2 tab
characters present in series.py with spaces.Signed-off-by: Paul Burton
Acked-by: Simon Glass -
Output which does not include a newline will not be displayed unless
flushed. Add a flush to ensure that it becomes visible.Signed-off-by: Simon Glass
19 Sep, 2016
3 commits
-
When tools want to display information of varying levels of importance, it
helps to provide the user with control over the verbosity of these messages.
Progress messages work best if they are displayed and then removed from the
display when no-longer relevant.Add a new tout library (terminal out) to handle these tasks.
Signed-off-by: Simon Glass
-
For tools which want to use input files and temporary output, it is useful
to have the handling of these dealt with in one place. Add a new library
which allows input files to be read, and output files to be written, all
based on a common directory structure.Signed-off-by: Simon Glass
-
It is more useful to have this method raise an error when something goes
wrong. Make this the default and adjust the few callers that don't want to
use it this way.Signed-off-by: Simon Glass
12 Jul, 2016
5 commits
-
The following python error:
Traceback (most recent call last):
File "./tools/patman/patman", line 144, in
series = patchstream.FixPatches(series, args)
File "./tools/patman/patchstream.py", line 477, in FixPatches
commit = series.commits[count]
IndexError: list index out of rangeis seen when:
- 'END' is missing in those tags
- those tags are put in the last part in a commit message
- the commit is not the last commit of the seriesAdd testing logic to see if a new commit starts.
Signed-off-by: Bin Meng
Acked-by: Simon Glass -
'Series-changes' uses blank line to indicate its end. If that is
missing, series internal state variable 'in_change' may be wrong.
Correct its state.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
If 'END' is missing in a 'Cover-letter' section, and that section
happens to show up at the very end of the commit message, and the
commit is the last commit of the series, patman fails to generate
cover letter for us. Handle this in CloseCommit of patchstream.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
'Cover-letter', 'Series-notes' and 'Commit-notes' tags require an
'END' to be put at the end of its section. If we forget to put an
'END' in those sections, and these sections are followed by another
patman tag, patman generates incorrect patches. This adds codes to
handle such scenario.Signed-off-by: Bin Meng
Acked-by: Simon Glass -
Like other patman tags, use a new variable cover_match to indicate
a match for 'Cover-letter'.Signed-off-by: Bin Meng
Acked-by: Simon Glass
18 Mar, 2016
1 commit
-
At present if you try to use buildman with the branch 'test' it will
complain that it is unsure whether you mean the branch or the directory.
This is a feature of the 'git log' command that buildman uses. Fix it
by resolving the ambiguity.Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger
15 Mar, 2016
2 commits
-
It is convenient to install symlinks to buildman and patman in the search
patch, such as /usr/local/bin. But when this is done, the -H option fails to
work because it looks in the directory containing the symlink instead of its
target. Fix this.Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger -
Fix this nit to keep the code consistent.
Signed-off-by: Simon Glass
Reviewed-by: Joe Hershberger
25 Feb, 2016
1 commit
-
A patman series with a 'Series-notes' section causes
buildman to crash with:self.series.notes += self.section
TypeError: cannot concatenate 'str' and 'list' objectsFix by initializing series.notes as a one-element array
rather than a scalar.Signed-off-by: Albert ARIBAUD
Acked-by: Simon Glass
Tested-by: Simon Glass
06 Feb, 2016
1 commit
-
Correct spelling of "U-Boot" shall be used in all written text
(documentation, comments in source files etc.).Signed-off-by: Bin Meng
Reviewed-by: Heiko Schocher
Reviewed-by: Simon Glass
Reviewed-by: Minkyu Kang
21 Jan, 2016
1 commit
-
Add option to create threaded series of patches.
With it, it will be possible to create patch threads like this:
[PATCH 0/10] Add support for time travel
[PATCH 1/10] Add Flux Capacitor driver
[PATCH 2/10] Add Mr. Fusion driver
(...)Internally it will call git send-email with --thread option
Signed-off-by: Mateusz Kulikowski
Acked-by: Simon Glass
09 Sep, 2015
1 commit
-
This reverts commit 19b4a3369876f9215e2b861f211e8df1a75e26ca.
Since that commit, patman generates useless patches for file removal;
"git format -D" prints only the header but not the diff when deleting
files, and "git am" always refuses such patches.The following is the quotation from "man git-format-patch":
-D, --irreversible-delete
Omit the preimage for deletes, i.e. print only the header but
not the diff between the preimage and /dev/null. The resulting
patch is not meant to be applied with patch nor git apply; this
is solely for people who want to just concentrate on reviewing
the text after the change. In addition, the output obviously
lack enough information to apply such a patch in reverse, even
manually, hence the name of the option.Signed-off-by: Masahiro Yamada
Acked-by: Simon Glass