diff --git a/docs/features/django-fork.rst b/docs/features/django-fork.rst index 56e3027..b24f3fd 100644 --- a/docs/features/django-fork.rst +++ b/docs/features/django-fork.rst @@ -33,9 +33,10 @@ organisation rather than a personal account: django = "git@github.com:django/django.git" # Map each local (fork) branch to the upstream branch it tracks. - # Only branches whose upstream stable/.x still exists are listed. + # Branches tracking a released Django version map to its stable/.x + # branch; the in-development version tracks Django's main branch. [repo.groups.django.upstream_branch] - django = {"mongodb-6.1.x" = "stable/6.1.x", "mongodb-6.0.x" = "stable/6.0.x", "mongodb-5.2.x" = "stable/5.2.x"} + django = {"mongodb-6.2.x" = "main", "mongodb-6.1.x" = "stable/6.1.x", "mongodb-6.0.x" = "stable/6.0.x", "mongodb-5.2.x" = "stable/5.2.x"} # Branch checked out automatically right after cloning [repo.groups.django.preferred_branch] @@ -238,16 +239,24 @@ validate a rebase with no PR involved, or when no suitable PR run exists yet Adding a new release branch ---------------------------- -When Django cuts a new stable branch (for example ``stable/6.2.x``) and you -create a matching ``mongodb-6.2.x`` fork branch, add the mapping to -``upstream_branch`` so ``dbx sync`` knows where to rebase it: +A fork branch that tracks an unreleased Django version maps to Django's +``main`` branch. For example ``mongodb-6.2.x`` currently tracks ``main`` +because Django 6.2 has not been released: + +.. code-block:: toml + + [repo.groups.django.upstream_branch] + django = {"mongodb-6.2.x" = "main", "mongodb-6.1.x" = "stable/6.1.x", ...} + +Once Django cuts the matching stable branch (for example ``stable/6.2.x``), +update the mapping to point at it: .. code-block:: toml [repo.groups.django.upstream_branch] django = {"mongodb-6.2.x" = "stable/6.2.x", "mongodb-6.1.x" = "stable/6.1.x", ...} -Until the mapping exists, ``dbx sync`` cannot determine the correct upstream +Until a mapping exists, ``dbx sync`` cannot determine the correct upstream target for that branch and falls back to upstream's default-branch detection, which is almost certainly not what you want for a release branch. diff --git a/src/dbx_python_cli/config.toml b/src/dbx_python_cli/config.toml index d353640..60c7ae4 100644 --- a/src/dbx_python_cli/config.toml +++ b/src/dbx_python_cli/config.toml @@ -184,10 +184,11 @@ django-mongodb-extensions = "git@github.com:mongodb-labs/django-mongodb-extensio # Required when the local branch name differs from the upstream branch (e.g. mongodb-6.0.x → stable/6.0.x). # Only branches whose upstream target currently exists are listed here. Add a branch once # Django cuts its stable/.x branch; drop it once that upstream branch is deleted (EOL). -# Not currently mapped: mongodb-5.0.x / mongodb-5.1.x (upstream stable branches deleted, EOL) and -# mongodb-6.2.x (Django 6.2 is still on main; add stable/6.2.x here once it is branched). +# mongodb-6.2.x currently tracks Django's main branch (Django 6.2 is unreleased); switch it to +# stable/6.2.x once Django cuts that branch. +# Not currently mapped: mongodb-5.0.x / mongodb-5.1.x (upstream stable branches deleted, EOL). [repo.groups.django.upstream_branch] -django = {"mongodb-6.1.x" = "stable/6.1.x", "mongodb-6.0.x" = "stable/6.0.x", "mongodb-5.2.x" = "stable/5.2.x"} +django = {"mongodb-6.2.x" = "main", "mongodb-6.1.x" = "stable/6.1.x", "mongodb-6.0.x" = "stable/6.0.x", "mongodb-5.2.x" = "stable/5.2.x"} # Custom test runner configuration: specify test runner script for repos that don't use pytest [repo.groups.django.test_runner]