vaab / gitchangelog Goto Github PK
View Code? Open in Web Editor NEWCreates a changelog from git log history.
License: Other
Creates a changelog from git log history.
License: Other
It looks like gitchangelog uses the entire commit in the changelog. However, this is rather heavy and leads to cumbersome changelogs. The commit subject (the first line) should be describing the commit at a high level, with the rest of the commit message being lower-level details. For example, see here:
Fixes
~~~~~
- Abort with an error if the bulb closes the connection (fixes #5).
[Stavros Korokithakis]
- Flow API improvements (#3) [Teemu R]
* Flow API improvements
1. Cast brightness always to int.
2. Raise an exception when supplied with more than maximum amount of transitions.
3. Supply repr dunders.
* Flow: use warning instead of exception for invalid values. Add check for brightness' validity.
* Change warning to display for over 9 messages.
* Silently clamp brightness to 100, as elsewhere.
This is a side-effect of the merging process, and is rather ugly in this case, but it generally seems to me that only the first line should be included. That would make the changelog much prettier (assuming I had taken care to write proper commit messages, which is a sound assumption).
Hi, I've used gitchangelog for a couple months in our development process. Everything was working great. But when I was trying to generate the changelog (in on of our many repositories), I get this error:
gitchangelog
Traceback (most recent call last):
File "../gitchangelog/gitchangelog", line 1052, in <module>
main()
File "../gitchangelog/gitchangelog", line 1034, in main
subject_process=config.get("subject_process", noop),
File "../gitchangelog/gitchangelog", line 882, in changelog
for commit in commits:
File "../gitchangelog/gitchangelog", line 644, in log
for key in GIT_FORMAT_KEYS]))
File "../gitchangelog/gitchangelog", line 270, in <lambda>
@itermap(lambda r: r.decode(_preferred_encoding))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 24: ordinal not in range(128)
I checked the commit messages using git log:
git log > logs.txt
looks like there is one commit message with a zero-width space character <200b>. If I open the file in vim:
vi logs.txt
commit 5010274e14641e0891c0844318774741b5864947
Author: osroflo
Date: Tue Mar 29 10:31:39 2016 -0700
API Enhancements*<200b>
- Added Elasticsearch search() function to our Query library
- Moved construction of response parameters out of controller and into Response Formatter library
- Return a status of fail if something goes wrong with returning our API response instead of always returning status of success
Is there a way that I can fix this?
NOTE:
Hello,
It would be cool to check:
$ gitchangelog
Traceback (most recent call last):
File "/home/sdouche/.pyenv/versions/default/bin/gitchangelog", line 11, in <module>
sys.exit(main())
File "/home/sdouche/.pyenv/versions/3.5.1/envs/default/lib/python3.5/site-packages/gitchangelog.py", line 1030, in main
ignore_regexps=config['ignore_regexps'],
KeyError: 'ignore_regexps'
I saw many issues and PRs reported regarding Windows support.
From my understanding this tool doesn't work on Windows yet. Am I right ?
Some templating mecanism have full python capabilities (mako for instance), and providing an already limited and parsed output limit a lot their expressiveness. By staying compatible with standard python interface and simple objects (dict-like and list-like), it could be a good idea to give full blown git commit object for instance, where information could be added as the need for them would come.
Here are a few ideas of lowlevel information that we could want:
We don't want to fill memory in really large git history, so this feature should come after some type of lazy evaluation is implemented (see #19).
I tried to use gitchangelog
as part of the build scripts executed via travis but I discovered that it does not work as expected.
First problem is that pip install gitchangelog
failed with the error below:
Command "/home/travis/virtualenv/python2.7.9/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-I7WzDd/gitchangelog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-KMZBF0-record/install-record.txt --single-version-externally-managed --compile --install-headers /home/travis/virtualenv/python2.7.9/include/site/python2.7" failed with error code 1 in /tmp/pip-build-I7WzDd/gitchangelog
Full logs at https://travis-ci.org/pycontribs/jira/jobs/150580836
The second problem is that it seems that is not possible to call gitchangelog
as a python module which is a real PITA. Why? Installing command line utilities via pip does not work very well in all environments (especially on Windows or different virtual environments). For this reason most Python package developers do allow you to call modules using python -m modulename [options]
. This works very well and allows you to use a specific python interpreter, always knowing which one you are calling.
This can be implemented with only few lines of code. Few examples of projects that are using this approach pip
, flake8
, py.test
, tox
,...
Mac OSX 10.9.2
Python 2.7.6
Pip 1.5.4
$ pip install gitchangelog
Downloading/unpacking gitchangelog
Downloading gitchangelog-2.1.0.tar.gz
Running setup.py (path:/private/var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip_build_xxxx/gitchangelog/setup.py) egg_info for package gitchangelog
Installing collected packages: gitchangelog
Running setup.py install for gitchangelog
error: can't copy 'gitchangelog.rc.reference': doesn't exist or not a regular file
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip_build_xxxx/gitchangelog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip-bTXANp-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying gitchangelog.py -> build/lib
running install_lib
copying build/lib/gitchangelog.py -> /usr/local/lib/python2.7/site-packages
byte-compiling /usr/local/lib/python2.7/site-packages/gitchangelog.py to gitchangelog.pyc
running install_data
error: can't copy 'gitchangelog.rc.reference': doesn't exist or not a regular file
----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip_build_casey.duquette/gitchangelog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip-bTXANp-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/39/65psh3055pz7931lp18l_jv8d4rpv6/T/pip_build_xxxx/gitchangelog
Storing debug log for failure in /Users/xxxx/.pip/pip.log
i installed gitchangelog by sudo pip install gitchagelog
and i try test template
feature.
but, i can't get what i expected.
here is some example
[~/temp/gitchangelog]$ uname -a *[master]
Darwin pyoung.local 15.5.0 Darwin Kernel Version 15.5.0: Tue Apr 19 18:36:36 PDT 2016; root:xnu-3248.50.21~8/RELEASE_X86_64 x86_64
[~/temp/gitchangelog]$ diff .gitchangelog.rc gitchangelog.rc.reference
181c181
< #output_engine = rest_py
---
> output_engine = rest_py
183c183
< output_engine = mustache("markdown")
---
> #output_engine = mustache("markdown")
[~/temp/gitchangelog]$ gitchangelog *[master]
Error: Invalid mustache template name 'markdown'.
No available mustache templates found in '/usr/local/lib/python2.7/site-packages/templates/mustache'.
[~/temp/gitchangelog]$ ./gitchangelog *[master]
# Changelog
## 2.3.0 (2015-09-25)
### Fix
.
.
.
i was clone gitchangelog to ~/temp/gitchangelog
but when i try to generate by gitchangelog
not ./gitchangelog
, it's failed.
i supposed that caused by __file__
path based.
https://github.com/vaab/gitchangelog/blob/master/gitchangelog.py#L663
template_dir = os.path.join(
os.path.dirname(os.path.realpath(__file__)),
"templates", label)
.gitchangelog.rc
by optional.sorry, i found pull request about that. #46
Where do you specify the %%version%% for unreleased version that's in the rc file?
Also on another note: How do you go about exporting the respond from gitchangelog to a file? Do you have a process around this built in or do you manage it by hand?
Running the latest 2.2.0, with pystache
installed and output_engine = mustache("markdown")
in my .gitchangelog.rc
, running gitchangelog
gives:
Error: Invalid mustache template name 'markdown'.
No available mustache templates found in '/home/musttu/.virtualenvs/foobar/python2.7/site-packages/templates/mustache'.
That directory does not exist at all. Instead, the templates are directly in virtualenv root:
$ pip uninstall gitchangelog
Uninstalling gitchangelog-2.2.0:
/home/musttu/.virtualenvs/foobar/bin/gitchangelog
/home/musttu/.virtualenvs/foobar/gitchangelog.rc.reference
/home/musttu/.virtualenvs/foobar/lib/python2.7/site-packages/gitchangelog-2.2.0-py2.7.egg-info
/home/musttu/.virtualenvs/foobar/lib/python2.7/site-packages/gitchangelog.py
/home/musttu/.virtualenvs/foobar/lib/python2.7/site-packages/gitchangelog.pyc
/home/musttu/.virtualenvs/foobar/templates/mako/octobercms-plugin.tpl
/home/musttu/.virtualenvs/foobar/templates/mako/restructuredtext.tpl
/home/musttu/.virtualenvs/foobar/templates/mustache/restructuredtext.tpl
Proceed (y/n)?
And even in this case, markdown.tpl
is missing.
It fails the same way without virtualenv (templates get extracted to /usr/local/templates
, is it intentional?)
Some issues with installation scripts?
By default, gitchangelog makes sections under each version by builtin rules. At least following rules are followed:
new:
as "New"chg:
as "Changes"fix:
as "Fixes"This behavior is not documented anywhere. The default sectioning can be overridden by custom config file and section_regexps
. Still, however, documentation should describe the default behavior.
There is a sample configuration file, but that's different from telling what the defaults are.
Or is reference config used as defaults? The behavior seems a bit inconsistent:
section_regexps
are not completely replaced (prefixes are still snipped)ignore_regexps
isDid not try other params.
Git doesn't support the feature of giving multiple author to one commit. Although, there's a convention about this.
We can support this convention and offer the possibility to show all the authors in the output of gitchangelog
.
For several reason, building changelog incrementally is sometimes required, usually when you want to commit your CHANGELOG:
gitchangelog
, or change your conventions:
This would require gitchangelog
to accept some rev-list
type of argument, with optional detection of last revision made, and/or automatically insert in a file. This could be all driven by options in the config file, or command line arguments.
I can't currently run this under Windows.
Even after those fixes, something over here (https://github.com/securactive/gitchangelog/blob/master/gitchangelog.py#L297) crashes everything and I wasn't able to solve it.
As of #26 we now can have incremental changelog. But this doesn't cover another simple need that is in numerous use case: how to get automatically the lastest version already generated to create only the last last tags ?
I propose to add an option in .gitchangelog.rc
that would provide a simple function that must return the last git ref that was logged. To follow the current trend, this would be a simple callable that takes no argument and must be called.
Helpers could be provided that help creating a callable from reading a given file and would apply a regex to it and return the first match::
infer_last_version = FileRegex("Changelog", r"^(?P<ref>[0-9]+.[0-9]+.[0-9])+\n--+\n\n")
It would be nice to set the template path from .gitchangelog.rc
Thank you!
Currently, output is on stdout.
But we could want to:
>
and >>
.dch
) to manage creation of an entry.This could be achievable with a simple new variable in config file, we could call it: publish
.
The default value would be stdout
. The value of the variable would be a function that take the full string output as sole argument. A few function could be provided (as Multiplex
, Append
, Overwrite
, Prepend
, InsertAtPoint
, Call
) to cover these first needs.
It would be nice if we can filter CHANGELOG per tag
something like
$~ gitchangelog --tag 1.0.5
OR
$~ gitchangelog 1.0.5
(Should display only 1.0.5 tag changes)
Hi.
Really to use gitchangelog for generate yaml-style version hostory files?
I read this article http://octobercms.com/docs/plugin/registration#migrations-version-history - after that creates my quesation?
Hi.
I fetch error with gitchangelog.py (error from git)
Short error description:
<<<
[dimti@prototype digitec]$ git show -s import-export-cli
fatal: ambiguous argument 'import-export-cli': both revision and filename
Use '--' to separate paths from revisions, like this:
'git [...] -- [...]'
[dimti@prototype digitec]$ git show -s import-export-cli --
commit 5d947848c154753e49ca210cb543ae4d3277ce55
A have two objects with name "import-export-cli"
Path in root folder of git repositroy
Tag
After add tag "import-export-cli", Im fetching that error with use gitchangelog.py
<<<
Traceback (most recent call last):
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 267, in getattr
% (identifier, aformat))
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 228, in swrap
return self._repos.swrap(_args, *_kwargs)
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 438, in swrap
return swrap(command, *_kwargs)
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 214, in swrap
return wrap(command, *_kwargs).strip()
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 207, in wrap
errlvl=errlvl, command=command, out=out, err=err)
main.ShellError: Wrapped command 'cd /mnt/passport/var/www/digitec; git show -s import-export-cli --pretty=format:%s%x00%B%x00%ad%x00%an%x00%H%x00%b%x00%at%x00%ct%x00%cn' exited with errorlevel 128.
stderr:
| fatal: ambiguous argument 'import-export-cli': both revision and filename
| Use '--' to separate paths from revisions, like this:
| 'git [...] -- [...]'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 839, in
main()
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 821, in main
output_engine=config.get("output_engine", rest_py),
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 686, in changelog
for tag in reversed(repository.tags)
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 444, in tags
key=lambda x: int(x.committer_date_timestamp))
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 444, in
key=lambda x: int(x.committer_date_timestamp))
File "/mnt/passport/opt/gitchangelog/gitchangelog.py", line 270, in getattr
% self.identifier)
ValueError: Given commit identifier import-export-cli doesn't exists
In some case, we can want to generate sort of a sub-changelog in a subdirectory.
For instance, you could be using a framework supporting addons/modules. Each of which are not always separated in individual sub-git. Nevertheless, they have version information, and could need a proper changelog.
Hello.
Im use gitchangelog for version control in my company.
An big git repositories work gitchangelog is slow.
I often released my app (2-3 per day) and gitchangelog every time processed my big git repository (for create new CHANGELOG.md file).
How to tunning gitchangelog for caching results and processed only new commits?
For some project, I'd like to deactivate sectioning ("new", "changes"...). I understand that I can do it with some work:
.gitchangelog.rc
so that all commit messages goes to one default section.This is not straightforward, and maybe disabling sectionning should be easier and supported by the default gitchangelog templates.
gitchangelog doesn't display the very last commit.
Hello.
The command ..
echo $GITCHANGELOG_CONFIG_FILENAME
gave me
/home/drxos/.gitchangelog.rc
and this file is a perfect copy of the sample you suggested.
git log - -oneline
gave this :
f9432cd chg: dev: cofigurations !cosmetics
7b2884c chg: dev: initial commit !cosmetics
68bd063 new: dev: initial commit !minor
Unfortunetly,
gitchangelog
output no thing.
Where is the mistake ?
Hey,
i just installed version 2.0.0 from pypi, thinking this would be a great companion to my very own http://github.com/peritus/bumpversion โ however, i can't seem to get it to work (this happens with no configuration and with the sample configration as .gitchangelog.rc
in the root of the git repository):
$> gitchangelog
Traceback (most recent call last):
File "/usr/local/share/python//gitchangelog", line 9, in <module>
load_entry_point('gitchangelog==2.0.0', 'console_scripts', 'gitchangelog')()
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 708, in main
gc_rc = repository.config.get("gitchangelog", {}).get('rc-path')
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 381, in config
return inflate_dict(dct_options)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 155, in inflate_dict
mset(res, k, dct[k], sep, deep)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 149, in mset
deep=-1 if deep < 0 else deep - 1)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 149, in mset
deep=-1 if deep < 0 else deep - 1)
File "/usr/local/Cellar/python/2.7.3/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/gitchangelog.py", line 142, in mset
dct[k] = v
TypeError: 'str' object does not support item assignment
BTW: Your TODO list contains "More Tests", and i think they are essential for this kind of application. Have a look at https://github.com/peritus/bumpversion/blob/master/tests.py (and the overall setup there, including Travis CI) as an inspiration.
Currently the changelog data are all built up in python memory in simple object (dict and list), then it's fed to the templating mecanisms. This eats up a lot of memory and is not scalable to big commit history.
A kind of lazy evaluation (through iterator for instances or lazy evaluating dict/list-like objects) should be implemented.
I'm on a different system and installing the package via pip 1.5.5 fails again.
$ pip install gitchangelog
Downloading/unpacking gitchangelog
Downloading gitchangelog-2.1.2.tar.gz
Running setup.py (path:/private/var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip_build_cduquett/gitchangelog/setup.py) egg_info for package gitchangelog
Installing collected packages: gitchangelog
Running setup.py install for gitchangelog
error: can't copy 'gitchangelog.rc.reference': doesn't exist or not a regular file
Complete output from command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip_build_cduquett/gitchangelog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip-aaJNVF-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib
copying gitchangelog.py -> build/lib
running install_lib
copying build/lib/gitchangelog.py -> /usr/local/lib/python2.7/site-packages
byte-compiling /usr/local/lib/python2.7/site-packages/gitchangelog.py to gitchangelog.pyc
running install_data
error: can't copy 'gitchangelog.rc.reference': doesn't exist or not a regular file
----------------------------------------
Cleaning up...
Command /usr/local/opt/python/bin/python2.7 -c "import setuptools, tokenize;__file__='/private/var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip_build_cduquett/gitchangelog/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip-aaJNVF-record/install-record.txt --single-version-externally-managed --compile failed with error code 1 in /private/var/folders/_r/d4klmxy136g99ks6x0s58sb00000gn/T/pip_build_cduquett/gitchangelog
Storing debug log for failure in /Users/cduquett/.pip/pip.log
Can you provide angularJS template: https://github.com/ajoslin/conventional-changelog/blob/master/CONVENTIONS.md
Some random links about thoughts around changelog format:
When launching gitchangelog on my python 3.4.2, I get sometimes full changelog, but sometimes it's empty, and other times it bails out with this traceback::
Traceback (most recent call last):
File "./gitchangelog", line 1052, in <module>
main()
File "./gitchangelog", line 1034, in main
subject_process=config.get("subject_process", noop),
File "./gitchangelog", line 860, in changelog
for tag in reversed(repository.tags)
File "./gitchangelog", line 605, in tags
key=lambda x: int(x.committer_date_timestamp))
File "./gitchangelog", line 605, in <lambda>
key=lambda x: int(x.committer_date_timestamp))
ValueError: invalid literal for int() with base 10: 'tag 0.1.0\nTagger: Valentin Lab <[email protected]>\n\nInitial release\n\n1309333456'
Could this come from the Phile
and subprocess piping ?
I've used the default gitchangelog.rc.reference
to generate a change log for my project. However, I didn't get the (nicer) formatting expected as seen on the pypi page. Although the pypi page says: And the rendered full result is directly used to generate the HTML webpage of the changelog of the PyPI page.", I don't get the same result. In my output there's "Change-Id.." and extra newlines, like:
Changelog
=========
0.3.0 (2015-03-08)
------------------
- Doco update. [Lars Stavholm]
Change-Id: Ib81c683769d31a1b4923df0f2ec937b2ad22f04a
- Rearranged rack files. [Lars Stavholm]
Change-Id: I2a31001299c283d23b69db1622aec633e891abaa
- Updated. [Lars Stavholm]
Change-Id: I6aa8fd0c479617257f6325b1ca16366ec582bbe3
I think --first-parent
can be a great companion to the include_merge
option, i.e. include ONLY a merge commit and no other commits in the same merge bubble.
An example use case:
* Merge commit: This is a new feature... (summarize the new feature)
\ * Child of merge commit: fix: Fix something
\ * Child of merge commit: new: Add something
\ * Child of merge commit: chg: Change something
If I choose to include merge commit now it will split these 4 commits into different sections, while they most make sense when grouped together. Actually all the things a user needs to know when reading the changelog is already summarized in the merge commit.
I hope that makes sense.
Have been using this tool with great success recently (with a heavily modified mako template though).
Been trying to get this tool setup on Windows with no luck. Got Python 3.2 running, but the instructions just don't seem to be clear enough how to get going. Am I missing something? Clarification would be useful. Thanks
when i try to get short sha to use CHANGELOG.md, but i can't get that info.
https://github.com/vaab/gitchangelog/blob/master/gitchangelog.py#L891
sections[matched_section].append({
"author": commit.author_name,
"subject": subject_process(commit.subject),
"body": body_process(commit.body),
})
how about add two version of sha info?
"sha1": commit.sha1,
"sha1_short": commit.sha1[:6],
Hi,
It would be nice to give a range, for example "create only the changelog from the last release". My changelog contains 202046 lines (very old project :)) and I'm not interested by the older releases.
Hi,
I am trying to setup gitchangelog and I've noticed that I am getting an error on the initial run off ./autorun.sh
The error I am getting is at line 185.
if ! "$git" describe --tags >/dev/null 2>&1; then
die "Didn't find a git repository (or no tags found). " \
"\`\`./autogen.sh\`\` uses git to create changelog and version information."
fi
However if I change describe --tags
to log
the script runs fine with no errors.
So just a question, what is t the script trying to do here? I understand that its trying to check for git, but is there a specific reason why describe does not work and log does?
Thanks
I installed gitchangelog in a virtualenv (/work/tools/zest.releaser/). (I do not think the problem is related to this.)
$ cd
$ /work/tools/zest.releaser/bin/gitchangelog
Calling gitchangelog in the root of a git repo, with the sample configuration file installed in ~/.gitchangelog.rc, causes the following traceback:
Traceback (most recent call last):
File "/work/tools/zest.releaser/bin/gitchangelog", line 9, in <module>
load_entry_point('gitchangelog==2.0.0', 'console_scripts', 'gitchangelog')()
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 708, in main
gc_rc = repository.config.get("gitchangelog", {}).get('rc-path')
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 381, in config
return inflate_dict(dct_options)
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 155, in inflate_dict
mset(res, k, dct[k], sep, deep)
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 149, in mset
deep=-1 if deep < 0 else deep - 1)
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 149, in mset
deep=-1 if deep < 0 else deep - 1)
File "/work/tools/zest.releaser/lib/python2.7/site-packages/gitchangelog.py", line 142, in mset
dct[k] = v
TypeError: 'str' object does not support item assignment
Template path should be independent of the package path best configurable via ~/.gitconfig
[gitchangelog]
rc-path = ~/.gitchangelog/gitchangelog.rc
template-path = ~/.gitchangelog/templates
Hi,
I have just installed the last version of gitchangelog (version 2.5.1) on a Python 3.5 virtualenv (same with Python 2.7), but the command failed with the following message:
Config reference file '/Users/me/virtualenv/py-gitchangelog/lib/python3.5/site-packages/gitchangelog.rc.reference' not found.
Is this file missing in the library? Is it a packaging error?
How to reproduce:
$ mkvirtualenv -p python3 py-gitchangelog
Running virtualenv with interpreter /Library/Frameworks/Python.framework/Versions/3.5/bin/python3
[boring stuf...]
(py-gitchangelog) $ pip install gitchangelog
Collecting gitchangelog
Installing collected packages: gitchangelog
Successfully installed gitchangelog-2.5.1
(py-gitchangelog) $ pip list
Package Version
------------ --------
appdirs 1.4.0
gitchangelog 2.5.1
packaging 16.8
pip 9.0.1
pyparsing 2.1.10
setuptools 34.2.0
six 1.10.0
wheel 0.30.0a0
(py-gitchangelog) $ cd ~/workspace/my_project
(py-gitchangelog) $ ls .gitchangelog.rc
.gitchangelog.rc
(py-gitchangelog) $ gitchangelog
Config reference file '/Users/me/virtualenv/py-gitchangelog/lib/python3.5/site-packages/gitchangelog.rc.reference' not found.
I'm on OS X.
In projects I usually am used to provide my commit message's body in full ReSTructured text. But when used in the changelog it get all smashed.
I understand that it is smashed because of some wrapping occuring to get 80-column wide changelog file, and that indentation in default output ReST format will add some chars to each line. So this is why it was trying to recompute and re-wrap lines.
But this breaks most of commit's body message's ReSTructured text (lists, blockquote...). I would rather have the body of my messages kept untouched, and face a more than 80-column gitchangelog. I could even deal myself to this last issue by enforcing a policy to have 76-columns commit body messages if I really wanted also to have 80-column gitchangelog.
Traceback (most recent call last):
File "/usr/local/bin/gitchangelog", line 9, in <module>
load_entry_point('gitchangelog==2.2.0', 'console_scripts', 'gitchangelog')()
File "/usr/local/lib/python2.7/site-packages/gitchangelog.py", line 1029, in main
ignore_regexps=config['ignore_regexps'],
KeyError: 'ignore_regexps'
Why could this be happening? I just pip install gitchangelog
and then run gitchangelog
this is my list of pip packages installed
ansible (1.6.10)
ecdsa (0.11)
gitchangelog (2.2.0)
Jinja2 (2.7.3)
Mako (1.0.1)
MarkupSafe (0.23)
paramiko (1.15.1)
pip (1.5.6)
pycrypto (2.6.1)
pystache (0.5.4)
PyYAML (3.11)
setuptools (8.0.2)
vboxapi (1.0)
wsgiref (0.1.2)
When using python 2.7, calling:
gitchangelog --debug
usage:
gitchangelog {-h|--help}
gitchangelog {-v|--version}
gitchangelog init ## obsolete
gitchangelog show [REVLIST]
gitchangelog: error: too few arguments
This is not happening with python 3.4
. And is related to:
something like:
gitchangelog most_recent_tag tag_from_last_deployment
The test "oracle" data to plain files and probably factorize much of the actual tests.
This will improve the readability and writability of tests.
I am using tags for marking releases:
$ git tag
v1.0
v1.1
v1.1.2
v1.1.3
My expectation is that gitchangelog would use tags as releases headers and prints the commit between tags.
But currently only one release header unreleased is created:
Changelog
=========
%%version%% (unreleased)
------------------------
- Bump version. [Max Muster]
- Use KeyValueMetadata.update in view. [Max Muster]
- KeyValueMetadata._load_original() to load original content and try to
keep original field ordering
- some list comprehension magic in KeyValueMetadata.update to keep the
ordering
is there any documentations/examples somewhere of how to maintain version numbers using gitchangelog?
Hi,
I use annotated tag to number version of my code. Changelog is displayed properly, but I've just seen that the date displayed next to the tag in the log is the date of the commit that is tagged whereas I would expect to have the date of the tag itself displayed (I tag the commit when I plan to release).
Can this be configured?
Thank you,
Antoine.
Git notes could be used to:
Support of using git note
could really be a good addition to gitchangelog
, at the condition we find a nice way to allow different usage scenarios.
While pip install gitchangelog
works just ok, when invoking gitchangelog
, it does not find the reference config file. I do have local .gitchangelog.rc
file, but I get:
Traceback (most recent call last):
File "/home/musttu/Code/virtualenvs/citrus/bin/gitchangelog", line 11, in <module>
sys.exit(main())
File "/home/musttu/Code/virtualenvs/citrus/local/lib/python2.7/site-packages/gitchangelog.py", line 1028, in main
section_regexps=config['section_regexps'],
KeyError: 'section_regexps'
I don't specify section_regexps
in my config file, so it's not found from config.
On pip 6.x, gitchangelog.rc.reference
extracts to:
~/.virtualenvs/citrus/lib/python2.7/site-packages/gitchangelog.rc.reference
On pip 7.x, it extracts to:
~/.virtualenvs/citrus/gitchangelog.rc.reference
@ vaab: Would you consider checking #36 that might also fix this. It's somewhat old now, so I'm not sure.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.