TWiki
>
PanDA Web
>
AtlasDistributedComputing
>
PanDA
>
PandaGerrit
(2015-04-27,
WenGuan
)
(raw view)
E
dit
A
ttach
P
DF
---+!!PandaGerrit Gerrit is a web based code review system, facilitating online code reviews for projects using the Git version control system. PandaGerrit is using gerrit with github authentication. ---+++++ LogIn to panda gerrit for the first time 1) Open https://panda-gerrit.cern.ch:443/ in a webbrower. 2) Fill in your 'Full Name' and then click 'Save Changes' 3) In https://panda-gerrit.cern.ch/#/settings/http-password, click 'Generate Password'. 4) In https://panda-gerrit.cern.ch/#/dashboard/self, click 'GitHub', then click 'Repositories' to import repositories from github to gerrit. Follow the steps in gerrit to import repos. ---+++++ configure gerrit 1) In https://panda-gerrit.cern.ch/#/dashboard/self, click 'Projects' -> 'List', select a project to start. 2) Under the project, you will find a line starting with 'git clone https://panda-gerrit.cern.ch/ProjectName', copy it. If you have some ssl errors, add 'GIT_SSL_NO_VERIFY=false' <verbatim> GIT_SSL_NO_VERIFY=false git clone https://panda-gerrit.cern.ch/ProjectName </verbatim> 3) go to your local clone directory. follow this example to update your .git/config. The 'password' is generated from 'https://panda-gerrit.cern.ch/#/settings/http-password'. <verbatim> [wguan@lxplus0234 testcore]$ cat .git/config [core] repositoryformatversion = 0 filemode = true bare = false logallrefupdates = true [http] sslVerify = false [remote "origin"] fetch = +refs/heads/*:refs/remotes/origin/* url = https://username:password@panda-gerrit.cern.ch/ProjectName [branch "master"] remote = origin merge = refs/heads/master [wguan@lxplus0234 testcore]$ </verbatim> 4) add these tools to your project https://github.com/wguanicedew/GerritTools/tree/master/tools 5) run this command below which is download from tools ./tools/configure_git.sh ---+++++ Development using gerrit 1) refresh to the latest master/main-dev branch 1) create a new local branch: It's not good to work on the master or main-dev branch. Because some others may update these branches. 1) develop your code 1) add your code 1) commit your code 1) submit review <verbatim> git checkout master git fetch; git pull git checkout -b localdev vi mycode git add mycode git commit -a -m 'desc of my code' ./tools/submit-review-main-dev </verbatim> ---+++++ Fix conflicts If you get an error message from gerrit like Please merge (or rebase) the change locally and upload the resolution for review., then that means that someone got a change approved for a file while you were working on the same file. This means that you need to fix your commit: 1) Make sure you are working on the master branch. <verbatim> git checkout master or main-dev </verbatim> 1) Get the newest changesets from origin/master: <verbatim> git fetch; git pull </verbatim> 1) Switch to your feature branch and merge in the changes: <verbatim> git checkout your-branch git rebase master </verbatim> 1) This will break at some point at the problematic file(s). Edit them and mark them as resolved: <verbatim> git diff emacs file1 emacs file2 git add file1 git add file2 </verbatim> 1) Finish the merge: <verbatim> git rebase --continue </verbatim> 1) Submit for review: <verbatim> git commit --amend ./tools/submit-review-master </verbatim> ---+++++ Review the codes 1) From https://panda-gerrit.cern.ch/#/dashboard/self, click 'All' --> 'Open'. You will find all open patches. Click the one you want to review. 1) Click to open the updated file, you can click the line number to comment. you can also select par the code to comment. (These comment are draft and will not publish until you click reply). <img src="%ATTACHURLPATH%/gerrit-comment-code.png" alt="gerrit-comment-code.png" width="1017" height="457" /></verbatim> 1) go back to patch review page. Click 'Reply...', you can put the score here. score '2' means 'can be approved'. <img src="%ATTACHURLPATH%/gerrit-reply.png" alt="gerrit-reply.png" width="1013" height="641" /></verbatim> -- Main.WenGuan - 2015-04-27
Attachments
Attachments
Topic attachments
I
Attachment
History
Action
Size
Date
Who
Comment
png
gerrit-comment-code.png
r1
manage
32.9 K
2015-04-27 - 18:57
WenGuan
png
gerrit-reply.png
r1
manage
57.5 K
2015-04-27 - 18:57
WenGuan
E
dit
|
A
ttach
|
Watch
|
P
rint version
|
H
istory
: r1
|
B
acklinks
|
V
iew topic
|
WYSIWYG
|
M
ore topic actions
Topic revision: r1 - 2015-04-27
-
WenGuan
Log In
PanDA
PanDA Web
Create New Topic
Index
Search
Changes
Notifications
Statistics
Preferences
Public webs
Public webs
ABATBEA
ACPP
ADCgroup
AEGIS
AfricaMap
AgileInfrastructure
ALICE
AliceEbyE
AliceSPD
AliceSSD
AliceTOF
AliFemto
ALPHA
ArdaGrid
ASACUSA
AthenaFCalTBAna
Atlas
AtlasLBNL
AXIALPET
CAE
CALICE
CDS
CENF
CERNSearch
CLIC
Cloud
CloudServices
CMS
Controls
CTA
CvmFS
DB
DefaultWeb
DESgroup
DPHEP
DM-LHC
DSSGroup
EGEE
EgeePtf
ELFms
EMI
ETICS
FIOgroup
FlukaTeam
Frontier
Gaudi
GeneratorServices
GuidesInfo
HardwareLabs
HCC
HEPIX
ILCBDSColl
ILCTPC
IMWG
Inspire
IPv6
IT
ItCommTeam
ITCoord
ITdeptTechForum
ITDRP
ITGT
ITSDC
LAr
LCG
LCGAAWorkbook
Leade
LHCAccess
LHCAtHome
LHCb
LHCgas
LHCONE
LHCOPN
LinuxSupport
Main
Medipix
Messaging
MPGD
NA49
NA61
NA62
NTOF
Openlab
PDBService
Persistency
PESgroup
Plugins
PSAccess
PSBUpgrade
R2Eproject
RCTF
RD42
RFCond12
RFLowLevel
ROXIE
Sandbox
SocialActivities
SPI
SRMDev
SSM
Student
SuperComputing
Support
SwfCatalogue
TMVA
TOTEM
TWiki
UNOSAT
Virtualization
VOBox
WITCH
XTCA
Cern Search
TWiki Search
Google Search
PanDA
All webs
Copyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use
Discourse
or
Send feedback