最近遇到了需要重命名Gerrit上的project,记下备用

登录到Gerrit服务器,然后按照以下步骤操作

Instructions

Move the repository folder on server

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

Flush the caches on server

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

Run sql statement to update the changes:

# 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

来源:https://lifuzu.com/blog/2014/04/09/rename-repository-on-gerrit/


Published

Category

Linux

Tags