Testing the mirror hook
On the Gerrit server
-
Set the environment variable
GIT_DIRto the absolute path to the Gerrit repository:export GIT_DIR=GERRIT_SITE/git/repoName.gitwhere GERRIT_SITE represents the root directory of your Gerrit server.
-
From the
GERRIT_SITEdirectory, issue the command:./hooks/change-merged -
Check whether the hook displays the message that indicates successful mirroring:
GConn Hook HTTP response: mirror from http://GerritHost.com/repoName.git to //graphDepot/repoName.git - If there are problems, see Troubleshooting Gerrit one-way mirroring.






