From 306ccd9dce13d597b0bafbcf0a2af975f562be5d Mon Sep 17 00:00:00 2001 From: Eric Kooistra <kooistra@astron.nl> Date: Fri, 28 Feb 2020 14:41:36 +0100 Subject: [PATCH] Updated git review process. --- .../doc/prestudy/desp_howtools_erko.txt | 60 +++++++++++++------ 1 file changed, 43 insertions(+), 17 deletions(-) diff --git a/applications/lofar2/doc/prestudy/desp_howtools_erko.txt b/applications/lofar2/doc/prestudy/desp_howtools_erko.txt index be7d4a6fd4..0583c7242f 100755 --- a/applications/lofar2/doc/prestudy/desp_howtools_erko.txt +++ b/applications/lofar2/doc/prestudy/desp_howtools_erko.txt @@ -87,7 +87,7 @@ export SVN=${HOME}/svnroot/UniBoard_FP7 ******************************************************************************* -* GIT workflow +* GIT references ******************************************************************************* difftool ? @@ -202,13 +202,37 @@ git status # delete branch and fetch npstream if the pull request was accepted git remote remove <remote name> # remove a remote repo -Review process using Gitlab and Git -* Jira ticket defines the work to be done -* coder works on branch with Jira ticket number -* manually run regression test to test the changes (for Casacore SW the merge - request makes github automatically issue a regression test in the cloud) -* coder does merge request to reviewer +******************************************************************************* +* GIT workflow and review process using Gitlab +******************************************************************************* + +We identify two persons in this process: +- the coder +- the reviewer + +* Jira ticket defines the work to be done, e.g. L2SDP-26 +* Coder works on branch with Jira ticket number as branch name + + git checkout master # start on up to date master branch + git pull + git branch L2SDP-26 # creat branch using Jira ticket number + git branch # show branches + git checkout L2SDP-26 # change working tree and stage area to branch + +* Work on branch using git add, commit and push +* Manually run regression test to test the changes (for Casacore SW the merge + request makes github automatically issue a regression test in the cloud, for + FW we need to run the relevant testbenches manually. It is not necessary to + rerun the entire FW regression test, it is sufficient to only run the + regression test for the HDL libraries that were modified and the HDL + libraries that could be impacted by the modification) +* Push the branch to the central repository at gitlab + + git push -u origin L2SDP-26 # first time to declare the branch at the remote + + +* Coder does merge request to reviewer using the central Gitlab GUI * gitlab will warn if the branch will lead to a merge conflict, the coder then first has to fix the merge conflict by merging the master to the branch: The merge can use merging or rebasing, Ger typically uses merging. On local @@ -216,28 +240,30 @@ Review process using Gitlab and Git git checkout master git pull - git checkout stat-313 + git checkout L2SDP-26 git merge master git status # to see merge conflicts, edit file to solve merge conflict git add file git commit git push -* reviewer reviews the code per line and in general comments in gitlab GUI, - so no need to pull the branch locally -* Use 'Open in Web IDE' button to see max about 10 changes, Use 'Changes' menu - to see all changes. Green is new file, orange is change file, + is new lines - - is removed lines. -* coder does updates on branch until both coder and reviewer are ok, they are +* In gitlab do merge request to reviewer +* Reviewer reviews the code per line or in general comments in gitlab GUI, + so reviewer does not need to pull the branch locally and also does not need + to rerun the regression test. +* Use 'Open in Web IDE' button in gitlab GUI to see max about 10 changes, + use 'Changes' menu on same page to see all changes. Green is new file, + orange is change file, + is new lines - is removed lines. +* Coder does updates on branch until both coder and reviewer are ok, they are notified by gitlab -* when review is done then the reviewer does the merge. -* the merge automatically deletes the branch (if selected to do so in gitlab) +* When review is done then the reviewer does the merge. +* The merge automatically deletes the branch (if selected to do so in gitlab) locally the coder manually needs to delete the branch: git branch git checkout master git status - git branch -d stat-313 + git branch -d L2SDP-26 git status * Use Jira tag in commit message to have link between GIT and Jira. The link -- GitLab