I prepared an upload by cloning a git-ubuntu repository and committing some changes locally. As an Ubuntu developer, I have permission to upload to the archive. What do I need to do to upload my changes correctly?
You have two options.
1. Upload without rich history preservation
dput as normal without doing anything further. After Launchpad accepts your upload, the git-ubuntu importer will pick it up and synthesize a commit that matches it. Branch pointers in the git-ubuntu repository will be updated accordingly.
This is the default outcome and means that existing developers' workflows are not forced to change.
This does mean that a richer set of commits that you may have made locally will not be preserved in git-ubuntu's "offical" repository for the package.
You'll notice that this is how the majority of uploads in git-ubuntu today were imported—because we don't have rich history for historical uploads.
2. Upload with rich history preservation
The design of git-ubuntu allows for full preservation of your commits by adopting them into the "official" record. However the implementation is not yet complete. For now, we have a stop-gap measure that allows for rich history preservation but unfortunately this does require some manual steps.
Note that this only applies to Ubuntu uploaders.
If you need a sponsor, please ask your sponsor to review first, since preservation of something that does not exactly match the subsequent upload will not work. Remember that rich history preservation is optional. Please don't assume that your sponsor is willing to follow this process.
dput, ask a member of ~usd-import-team to make your rich history visible to the importer to adopt. As soon as the importer service sees the package upload in Launchpad, it will look for this rich history and synthesize a commit if it cannot be found, which is why this must be done before
The easiest way to supply ~usd-import-team with your rich history is via a link to a merge proposal. Note that there is not yet any general process that ensures that merge proposals against git-ubuntu branches are reviewed. Please arrange that yourself or self-approve as you wish; when you are ready to
dput, send us a link to the merge proposal for the rich history preservation step only.
Future short term process
Now that Launchpad per-ref ACL support is ready, we hope to be able to allow Ubuntu uploaders to push rich history to be visible to the importer directly, taking away the latency of the extra human step currently required.
Long term intended process
Eventually, we intend for the git-ubuntu importer service to be able to pick up rich history directly from merge proposals or similar.
Why does this seem obtuse?
The git-ubuntu repository is intended to reflect the single source of truth, which for Ubuntu is Launchpad publications of Ubuntu packages. Ubuntu developers upload package updates; these get published, and the git repository is expected to reflect these publications. This is the opposite of other development projects where the flow is the opposite: normally developers push to git, and make releases from git.
To prevent the git repository from mismatching Launchpad publications, it is necessary to ensure that git-ubuntu branch updates exactly match their corresponding Launchpad publications before they are pushed. We achieve this by restricting pushes to the git-ubuntu importer service only. The importer service will adopt rich history provided by the uploader only if it exactly matches the Launchpad publication it is importing. If the provided rich history doesn't match, or if rich history is not provided, then the importer will instead synthesize a commit that exactly matches the Launchpad publication it is importing.
This means that we need some way to provide rich history to the git-ubuntu importer service, which should explain the three options detailed above.