`./script.sh get-latest <offset>` gets the full list of tags, filters
it, sorts it then returns a single result. On the Python side, it gets
the first one. If that works, it uses it, else it tries the second one,
etc.
That is a weird implementation: modify get-latest to return all tags so
that Python code only has to spawn a single subprocess.
Also, rename it from `get-latest` to `get-latest-tags`. This makes
things more explicit (what latest?) and also explicits that more than
one tag is required.
Also, argument 1 is supposed to be an offset.
No custom implementation of get_latest() did implement that.
Signed-off-by: Théo Lebrun <theo.lebrun@bootlin.com>
This brings the idea of file families, each ident is identified by his
family and can be referenced in compatible families.
For exemple :
- A Kconfig ident can be referenced in a C file but not in a Devicetree file.
- A Devicetree ident is only referenced in Devicetree files.
- A C ident is only referenced in C files.
Kconfig idents are defined without the CONFIG_ at the beginning.
We add it while indexing for an easier processing of other files.
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
git ls-tree return file permissions and symlinks always have permission
120000
So we can use that to identify them
Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
If the first function in a file does not have a doc comment, do not
run off the beginning of the file. Fixes#102.
Also:
- Add t/tree/issue102.c that exhibits this bug.
- in find-file-doc-comments.pl and script.sh, exit with a nonzero code
if this should recur.
- find-file-doc-comments.pl: new file
- data.py: Add database to store doc-comment locations
- script.sh: Add parse-docs subcommand
- update.py:
- Add code to process doc comments
- Update some variable names in hopes of reducing confusion
- query.py:
- Add code to report doc comments
- Update some variable names in hopes of reducing confusion
Also:
- t/TestEnvironment.pm: Add find_doc attribute
- t/interact.pl: Don't die if update.py fails
- t/TestHelpers.pm: Permit checking specific sections of query.py output
- t/300: update regexes per the preceding
- gitignore tags (ctags output) and .cache (api_test.py output)
- Change the few files that use leading tabs into leading spaces.
This way they match the other files in the repo.
- Add an EditorConfig file so that supported editors will automatically
use spaces instead of tabs.
- (Extra) Add some common editor backup-file extensions to .gitignore.
./scripts.sh list-tags -h cannot handle correctly when
the major version number is bigger than v9, so need to
add '*' in the regular expression of major number.
Signed-off-by: Chengguang Xu <cgxu519@gmx.com>
- This way, it's not always necessary to create
custom definitions for new projects.
- Update the definitions for projects that can
use such a default.
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
- Allows to add a project by just adding custom
definitions to projects/<project>.sh
- Except for cases that haven't been anticipated yet,
modifying common code should no longer be needed
Signed-off-by: Michael Opdenacker <michael.opdenacker@free-electrons.com>
git ls-tree returnes `commit` entries for submodules. We remove them
from the output. Without this the script crashes with this trace:
Traceback (most recent call last):
File "./update.py", line 138, in <module>
newBlobs = updateBlobIDs (tag)
File "./update.py", line 46, in updateBlobIDs
hash, filename = blob.split (b' ')
ValueError: too many values to unpack (expected 2)
Signed-off-by: Silvio Fricke <silvio.fricke@gmail.com>
Instead of using a trailing slash in the path to tell trees from blobs,
we actually ask git the type of the object. Also, if the object is a
tree but lacks a trailing slash, we redirect to the correct URL.
Fixes#6