From 7dd27f459dd8daa9c665bd8992356b22706c48aa Mon Sep 17 00:00:00 2001 From: Maja Massarini Date: Mon, 28 Oct 2024 11:12:13 +0100 Subject: [PATCH] Add blog post for non-divergent dist-git branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Laura Barcziová <49026743+lbarcziova@users.noreply.github.com> Co-authored-by: Matej Focko --- .../dist-git-onboarding.md | 2 +- docs/fedora-releases-guide/index.md | 2 +- .../non-divergent-dist-git-branches.md | 5 ++-- .../non-divergent-dist-git-branches/index.md | 29 +++++++++++++++++++ 4 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 posts/non-divergent-dist-git-branches/index.md diff --git a/docs/fedora-releases-guide/dist-git-onboarding.md b/docs/fedora-releases-guide/dist-git-onboarding.md index 0599f07e3..29d1a38a1 100644 --- a/docs/fedora-releases-guide/dist-git-onboarding.md +++ b/docs/fedora-releases-guide/dist-git-onboarding.md @@ -88,7 +88,7 @@ and not from `upstream_project_url`. You can check the other customization options [here](./index.md#customization). :::info Divergent dist-git branches -By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md). +By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the configuration details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md). ::: diff --git a/docs/fedora-releases-guide/index.md b/docs/fedora-releases-guide/index.md index d2d17319b..7f6e06ec8 100644 --- a/docs/fedora-releases-guide/index.md +++ b/docs/fedora-releases-guide/index.md @@ -197,7 +197,7 @@ you should specify the [`upstream_tag_template`](/docs/configuration/#upstream_t via [`files_to_sync`](/docs/configuration/#files_to_sync) configuration key. - By default, Packit downloads sources defined in the spec file that contain URLs. You can override these URLs via [`sources`](/docs/configuration#sources) configuration key. -- By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md). +- By default, release syncing can result in divergent dist-git branches. To prevent this, refer to the configuration details [here](/docs/fedora-releases-guide/non-divergent-dist-git-branches.md). ##### Actions - use your own commands/scripts diff --git a/docs/fedora-releases-guide/non-divergent-dist-git-branches.md b/docs/fedora-releases-guide/non-divergent-dist-git-branches.md index 16a1ae8ad..3ae1d9e85 100644 --- a/docs/fedora-releases-guide/non-divergent-dist-git-branches.md +++ b/docs/fedora-releases-guide/non-divergent-dist-git-branches.md @@ -1,9 +1,9 @@ --- -title: non-divergent dist-git branches +title: Non-divergent dist-git branches sidebar_position: 7 --- -# non-divergent dist-git branches +# Non-divergent dist-git branches To prevent your dist-git branches from diverging, you can use the following `dist_git_branches` syntax: @@ -32,6 +32,7 @@ git merge f41 You shouldn't encounter any conflicts. However, if you have a conflict in the `.gitignore` file, it is safe to keep changes from both `rawhide` and the incoming branch. If you have a conflict in the changelog section of the specfile, ensure you **merge all the missing changelogs** into `rawhide` and list them **in the correct order** (newest changelogs first). Once `rawhide` is ready, you can proceed with: ``` +# [TODO] Adjust the releases, if needed. git checkout f39; git merge --ff-only rawhide git checkout f40; git merge --ff-only rawhide git checkout f41; git merge --ff-only rawhide diff --git a/posts/non-divergent-dist-git-branches/index.md b/posts/non-divergent-dist-git-branches/index.md new file mode 100644 index 000000000..71d23af44 --- /dev/null +++ b/posts/non-divergent-dist-git-branches/index.md @@ -0,0 +1,29 @@ +--- +title: "No more divergent dist-git branches with Packit!" +date: 2024-10-28T10:46:18+00:00 +authors: mmassari +tags: + - propose-downstream + - pull-from-upstream + - downstream + - configuration +--- + +Were you annoyed by Packit creating divergent branches in your package's dist-git repository? You'll be happy to know that Packit now supports a new `dist_git_branches` syntax that enables fast-forwarding commits between branches. + + + +## What's New + +When defining a `propose-downstream` or `pull-from-upstream` job, you can use the new `dist_git_branches` syntax. + +``` + dist_git_branches: + rawhide: + fast_forward_merge_into: [fedora-branched] + epel-9: {} +``` + +In this example, Packit runs the downstream synchronization process for the `rawhide` and `epel-9` branches as usual. Additionally, Packit opens a new pull request, reusing the commit from `rawhide`, for every `fedora-branched` branch, allowing it to be fast-forwarded when merging. + +Do you want to know more? Look at the [non-divergent dist-git branches guide](/docs/fedora-releases-guide/non-divergent-dist-git-branches)