~nacc/git-ubuntu:changelog-parsing

Last commit made on 2017-08-11
Get this branch:
git clone -b changelog-parsing https://git.launchpad.net/~nacc/git-ubuntu
Only Nish Aravamudan can upload to this branch. If you are Nish Aravamudan please log in for upload directions.

Branch merges

Branch information

Name:
changelog-parsing
Repository:
lp:~nacc/git-ubuntu

Recent commits

75a311c... by Nish Aravamudan

versioning: fix import order

9dc63a4... by Nish Aravamudan

git_repository: parameter type in names

No functional change.

b0fb1fd... by Nish Aravamudan

Refactor changelog parsing

Replace the shell-based symlink workaround with a proper implementation
that uses pygit2 directly. This results in a significant speedup.

Use debian.changelog to parse the changelog. Since this is a
hash-stability-affecting change, potentially, fail hard if the old and
new parsing produce different results.

get_changelog_versions_from_treeish() previously returned (None, None)
if 'debian/changelog' was not in the supplied tree-ish. This was not
documented and happened implicitly due to the shell fallback behaviour
in parsing debian/changelog.

This is a cherry-pick of an initial implementation by Robie Basak,
adapted to the current state of the code base.

a29c90d... by Nish Aravamudan

git_repository::Changelog: properly return None if a version is not found

Before this change, test 1 was failing, because previous_version would
return '' if no previous version was in the changelog.

b02137a... by Nish Aravamudan

git_repository: add changelog parsing tests

Test 1 currently fails, but will be fixed in a follow-up commit.

87a7c0e... by Nish Aravamudan

Refactor changelog parsing to allow for unit testing

Create an internal Changelog class that encapsulates the use of
dpkg-parsechangelog and sed/grep.

Drop parse_changelog_field, in favor of common properties that know how
to call dpkg-parsechangelog and the shell parsing.

09aadc3... by Nish Aravamudan

git ubuntu clone/remote: be more verbose

Request the `git fetch` calls go to stdout/stderr.

LP: #1707225

a36dec4... by Nish Aravamudan

run: rename verbose to verbose_on_failure

At least as currently implemented it is not a generic verbose flag
(nothing gets emitted if the command succeeded, e.g.).

6efc743... by Nish Aravamudan

gitubuntu: switch internal variables from quiet to verbose

For consistency, use the same variable name throughout.

Also adjusts some formatting based upon coding style decisions.

Should result in no functional changes.

e1ce879... by Nish Aravamudan

git_repository: if verbose is True, emit stdout/stderr to console