Skip to content
bernuzzi edited this page Jan 25, 2025 · 4 revisions

LORENE: Langage Objet pour la RElativité NumériquE

This is a git mirror of the LORENE library CVS at https://lorene.obspm.fr/. The repo is set up using git-cvsimport

git-cvsimport

From the documentation:

git-cvsimport imports a CVS repository into Git. It will either create a new repository, or incrementally import into an existing one. Splitting the CVS log into patch sets is done by cvsps. At least version 2.1 is required.

WARNING: git cvsimport uses cvsps version 2, which is considered deprecated; it does not work with cvsps version 3 and later. If you are performing a one-shot import of a CVS repository consider using cvs2git or cvs-fast-export.

WARNING: for certain situations the import leads to incorrect results. Please see the section ISSUES for further reference.

You should never do any work of your own on the branches that are created by git cvsimport. By default initial import will create and populate a "master" branch from the CVS repository’s main branch which you’re free to work with; after that, you need to git merge incremental imports, or any CVS branches, yourself. It is advisable to specify a named remote via -r to separate and protect the incoming branches.

git-cvsimport does not apparently come with the standard git installation. On recent Ubuntu do

sudo apt-get install git-cvs

Set-up the mirror

Set the CVS root of Lorene

CVSROOT=":pserver:anonymous@octane.obspm.fr:/cvsroot" 

and do the import

git cvsimport -C lorene -r cvs -o cvs -k -d $CVSROOT Lorene

Note that this creates a new git repository, so it should be done only once. The command can take time (get a cafe...) Finally, you can do

git remote add origin git@github.com:computationalrelativity/lorene.git
git branch -M main
git push -u origin main

But you are not done ... Lorene has a couple of large files and those clash with GitHub's file size limit. The above command returns the following error:

Enumerating objects: 27256, done.
Counting objects: 100% (27256/27256), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5488/5488), done.
Writing objects: 100% (27256/27256), 127.85 MiB | 2.48 MiB/s, done.
Total 27256 (delta 21862), reused 26987 (delta 21691)
remote: Resolving deltas: 100% (21862/21862), done.
remote: error: Trace: 64a77f8b3a849f1bf2bbd53022ed82c7f192946b2a04bdba2c3fa788ee1a00ae
remote: error: See https://gh.io/lfs for more information.
remote: error: File Eos_tables/2_fluids/DDH_2f.d is 243.03 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: File Eos_tables/2_fluids/DDHdelta_2f.d is 242.45 MB; this exceeds GitHub's file size limit of 100.00 MB
remote: error: GH001: Large files detected. You may want to try Git Large File Storage - https://git-lfs.github.com.

Since these files are probably not needed, I used the following fix

git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch Eos_tables/2_fluids/DDH_2f.d'
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch Eos_tables/2_fluids/DDHdelta_2f.d'
git push -u origin main

Updates (or cvsimports)

In order to import changes from the CVS

  • Make sure you're in the root directory of your git repository. If you're anywhere else, it will try to do a fresh cvsimport that will again take forever.
  • Make sure you're on your main branch so that the changes can be merged (or rebased) into your local/topic branches.

then do

git cvsimport -r cvs -d $CVSROOT Lorene

Alternatively, set the configuration options

git config cvsimport.module Lorene
git config cvsimport.r cvs
git config cvsimport.d $CVSROOT

and simply do

git cvsimport

When to update? One should check the LORENE CVS server. Assuming you have a local checkout of LORENE CVS (not this git repo!), change dir there and show commits (-c) from all users (-a) since a specified date:

cvs history -c 2024-08-13 -a

The utility script LoreneCVS.sh can help to checkout or update LORENE CVS and to check history.

Local changes, exporting, cloning

Local changes should be made on branches different from main, and merged to main only to export them back to CVS.

Local changes may be exported back to CVS in a couple of commands, see this link in case you really want to do that.

For more than one user, it is best to have a single git repository to do the cvsimport. All the other repositories should be a clone (the cloned repository can do the export back). The thing to take care of is that the cloned branch should not track the central git repository. By default, this is how git clone configures your repository but this is easily remedied:

git clone git@github.com:computationalrelativity/lorene.git
cd lorene
git config --unset branch.master.remote
git config --unset branch.master.merge

and then

git pull origin master

Special branches

The repo has a special branch installation that contains a folder with information for the installation of LORENE on systems in use by the CoRe collaboration. This branch should not be merged to main