~racb/git-ubuntu:commit-message-spec

Last commit made on 2020-04-09
Get this branch:
git clone -b commit-message-spec 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:
commit-message-spec
Repository:
lp:~racb/git-ubuntu

Recent commits

1c54cd3... by Robie Basak

Add explanatory comments on changelog notes

35da7eb... by Robie Basak

Configure notes.displayRef on clone

When "git ubuntu clone" runs, also configure notes.displayRef so that
changelog notes display in "git log" automatically.

In the future this behaviour might change to be configurable, but this
default case seems reasonable to do for an initial implementation.

73d62e7... by Robie Basak

Fetch changelog notes on "git ubuntu clone"

When "git ubuntu clone" runs, set up the fetch refspec to also fetch any
changelog notes.

6ff4d8d... by Robie Basak

Push and pull changelog notes

Until Launchpad-hosted cgit supports configuration of notes.displayRef,
we use refs/notes/commits remotely to get the cgit display to work. This
is LP #1871838.

When fetching prior to importing, fetch refs/notes/commits into the
correct local ref (eg. refs/notes/importer/changelog), and vice-versa on
push.

37ea808... by Robie Basak

Drop upload_parent_commit from _commit_import

_commit_import no longer needs the upload_parent_commit parameter, so
drop this from its parameter list and remove its mention as we go up the
graph.

9323899... by Robie Basak

Drop target_head_name from _commit_import

_commit_import no longer needs the target_head_name parameter, so drop
this from its parameter list and remove its mention as we go up the call
graph.

2246843... by Robie Basak

Simplify get_import_commit_msg

Now that commit messages are no longer dependent on various things, they
can be removed from the parameter list of get_import_commit_msg(), and
callers simplified.

We can explicitly use patch_state instead of inferring it from the
now-defunct overloading of upload_parent_commit.

061371a... by Robie Basak

Adjust to new commit message standard

Adjust commit messages to meet a precise standard. This allows for
reproducible imports.

Text is adjusted for conciseness. Hyphenation of "patches-applied" and
"patches-unapplied" is dropped as this is intended to be human readable
text.

The embedding of the branch name is removed. Since commits are now
shared between publications of multiple pockets, doing this no longer
makes sense.

Embedding of changelog messages into the commit messages themselves is
removed, since non-determinism in behaviour is expected for edge cases,
and this would disrupt reproducibility. See LP #1633114 for more on
this. Changelog messages are added to git notes instead.

This fixes the expected output of test_get_import_tag_msg, so the skip
on that test (from the previous change) is removed.

69bc940... by Robie Basak

Fix test patch heisenbug

This test monkey patches the code base but does not restore it, breaking
behaviour and invalidating future tests.

The behaviour here is about to change such that the patching will no
longer be required, so it isn't worth fixing the patching. Instead, we
break the test and skip it for now. The skip will be dropped after the
upcoming change when everything will work again.

4bdd58d... by Robie Basak

Invert _commit_import return value

Switch _commit_import to return a pygit2.Commit instead of a hash
string.

We're moving to using fully Pythonic objects across the code base. This
switches the conversion burden to the legacy code. Eventually all legacy
code will be replaced or adjusted so the conversions will become
unnecessary.