Tracking Gaudi Releases

From Daya Bay
Jump to navigation Jump to search

How Gaudi (and LCGCMT and LHCb) releases are tracked. This is mostly a note for bv. Note: don't read this, instead read Upgrading Projects.

Basics

We track Gaudi releases in our SVN repository by using a GIT repository to handle merging of Daya Bay specific mods.

In the following the examples show tracking from Gaudi v19r4 to a new v19r5.

Gaudi CVS

Gaud CVS is at:

:pserver:anonymous@isscvs.cern.ch:/local/reps/Gaudi

Gaudi GIT

A git-svn repository is first setup as described in the topic on Synchronizing Repositories.

Import projects

How Gaudi, LCGCMT and LHCb are imported.

Import Gaudi

Each release of Gaudi is imported into a git repository on a new branch that splits off from the previous (pristine) one.

git-checkout gaudi-releases
rm -r *
for n in GaudiAlg GaudiAud GaudiExamples GaudiGSL GaudiKernel \
         GaudiMonitor GaudiPolicy GaudiPoolDb GaudiPython \
         GaudiRelease GaudiSiteSvc GaudiSvc GaudiSys GaudiUtils \
         HbookCnv PartPropSvc RootHistCnv cmt
do 
  cvs -d :pserver:anonymous@isscvs.cern.ch:/local/reps/Gaudi get -r GAUDI_v19r5  $n
done
git-add *
git-commit -a -m "Import from Gaudi CVS tag GAUDI_v19r5"

The exact package list may evolve over time. Note that this blindly overwrites the previous versions and keeps absolutely no history of Gaudi development.

Import LCGCMT

Everything like above, but the cvs checkout is done like:

cvs -d :pserver:anonymous@lcgcmt.cvs.cern.ch:/cvs/LCGCMT get -r LCGCMT_53c lcgcmt
mv lcgcmt/* .
rm -r lcgcmt/

Import LHCb

The script:

dybinst/scripts/lhcb.sh

as used for the initial import. As of this writing a second release has not yet been imported.

Merge Local Changes

Any Daya Bay changes made since v19r4 (those in dybsvn-trunk branch) need to be merged to gaudi_v19r5.

Do the merge on a branch:

git-checkout -b dybsvn-v19r5 gaudi_v19r5

For LCGCMT, the name used is like "dayabay_53c".

What is expected can be seen with the following from dybsvn-v19r5 branch:

git-diff dybsvn-trunk

The merge is initiated with:

git-merge -m "Merge dayabay mods since v19r4 into v19r5" dybsvn-trunk

Merge Conflict Resolution

Very likely a conflict will arise. If so, a message something like the following will be displayed:

Auto-merged GaudiPython/cmt/requirements
Auto-merged cmt/project.cmt
CONFLICT (content): Merge conflict in cmt/project.cmt
Automatic merge failed; fix conflicts and then commit the result.


To resolve the conflict, git-mergetool is used. It can use the nice meld tool to do the actual resolving.

Everything can be resolved at once:

git-mergetool --tool=meld

or file-at-a-time:

git-mergetool --tool=meld GaudiPolicy/cmt/requirements

If using meld, it will show up with 3 windows, from left to right:

LOCAL
the copy from the current working dir (eg. v19r5)
result
the copy that will be the result of the conflict resolution
REMOTE
the copy being merged in (eg. v19r4)

Changes are brought into the result by clicking on the arrows in the diffs. Any conflicts are outlined in the usual way (between ">>>", "===", and "<<<"). The result file can be directly edited. Only modify the central result file.

If the conflict resolution is complex and mistakes are made you can quit meld w/out saving and re-run git-mergetool.

Bringing Trunk to the front

After the merge above, dybsvn-v19r5 will be the most recent HEAD. In order for the next step to happen, dybsvn-trunk needs to be brought forward.

git-checkout dybsvn-trunk
git-merge -m "Bring dybsvn-trunk forward to get gaudi v19r5 updates." dybsvn-v19r5

Notes on this merge

It is important to do the merge this way. The strategy the bulk of the changes between Gaudi versions are forced and then one replays the likely small number of changes Daya Bay has made. To do otherwise, for example to try to directly merge new Gaudi mods to dybsvn-trunk will require every little change the Gaudi team has made to be manually resolved. In the end the history should look like this: Merge.png

Failures

The merge of LCGCMT 53c failed somehow with

Unable to extract revision information from commit

From this post I found to do the following:

# start with the svn head
git checkout -b tempbranch trunk
# bring in all the changes from your branch
git merge --squash myhead
# commit with whatever message you want
git commit
# and ship it up to svn land
git svn dcommit

The "trunk" is the git-svn branch and "myhead" has the local mod branch.

Gaudi SVN