Build and Release

A continuous learner for experience and life.

Rename Repository on Gerrit

Gerrit icon

Instructions:

1. Move the repository folder on server:

1
2
3
# on gerrit server
$ cd $site_path/git;
$ mv old_name.git new_name.git

2. Flush the caches on server:

1
2
# On another client image:
$ ssh -p 29418 gerrit.server.com gerrit flush-caches

3. Run sql statement to update the changes:

1
2
3
4
5
6
7
8
# On another client image (need "Access Database" capability):
$ ssh -p 29418 gerrit.server.com gerrit gsql [Enter]
gerrit> USE {Database};
gerrit> SELECT * FROM changes WHERE dest_project_name = 'old_name';
# if have more than 1, run the following command to update, otherwise, quit with \q;
gerrit> UPDATE changes SET dest_project_name = 'new_name' WHERE
dest_project_name = 'old_name';
gerrit> \q

References:

  1. https://groups.google.com/forum/#!topic/repo-discuss/ltIxBipUPKI

Written with StackEdit.

Comments