Skip to content
Snippets Groups Projects

Scripts to use mCBM 2024 separate forks

Merged Pierre-Alain Loizeau requested to merge p.-a.loizeau/cbmroot:mcbm24_ownforks into master
5 files
+ 429
0
Compare changes
  • Side-by-side
  • Inline
Files
5
+ 59
0
# Usage
**All these scripts need you to have sourced the login script first!!!! (for VMCWORKDIR)**
1. Initialization and switch between the `Official detached commit` and the `mCBM repository HEAD` mode: just execute
the following script
```
./macro/beamtime/mcbm2024/switch_geo_par.sh
```
1. Rebasing Cbmroot
1. Commit **and push** any local files/changes if you were in "mCBM mode" and did local changes in either the
geometry or parameters folders. Otherwise the rebase script will not do anything or they
1. Execute the following script. \
It relies on the presence of a remote pointing to the offical version (e.g. `origin` or `upstream`) and may ask
for some login information when fetching the latest changes depending on your remote definition.
```
./macro/beamtime/mcbm2024/rebase_cbmroot.sh
```
Rebasing directly from the CLI without caring about the state of the geo and params folders will fail if they are
in "mCBM mode" and may lead to a broken local copy \
=> As soon as you start using the `switch_geo_par.sh` script in a Cbmroot copy, rebase it only with this script!!!
1. Updating/rebasing the mCBM versions of the geometry and parameters folders: just execute the following script
```
./macro/beamtime/mcbm2024/update_geo_par.sh
```
=> This will bring in the local copy the latest changes from the remote branch in the mCBM fork \
=> This will also ensure the local copies are compatible with a fast-forward push to the remote branch in the mCBM
fork (force-push or any git history changes are not allowed).
1. Commiting changes
- Either do it by hand in the geometry/parameters folders (they are independent git clones)
- Or use the following script. This will take care of making a single commit for each of the two folders,
prepare them for a fast-forward push and push them. You will probably be asked for some login/password.
```
./macro/beamtime/mcbm2024/commit_push_geo_par.sh
```
=> This script was not 100% tested as the original author (@p.-a.loizeau) did not have local changes to push \
=> **But all individual commands were tested and the scripts was checked with a semantics checker!**
# CAVEATS
1. The mCBM repository branch will not be rebased on the official version as that would break the local copies of all
users
1. => If somebody in mCBM need some files/changes from the official version, they will have to `cherry-pick` them or
copy them by hand into a new commit on top of the current state of the mCBM branch
1. After the end of the period where this branch is used, **somebody from the mCBM team** (not one of the central
developers) will have invest the time to cleanup a copy of the branch and prepare clean merge requests to the
official repositories
1. These scripts allow only to work on the `mcbm24_master branch` of the "mcbm versions" and go back to the "offical
versions" \
=> Switching to another branch or a different detached commit than the "official version" will confuse them \
=> This in turn has high chances to lead to broken copies of the `geometry` and/or `parameters` folders
1. **All these scripts apart from the one to commit changes will work only on clean copies!!!** \
=> local changes have to be either committed or deleted/reverted before using them!!! \
=> This also means that the scripts will all switch to the latest remote version. So doing "mcbm > official > mcbm"
may lead to a different commit! And local commits which are not yet pushed may be lost!
1. Space needed:
- around `100 MB` for geometries
- around `1.6 GB` for parameters
Loading