aboutsummaryrefslogtreecommitdiff
path: root/contrib/mklog.py
AgeCommit message (Collapse)AuthorFilesLines
2020-09-25Import mklog.py from gcc repoSimon Marchi1-0/+261
I've been using the mklog utility from the gcc repo for a while to generate skeleton of ChangeLog entries. It recently got a rewrite as a Python script. Unfortunately, to find the repository root, and eventually to find in which ChangeLog file each entry goes, the new script assumes it is located in the same git repository that it generates ChangeLog entries for. This means that if you make a change in the gcc source tree and run mklog.py from that same source tree, it works. But if you make changes in your ~/src/binutils-gdb tree and run ~/src/gcc/contrib/mklog.py, it won't work. IIRC, the old script required that you ran it with the project's root directory as the CWD. The simplest way to fix this is to import the script in binutils-gdb and use it from there. It's also nice because we can use it without having a clone of the gcc repo. I also thought of adding a "--root" switch to the script to override the project's base directory. However: 1) It is more work. 2) If the script still lives in the gcc repo, it's less convenient than having it in binutils-gdb. This patch imports contrib/mklog.py from the gcc repo, revision c560591408440f441b8b327f5b41f9328d20b67b. contrib/ChangeLog: * mklog.py: New file, imported from gcc. Note: the ChangeLog entry above was generated using `git show | ./mklog.py`! Change-Id: I955592ce6397681986dc82a09593c32d8b8de54f