[Halld-offline] Converting sim-recon tags and branches to the split repositories

Mark Ito marki at jlab.org
Tue Jul 31 14:31:22 EDT 2018


Folks,

I've attempted to provide some guidance on how to use your old sim-recon 
branches and tags now that we have split up sim-recon. You can find it 
here 
<https://halldweb.jlab.org/wiki/index.php/Converting_sim-recon_tags_and_branches_to_the_split_repositories> 
and below. Note that is also linked from the Splitting sim-recon wiki 
page <https://halldweb.jlab.org/wiki/index.php/Splitting_sim-recon>.

   -- Mark

___________________


  Converting sim-recon tags and branches to the split repositories

 From GlueXWiki

First recall that the new halld_recon and halld_sim repositories are 
complete clones of the old sim-recon repository. That means they both 
contain all of the history of sim-recon as well as all of its tags and 
branches. The fact that not all of the old directories appear is that 
they have been deleted in a git-like manner. Those directories are still 
present in the history of each of the new repositories. The src/SBMS 
directory is the only directory contained in both. It had been modified 
in a new-repository-specific way for each new repository.


    Branches

When you checkout your old sim-recon branch from a halld_recon or 
halld_sim repository, you will get the entire tree in its old sim-recon 
form. In particular you will get all of the code for both the sim stuff 
and tne recon stuff, and an SBMS directory that is meant to build both. 
That is after all, the last thing you pushed to the sim-recon 
repository. In the majority of cases, this is not a problem. You can do 
the sim-recon-style build even though the "origin" repository is 
halld_recon or halld_sim, test the resulting binaries, push your changes 
to halld_recon or halld_sim as appropriate, and submit your pull request 
as before. The subsequent merge will use the new repository-appropriate 
SBMS directory, delete the directories that are now in the "other" 
repository and update the master with your changes.

Another scenario is that you want to maintain your changes on your 
branch, but want to transform the branch to have the new 
repository-specific build procedure and directories. In that case, you 
can merge the master onto your branch. That merge will delete the 
directories now in the "other" repository and update your SBMS directory 
to do the new right thing.


      Conflicts

The guidance above is fine unless there are conflicts. There are two 
types of conflicts:

 1. The standard conflict: you have made changes on your branch and the
    master branch has different changes to the same file in the same
    section of code.
 2. The split-induced conflict: the split of sim-recon itself caused the
    conflict to occur. There are two sub-types.
     1. Your branch has changes to both recon directories and sim
        directories.
     2. You branch has changes to the SBMS directory.

Case (1) is nothing new. You have to resolve it in the usual way.

Case (2.1) will occur when you branch has changes to both sim 
directories and recon directories. For example, you have made changes to 
a sim directory on the old branch and have checked out from the 
halld_recon repository. In this case the merge with the master would 
normally delete all sim files, but git notices you have changed some of 
these files and flags that situation as a conflict. You can resolve the 
conflict by performing a |git rm| on all of the flagged sim files and 
then perform the commit. Recall that those changes are present on the 
same branch in the halld_sim repository. And vice versa for recon 
changes checked out from halld_sim.

Case (2.2) will only be encountered by experts and they must rely on 
said expertise to resolve the situation.


    Tags

Tags are tricker since merging to perform the update is not an option. 
To do a merge at all you have to create a branch from the tag, but if 
you merge in the master branch, that will bring in changes on the master 
and defeats the idea of a tag.

Here it is easiest to build the tag as-is, i. e., with a sim-recon-style 
build and use it that way. In other words, don't try to convert it.

There are ways to actually do the conversion, but if you need to do that 
see an expert.

Retrieved from 
"https://halldweb.jlab.org/wiki/index.php?title=Converting_sim-recon_tags_and_branches_to_the_split_repositories&oldid=88526"

  * This page was last modified on 31 July 2018, at 14:30.

-- 
Mark Ito, marki at jlab.org, (757)269-5295

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.jlab.org/pipermail/halld-offline/attachments/20180731/0ab100ea/attachment.html>


More information about the Halld-offline mailing list