Daniel Dehennin <daniel.dehen...@baby-gnu.org> writes: Hello,
[...] > I still don't know what to do with the "version not found error" With this new version of my patch, guess_snapshot_commit is called if the changelog was just created. The "version not found error" remains when there was no previous debian/changelog. For this case, we could find the merge-base between upstream tag/branch and HEAD. What do you think about that last idea? Regards. The following changes since commit f495df9857d9738cb7ed2200d3124fca6372f990: Refactor deb helpers: move UpstreamSource class (2012-05-01 22:29:29 +0200) are available in the git repository at: git://git.baby-gnu.org/git-buildpackage tags/dad/create-inexistant-changelog/rebasable/on-f495df9-1 for you to fetch changes up to 9d3a4e7ac2c21af25771259dc8d963a1a634703f: Create debian/changelog if it does not exist. (2012-05-12 15:57:35 +0200) ---------------------------------------------------------------- Improved patch: package name is mandatory and use auto mode, plus tests fixes. Differences with previous version: Try to guess last commit when creating a new changelog. This resolve the case where a debian/changelog was removed. * gbp/deb/changelog.py (ChangeLog.create): Add the new attribute 'first' to the Changelog object. * gbp/scripts/dch.py (main): Guess last time debian/changelog was touched if debian/changelog is created. gbp/deb/changelog.py | 4 +++- gbp/scripts/dch.py | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) Package name is mandatory when creating a new changelog. * gbp/deb/changelog.py (ChangeLog.create): Raise an exception if package name is not provided and can not be extracted from debian/control. gbp/deb/changelog.py | 2 ++ 1 file changed, 2 insertions(+) Commit logs of add and removal of debian/changelog do not contain final dot. * tests/11_test_changelog_create.py (TestScriptDch.test_create_without_upstream_log): Remove dot. (TestScriptDch.test_create_after_delete): Ditoo. (TestScriptDch.test_create_from_dch_main): Ditoo. (TestScriptDch.test_create_from_dch_main_with_auto): Ditoo. (TestScriptDch.test_create_from_dch_main_with_snapshot): Ditoo. (TestScriptDch.test_create_from_dch_main_after_delete): Ditoo. (TestScriptDch.test_create_from_dch_main_with_auto_snapshot): Ditoo. (TestScriptDch.test_create_from_dch_main_with_auto_after_delete): Ditoo. (TestScriptDch.test_create_from_dch_main_with_snapshot_after_delete): Ditoo. (TestScriptDch.test_create_from_dch_main_with_auto_snapshot_after_delete): Ditoo. tests/11_test_changelog_create.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) ---------------------------------------------------------------- Daniel Dehennin (1): Create debian/changelog if it does not exist. gbp/deb/changelog.py | 40 +++++++++ gbp/scripts/dch.py | 11 ++- tests/11_test_changelog_create.py | 164 +++++++++++++++++++++++++++++++++++++ 3 files changed, 213 insertions(+), 2 deletions(-) create mode 100644 tests/11_test_changelog_create.py -- Daniel Dehennin Récupérer ma clef GPG: gpg --keyserver pgp.mit.edu --recv-keys 0x7A6FE2DF
pgpES1qkgDI0o.pgp
Description: PGP signature