~racb/git-ubuntu:merge-fixes

Last commit made on 2017-08-14
Get this branch:
git clone -b merge-fixes 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:
merge-fixes
Repository:
lp:~racb/git-ubuntu

Recent commits

c374f23... by Robie Basak

Refactor merge subcommand commitish handling

As we're now fetching a commitish object, use that to get the
treeish_string directly instead of looking it up again. This is cleaner
as it avoids the dual lookup, but my main motivation is that it isolates
the "treeish string"-ness more for eventual removal.

8441c69... by Robie Basak

Remove catch-all exception

We get a KeyError if a key doesn't exist, so catch that explicitly
instead of generally.

db059d6... by Robie Basak

get_changelog_versions_from_treeish: more docs

5068e83... by Robie Basak

Correctly parse treeish string

A "treeish string" may be something like 'ubuntu/devel', which is a
reference and not a git object id, so cannot be given directly to
pygit2.Repository.get(). Instead we must use
pygit2.Repository.revparse_single().

This fixes a regression in 'git ubuntu merge start ubuntu/devel', which
otherwise passed 'ubuntu/devel' as the treeish_string and failed.

5c54348... by Nish Aravamudan

git ubuntu lint: unexpected changes between deconstruct and logical are errors

We were implicitly returning False, but not emitting a message. Add a
message and documentation.

LP: #1710015

0ca6285... by Nish Aravamudan

git ubuntu lint: propogate unexpected hunks up in _check_deconstruct_to_logical_patch

We were unconditionally returning True from this code, but setting a
local variable to False (which we intended to propogate back to the
caller). Introduce a variable to track the per-hunk success/failure and
then a higher-level variable to track the patch success/failure and
return that.

cebf7f8... by Nish Aravamudan

git ubuntu import: recursively force-delete .pc before patches-applied import

The .pc directory may contain files, so recursively delete it. Since we
are affecting the working-directory, force remove as well.

While here, update the coding style in this area.

LP: #1709696

c2f6c08... by Nish Aravamudan

git ubuntu lint: modify importer branch determination to favor -devel

Add three logical checks on the potential branches to use:

1) All are from the same series (e.g., "xenial")
2) All correspond to the same git tree
3) <series>-devel is one of the potential branches

If all three conditions are satisfied, use the -devel branch. Provide
better messages for which condition failed.

Add some basic unit tests.

LP: #1706976

623ce42... by Nish Aravamudan

git_repository: modify nearest_target_branch to return pygit2.Branch objects

Update callers to match (including variable names).

b755570... by Nish Aravamudan

git ubuntu submit: clarify that we are using head names not objects

No functional change.