Re-design of submodules used in blender.git #104755

Merged
Sergey Sharybin merged 12 commits from Sergey/blender:submodules_refactor into blender-v3.5-release 2023-02-21 16:40:14 +01:00

12 Commits

Author SHA1 Message Date
Sergey Sharybin 90760f6e2b Preparation for merging into Blender 3.5
buildbot/vexp-code-patch-coordinator Build done. Details
- Rebase on top of the 3.5 branch
- Pull the new state of tools and locales
2023-02-21 14:33:53 +01:00
Sergey Sharybin bdcef49356 Remove the update-code configuration from pipeline_config.yaml
It is no longer used by the buildbot: everything is defined in the
`make_update.py` script.
2023-02-21 14:27:51 +01:00
Sergey Sharybin 9e5b5e103a Ensure trailing slashes in ignored directories 2023-02-21 14:26:53 +01:00
Sergey Sharybin d39d03df5d Remove release/scripts/addons 2023-02-21 14:26:53 +01:00
Sergey Sharybin 2861ffffcd Fix typo in the .gitignore
Proper spelling of the addons_contrib
2023-02-21 14:26:53 +01:00
Sergey Sharybin cf811e69af Updates for the Brecht's review
- Move the working tree of the addons instead of copying
- Only do such moves if not using worktrees
- Ignore the subodules directories in .gitignore
2023-02-21 14:26:53 +01:00
Sergey Sharybin d291eca3b3 Update references to source/tools 2023-02-21 14:26:53 +01:00
Sergey Sharybin 5f95e23231 Buildbot: Remove locales and tools from pipeline_config
Those are managed by the main repository, no special handling
by the buildbot is needed.
2023-02-21 14:26:51 +01:00
Sergey Sharybin 787efb633e Remove check for the existence of locales
They are are now pulled with git, so no need to check for it.
2023-02-21 14:26:25 +01:00
Sergey Sharybin 1df896b3ce Fix typo spotted by Ray. 2023-02-21 14:26:25 +01:00
Sergey Sharybin 6ecfc4c343 Re-design of submodules used in blender.git
See #104573 for the full explanation.

Brief summary is:

- `addons` and `addons_contrib` are now expected to be a checkout of
  corresponding repositories inside of top-level `scripts` folder.

- `scripts` are moved from `release/scripts` to the top level.

- Developer tools and locales are embedded to the main repository,
2023-02-21 14:26:22 +01:00
Sergey Sharybin 1867d5c947 make_update: Support upstream remote workflow and update for subodules redesign
There are two aspects of the change which is a bit hard to decouple one
from another.

One part of it is to move away from submodules, as per #104573.

The change ensures that the blender-addons and blender-addons-contrib
repositories are cloned under scripts/addons and scripts/addons_contrib
respectively.

If there were configure d submodules for those repositories they are
copied over to the new location, and nothing else happens. If an upstream
workflow is desired it is to be configured manually. This ensures that
the local work is preserved as good as possible.

If there are no submodules configured then a new checkout will be done,
following the remote organization from the main repository: if there is
remote called "upstream" in the main repository, the same semantic will
be used for addons and addons_contrib.

NOTE: The submodules are never deinitialized in the local checkout, this
is to be done manually after ensuring there is no work which can be lost.

The other part of the change is to support workflow when "origin" points
to a fork, and "upstream" points to the upstream repository. This is rather
common workflow in all sort of forges like Github, Gitlab, perhaps even
Gitea. Having better support of our tools for it seems to have string
benefits.

The idea of this change is to make it so `make update` will perform the
steps needed to update the branch of the fork to the upstream version.

This includes:
- Fetch the `upstream` remote
- `git merge --ff-only upstream/branch` if the current branch exists in
  the upstream.
- If the branch does not exist in the upstream, then it will be pulled
  from the `origin` instead (the behavior prior to this change).

The same logic is implemented for the addons and addons_contrib.

The `make update` will also check for the forked addons and addons-contrib
within the same user/organization as the blender.git fork and add the
"origin" to the checkout of addons when such a fork is detected. This allows
to fork the addons repository after the `make update` has been run for the
first time.
2023-02-21 14:21:36 +01:00