I've done this once to split the Gerrit project and its related
siblings to gerrit-review.googlesource.com. :-)
I made a backup of the full source server, restored that to a new
empty PostgreSQL database, then used SQL to delete any change rows
that I didn't where (WHERE dest_project_name NOT LIKE 'tools/%'). I
cleaned up the other tables by looking for tables that have a
change_id column and deleting any rows where change_id NOT IN (SELECT
change_id FROM changes). Only took a few minutes.
The problem with loading this into an existing server is the change_id
values may conflict with other changes already on that server. So its
pretty difficult to pick up and move those changes to an existing
server. You could find out the max change_id of the incoming set, go
manually bump the destination server's change_id_seq to reserve
sufficient id space, then bump all of the old change_ids by some base
value so they are in a unique space in the destination... and finally
load the rows to the destination. No its not easy.
Cheers,
Philipp
--
To unsubscribe, email repo-discuss...@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
Yes, this would be a useful feature.
> I think that's important for the future because when you are working
> in different teams with different Gerrit instances and you will move
> one project to another team you would like to import the hole Gerrit
> project history.
> There are any plans for this?
I think no. But contributions are welcome ;-)