~racb/git-ubuntu:more-project-rename

Last commit made on 2022-08-04
Get this branch:
git clone -b more-project-rename 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:
more-project-rename
Repository:
lp:~racb/git-ubuntu

Recent commits

4d497a7... by Robie Basak

Add comment on missing observability

This should help locate the older emailing code should it be needed in
the future.

06f0eca... by Robie Basak

More project renames

This is a followup to commits 57e5776, 002e452, 2f0e855 and 5aad111 with
further cleanups around the project rename from usd-importer to
git-ubuntu and the move to the <email address hidden>
mailing list. Thanks to Bryce for spotting some of the remaining pieces.

Where code is no longer used at all, or docs are completely out-of-date,
I've removed it instead of renaming the relevant bits. I've not worried
too much about fixing docs that I've touched if there's some value to
them staying, as that's a bit of a rabbit hole and I'd prefer to make
incremental progress.

0e3ca5f... by Robie Basak

submit: default to ~canonical-server-reporter

On the Canonical Server Team, we have been using ~canonical-server in
its own review slot for the sole purpose of gathering all reviews we're
interested in tracking together on this team's +activereviews page.

A problem with this is that we all belong to this team, so when a person
does a review, they sometimes accidentally "grab" that slot, so it
appears as their name rather than the team's, and thus disappears from
the report.

One way around this is to use a separate team that none of us actually
belong to. This way we can't "grab" that slot.

This changes the default team to this new ~canonical-server-reporter
team to help those who use the "git ubuntu submit" command.

ab3351a... by Robie Basak

Improve documentation on validation constants

This should hopefully do a better job of signposting anyone who wants to
change the constants to better understand the implications of doing so.

c8216a7... by Robie Basak

Add test to accept refs that contain '+'

5b0868f... by Sergio Durigan Junior

Accept ref names containing plus sign

Currently, if the ref name contains a plus sign, git ubuntu will fail
due to the following assertion error:

Traceback (most recent call last):
  File "/snap/git-ubuntu/891/usr/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==1.0', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/891/usr/lib/python3/dist-packages/gitubuntu/__main__.py", line 270, in main
    sys.exit(args.func(args))
  File "/snap/git-ubuntu/891/usr/lib/python3/dist-packages/gitubuntu/prepare_upload.py", line 170, in cli_printargs
    headers = push(
  File "/snap/git-ubuntu/891/usr/lib/python3/dist-packages/gitubuntu/prepare_upload.py", line 118, in push
    assert gitubuntu.importer.VCS_GIT_REF_VALIDATION.fullmatch(ref.name)
AssertionError

However, branch names (which compose ref names) are allowed to contain
the plus sign. This commit expands the VCS_GIT_REF_VALIDATION regexp
to accept that.

FWIW, I triggered this assertion when I named my branch after the
Debian release I was merging (for the net-snmp package):

  merge-5.9.1+dfsg-4-kinetic

2133870... by Robie Basak

Refactor _head_version_is_equal

Add a docstring, refactor the code to make it more readable, and rename
the method to match its definition better.

This should not result in any functional change.

0b8cc0b... by Robie Basak

Rewrite launchpad_versions_published_after

The logic in this method can be simplified significantly with a rewrite.
To mitigate any regression, a parametrized unit test is added with the
expected behaviour thought out from the importer spec.

There is still an inefficiency present here. In theory we could skip
importing pocket copies if the branch corresponding to a pocket is
up-to-date. However, currently the algorithm only matches against the
exact date_created attribute of the Launchpad publication object against
which a particular version was first imported. To ensure that branches
are updated if any new pocket copies have occurred, we must "replay"
them all through the importer. Therefore there is potential here for a
future performance improvement.

9addaa0... by Robie Basak

launchpad_versions_published_after: drop return

This return statement is redundant since it's at the end of the method
anyway.

a11bfa8... by Robie Basak

launchpad_versions_published_after: refactor call

We don't need to set args and then call with **args, given that is all
we do with it. Instead, just call self.archive.getPublishedSources()
with keyword arguments directly.