remove old information (Dec-2019) for migrating repositories

Mark Olesen
2021-12-17 14:53:25 +01:00
parent 772116c6b8
commit 51416984ca
6 changed files with 1 additions and 15149 deletions

@ -1,171 +0,0 @@
<!-- --- title: Migrating the OpenFOAM repository -->
[![home](/icons/home.svg "wiki home")](/home)
[[_TOC_]]
## Migrating the OpenFOAM repository
As of December 2019, the OpenFOAM repository is available as
[openfoam][foam-repo], with an older version available as
[OpenFOAM-plus][old-foam-repo].
The repository change does **not** reflect functional alterations in the
code, but rather git-related _maintenance_ and _structural_ changes.
### Background
The time-line for the repository revamping was triggered by external
circumstances - one of which being the inordinately long times
required to clone the repository when packaging from sources.
With the repository updates, its size has been shrunk by 80% and is
now currently around 200-210 MB instead of 900MB. The maintenance effort
removed some _binary bombs_ (e.g., simulation results that had been
inadvertently added over the years) and other artefacts that caused
the repository to bloat, while preserving the change history.
This benefit is unfortunately associated with a significant aggravation
for those developers who have been actively working with the latest
development versions. ***We sincerely apologize for the difficulties
that this incurs***. We are all too aware of how annoying this is,
since we too are directly affected by the same issue.
Since all commits and branch histories in git are secured with SHA1
signatures, any changes will result in new SHA1 values for the
commits. So even when file-tree contents are identical, the SHA1 of
two individual commits likely are not.
### Moving forward
To properly delineate the repositories, we have taken the
[`maintenance-v1812`][main-1812] branch as the cut-point. This branch
and older branches are essentially *retired* and preserved on the [old
OpenFOAM-plus repository][old-foam-repo], whereas the
[`master`][master] branch (currently the bugfix branch for `v2006` at
the time of writing) and obviously the [`develop`][develop] branch are
both being actively worked upon within the [improved OpenFOAM
repository][foam-repo].
To reduce confusion, `master` and `develop` branches
have been expunged from the old repository. This circumvents the
possibility of duplicate commits or forgotten commits that would
otherwise occur if both repositories covered the same active code
range.
### Migrating your code
The file contents of the previous `master` and `develop` branches have been preserved and it should be possible to migrate any user code provided that it can be `rebased`. A mapping from the old-to-new commit hashes is [available here](uploads/89c19da374e3d6e281d14f84a9f34b55/old-to-new.map).
To migrate your code, clone the new repository (shown here using HTTPS) and change working directory into it:
```
cd $HOME/OpenFOAM
git clone https://develop.openfoam.com/Development/openfoam.git
cd openfoam
```
Add your local repository as a remote which will be referred to by the alias 'local-repo'
```
git remote add local-repo <path-to-local-repo>
```
For example:
```
git remote add local-repo $HOME/OpenFOAM/OpenFOAM-plus
```
Fetch the your local code changes (commits)
```
git fetch local-repo
```
At this point you can apply your local change commits to the latest `master` or `develop` branches using git-format-patch and git-cherry-pick (see below). Alternatively, if you would like to re-apply your changes to the equivalent starting point in the new repository continue to the next section.
#### Recovering an old branching location
Skip this section if you would like to apply your local changes to the latest master/develop branches.
Use the SHA1 mapping from [old-to-new](uploads/89c19da374e3d6e281d14f84a9f34b55/old-to-new.map) to find your starting/base commit. For example, if your branching point was `XXXX` identify the equivalent commit (noted `YYYY` later) in the new repository using:
```
grep XXXX old-to-new.map
```
Note that git offers the `merge-base` command to identify your branching point (XXXX) from your old repo/local branch to the old OpenFOAM-plus develop branch :
```
git merge-base HEAD origin/develop
```
Note: if you branched from the 'master' branch, replace 'origin/develop' by 'origin/master'.
Start by creating a new branch from the equivalent commit (YYYY) in the new repository:
```
git checkout -b new-base YYYY
```
Reintroduce your changes, e.g. using git-format-patch or git-cherry-pick (see below). These should apply relatively cleanly - if there are conflicts you will need to perform additional integration updates.
#### Using git-format-patch
This will extract all your changes into a single text file which can then be 'replayed' onto the new repository. From your current repository (with your own code changes):
```
git format-patch origin/develop --stdout > new_patches.patch
```
Change to new repository - make sure you are on your new-base branch
```
git am new_patches.patch
```
#### Using git-cherry-pick
This method enables you to introduce your change commits one at a time. This is generally preferable since it is easier to resolve any conflicts one-by-one.
```
git cherry-pick <commit>
```
If you have a range of commits to re-apply, you can also use the following syntax
```
git cherry-pick <oldest-commit>..<newest=commit>
```
Thank you for your understanding and we hope that you enjoy using the more streamlined repository
#### Additional points
The default _development_ version was previously designated `plus`.
This has now changed to `com`.
This informal naming convention is now also noted in the bashrc file:
```
# [WM_PROJECT_VERSION] - A human-readable version name
# A development version is often named 'com' - as in www.openfoam.com
export WM_PROJECT_VERSION=com
```
This change affects the following directory locations:
- `$WM_PROJECT_USER_DIR`
- `$FOAM_RUN`
- `$FOAM_USER_APPBIN`
- `$FOAM_USER_LIBBIN`
If you have been using the `run` _alias_ in the development version,
the location will also have changed accordingly.
----
Copyright (C) 2019-2020 OpenCFD Ltd.
[foam-repo]: https://develop.openfoam.com/Development/openfoam/
[master]: https://develop.openfoam.com/Development/openfoam/tree/master
[develop]: https://develop.openfoam.com/Development/openfoam/tree/develop
[old-foam-repo]: https://develop.openfoam.com/Development/OpenFOAM-plus/
[main-1812]: https://develop.openfoam.com/Development/OpenFOAM-plus/tree/maintenance-v1812

@ -16,9 +16,6 @@ features (such as reporting issues), users must create an account.
| [ThirdParty][third-repo] build scripts | [issues][third-issues] |
| Additional [modules][all-modules] | _individual_ |
_If you have been using the [older OpenFOAM git repository][old-foam-repo] (prior to DEC-2019)
and have code you need to migrate, you should see the [repository migration](Repository-migration) information._
[[_TOC_]]
@ -166,6 +163,4 @@ Copyright (C) 2019-2020 OpenCFD Ltd.
[master]: https://develop.openfoam.com/Development/openfoam/tree/master
[develop]: https://develop.openfoam.com/Development/openfoam/tree/develop
[old-foam-repo]: https://develop.openfoam.com/Development/OpenFOAM-plus/
[v1712-notes]: https://www.openfoam.com/news/main-news/openfoam-v1712

@ -74,13 +74,6 @@ A non-exhaustive list (check the corresponding files for more detail):
| surfaceWriter.H | Foam_surfaceWriter_directAccess |
## Repository migration
As of December 2019, the OpenFOAM repository is named [*openfoam*][foam-repo].
If you have an older version using [*OpenFOAM-plus*][old-foam-repo]
as a repository, you should read information about [repository migration](/Repository-migration).
### Post-process utility
* The [postProcess upgrade](/upgrade/v1612-utility-postProcess); utility and solver option.
@ -150,4 +143,3 @@ Copyright (C) 2019-2021 OpenCFD Ltd.
[code-patterns]: /coding/patterns/patterns
[foam-repo]: https://develop.openfoam.com/Development/openfoam/
[old-foam-repo]: https://develop.openfoam.com/Development/OpenFOAM-plus/

@ -20,8 +20,7 @@ as _advanced_ / _legacy_ and moved further out of reach.
### Change in default development version naming
The default _development_ version was previously designated `plus`.
This has now changed to `com` as part of the
[repository migration](/Repository-migration).
This has now changed to `com` as part of the repository migration.
This informal naming convention is now also noted in the bashrc file:
```
# [WM_PROJECT_VERSION] - A human-readable version name

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff