~racb/git-ubuntu:lint-fixes-2

Last commit made on 2017-07-26
Get this branch:
git clone -b lint-fixes-2 https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
lint-fixes-2
Repository:
lp:~racb/git-ubuntu

Recent commits

bbce3a0... by Robie Basak

GitUbuntuRepository: silence noise on __init__

logging.info() writes to the terminal by default, so do not use it in
such a common place. Library code shouln't write to the terminal except
by request of the caller.

bf347a7... by Robie Basak

lint: rewrite update-maintainer check

I'm not sure what the logic of the check was before, but it didn't work
(false negatives), so I've rewritten it. All I do is run
update-maintainer and check that it changes nothing. Since
update-maintainer is idempotent, this should always work as far as I can
see.

I'm still dubious about the clobbering of the working tree when
generating the tree object that corresponds to an update-maintainer run,
but this is not a regression and can be fixed in a future commit.

2c6edcb... by Robie Basak

lint: further ret carry forward fixes

Previous failures ret were being clobbered. This is what I mean by this
pattern being error-prone :-)

ddaba62... by Robie Basak

lint: document do_merge_lint parameters

1cf22c4... by Robie Basak

lint: be more specific about return types

These methods definitely return tree objects, not any generic treeishs.

d88d203... by Robie Basak

lint: fix try/finally error paths

finally always runs, so it is incorrect to have code in there that
relies on the try section having succeeded.

I'm not sure it's right to clobber the working directory like this, but
that can be fixed in separate commits.

b5d0214... by Robie Basak

lint: correctly report lint failures on failures

We haven't agreed the best pattern to use for this yet. But currently
the return value of GitUbuntuLint.do_change_lint() is outright wrong,
returning only the status of the final check instead of all the checks
processed.

Fix this, at least for now, by correctly combining the results.

4d59fc3... by Robie Basak

lint: fix SRU version check

In the case that a proposed SRU is the first update for a given stable
series, the previous changelog entry will list a Debian codename such as
"unstable". versioning.next_sru_version against "unstable" has no
meaning. The call to it failed with a StopIteration when
GitUbuntuLint._next_sru_version() tried to find a matching Ubuntu series
object in Launchpad called "unstable".

Instead, ditch GitUbuntuLint._next_sru_version() and just use the series
derived from the debian/changelog target to determine which series the
proposer is targeting for the SRU. versioning.next_sru_version will look
the appropriate current series' versions from Launchpad to determine the
answer, so there is no need for us to do it.

43c4271... by Nish Aravamudan

git ubuntu lint: drop stray change

I accidentally introduced this in my last bugfix.

640bcda... by Nish Aravamudan

git ubuntu lint: properly support --lint-namespace