Thursday 18 July 2024

Re: git-ubuntu and closing merge proposals automatically

Hi!

On Thu, Jul 18, 2024 at 02:44:31PM +0300, Dmitry Shachnev wrote:
> Do we have any documentation about Vcs-Git-Commit and Vcs-Git-Ref fields in
> changes files?

I've been working on documentation here:
https://canonical-git-ubuntu.readthedocs-hosted.com/en/latest/

> They are generated by git-ubuntu, and as I understood, they should get the
> merge proposal automatically merged by the importer. But yesterday I tried it,
> and my changes file [1] did have these links, however the merge proposal [2]
> was not closed.

See:

https://canonical-git-ubuntu.readthedocs-hosted.com/en/latest/explanation/design_goals_and_principles.html#integrity-requirements

and later on the same page:

https://canonical-git-ubuntu.readthedocs-hosted.com/en/latest/explanation/design_goals_and_principles.html#rich-history

In this case it looks like you added the changelog entry, so the commit
supplied in the changes file did not match the upload you performed. In
this case, for integrity reasons the git-ubuntu importer will reject the
supplied commit and synthesize its own to ensure that the final commit
matches the upload.

One way to handle this case (before upload is to make your own fixup
commits, push these to your own namespace, and then supply your own
commit in the changes file.

Once you have your fixup commits ready, `git ubuntu prepare-upload args`
can arrange this for you. See:

https://canonical-git-ubuntu.readthedocs-hosted.com/en/latest/howto/upload.html

I'll mark that particular MP as Merged manually for you. Thank you for
sponsoring!

HTH!

Robie