Difference: LHCbRichMirrorAlignGitInfo (34 vs. 35)

Revision 352018-07-03 - AnatolySolomin

Line: 1 to 1
 
META TOPICPARENT name="LHCbRichMirrorAlign"
Line: 110 to 110
 Only once and forever do these three things:
  • Follow Prerequisites
  • git config --global user.name "Anatoly Solomin" (where Anatoly Solomin = your name)
Changed:
<
<
>
>
  These should be done every time you want to start coding (NOTE the choice of User_release_area is completely up to you, actually, but should be in your AFS area):
Changed:
<
<
  • mkdir /afs/cern.ch/user/a/asolomin/gituser (where asolomin = your username)
  • setenv User_release_area /afs/cern.ch/user/a/asolomin/gituser (where asolomin = your username)
>
>
  • mkdir -p /afs/cern.ch/user/a/asolomin/public/rich_align (where asolomin = your username)
  • setenv User_release_area /afs/cern.ch/user/a/asolomin/public/rich_align (where asolomin = your username)
 
  • LbLogin (for some reason you have to run this after setting the user release area)
  • cd $User_release_area
Changed:
<
<
Then this you do only once, when you start from scratch (though peform it separately when starting from each new Panoptes release, here we assume the newest is v8r1, you should check in gitlab):
  • lb-dev --nightly lhcb-head Panoptes/v8r1
    • This creates a local git repository in PanoptesDev_v8r1. This is called a "satellite project".
    • (NOTE we do need to use the nightlies, unless we know that other people are working on code that may affect us... simply use lb-dev Panoptes/v8r1 instead if this is not the immediate case)
>
>
Then this you do only once, when you start from scratch (though perform it separately when starting from each new Panoptes release, here we assume we are working with 2018-patches):
  • lb-dev --nightly-cvmfs --nightly lhcb-2018-patches Panoptes/2018-patches
    • This creates a local git repository in PanoptesDev_2018-patches. This is called a "satellite project".
    • (NOTE we do need to use the nightlies, unless we know that other people are working on code that may affect us... simply use lb-dev Panoptes/2018-patches instead if this is not the immediate case)
  These you do as long as you are working with the project and version in the previous line (NOTE the "Dev"):
Changed:
<
<
  • cd $User_release_area/PanoptesDev_v8r1
>
>
  • cd $User_release_area/PanoptesDev_2018-patches
 
  • git lb-use Panoptes
    • This adds the gitlab remote to the local repository of the satellite project, and fetches that remote (makes a local copy of the remote repository, although you still don't see it in your working tree).
Line: 193 to 193
 You should try to make a new commit every time you've made modifications that can be considered a single unit of changes.

You will now give your branch a name. You could choose anything (but pick something unique!). However let's try to stick to the following prescription:

Changed:
<
<
username-title-YYYYMMDD (e.g. asolomin-MirrAlign-20170123).
So for example, to push your changes to a new branch called asolomin-MirrAlign-20170123:
  • git lb-push Panoptes asolomin-MirrAlign-20170123
>
>
username-title-YYYYMMDD (e.g. asolomin-MirrAlign-20180703).
So for example, to push your changes to a new branch called asolomin-MirrAlign-20180703:
  • git lb-push Panoptes asolomin-MirrAlign-20180703
  Here, your equivalent of username-title-YYYYMMDD is the name of your development branch, and you will be able to see it in gitlab.

If you then would like the commits in username-title-YYYYMMDD to be merged into 2018-patches, you must perform a Gitlab merge request.

Changed:
<
<
You may submit a merge request for asolomin-MirrAlign-20170123 from the Panoptes gitlab page
>
>
You may submit a merge request for asolomin-MirrAlign-20180703 from the Panoptes gitlab page
 You can also use the hyperlink provided when you commit, though if it's a sensitive change you may want to look at your commit in gitlab first. NOTE: Your pushed branch (that contains your commit) MUST COMPILE locally to get accepted (though it may not compile against the nightlies, consult Chris and Jordi if you find this problem).

Important: if you noticed a mistake, fix it, and immediately want to commit a corrected version to a new branch, you should

Changed:
<
<
  • git lb-push Panoptes asolomin-MirrAlign-20170123-2 (i.e. any different name)
Then, submit a merge request for asolomin-MirrAlign-20170123-2, instead of asolomin-MirrAlign-20170123
>
>
  • git lb-push Panoptes asolomin-MirrAlign-20180703-2 (i.e. any different name)
Then, submit a merge request for asolomin-MirrAlign-20180703-2, instead of asolomin-MirrAlign-20180703
 Go ahead and delete the branch.

Now say you already made a merge request, then you could commit a fix and push it to the same branch for which you made the merge request. Before you start work on the fix however, make sure to change the first word of the title of your merge request to "WIP: " (work-in-progress). This instructs the Project manager to wait until you remove "WIP: " to merge the branch.

Line: 218 to 218
 This shouldn't happen in our workflow, but just so you know about it... If changes were made to your branch [e.g. in GitLab] by someone else, and then you want to keep working on the branch:
  • git fetch --all # (you must do this in order to get access to remote changes in Panoptes/2018-patches or any other branch)
Changed:
<
<
  • git lb-checkout Panoptes/asolomin-MirrAlign-20170123 Rich/RichMirrorAlignmentOnline
>
>
  • git lb-checkout Panoptes/asolomin-MirrAlign-20180703 Rich/RichMirrorAlignmentOnline
  After the merge requests are applied and only after, when you are ready to start work again you will want to update your local packages from the 2018-patches, in case there were any changes in the 2018-patches in the meantime:
Changed:
<
<
  • cd $User_release_area/PanoptesDev_v8r1
>
>
  • cd $User_release_area/PanoptesDev/2018-patches
 
  • git fetch --all # (Remember, you must do this in order to get access to remote changes in Panoptes/2018-patches or any other branch)
  • git lb-checkout Panoptes/2018-patches Rich/RichMirrorAlignmentOnline (and the same for ALL other packages you checked out from 2018-patches, unless you are still working on a branch of a different package)
Line: 247 to 247
 Say you wanted to run a test of your code. Right now we can only test Rich/RichMirrorAlignmentOnline on the farm. But if you edited Rich/RichMirrAlign you could test it in the following manner:

new shell ( e.g. ssh -Y asolomin@lxplusNOSPAMPLEASE.cern.ch )

Changed:
<
<
  • setenv User_release_area /afs/cern.ch/user/a/asolomin/gituser
>
>
  • ssh lbgw -Y
  • cd /group/online/AligWork/MirrorAlignments
  • scp -pr Rich1/20180628_172734 asolomin@lxplusNOSPAMPLEASE.cern.ch:/afs/cern.ch/user/a/asolomin/public/rich_align_test/Rich1/
  • exit
  • cd /afs/cern.ch/user/a/asolomin/public/rich_align_test/Rich1/
  • cp -pr 20180628_172734 20180628_172734_test
  • setenv User_release_area /afs/cern.ch/user/a/asolomin/public/rich_align
 
  • LbLogin
Changed:
<
<
  • cd $User_release_area/PanoptesDev_v8r1
>
>
  • cd $User_release_area/PanoptesDev/2018-patches
 
  • make install
Changed:
<
<
>
>
 

Slight differences to the above for the Hlt project

 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright & 2008-2019 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback