migrate repository from mercurial to git

Mads Kiilerich mads at kiilerich.com
Fri Dec 10 14:37:16 UTC 2021


On 12/10/21 12:29, Ɓukasz Michalski wrote:
> Hi,
>
> I would like to migrate a repository myrepo from mercurial to git.
>
> I want to rename mercurial repository to myrepo_old and use orginal name for new git repository.
>
> Is it enough to rename mercurial repository on disk and copy new one under original name? Old one can have some closed pull requests.


Yes, that should work and be safe, especially if you do the renaming and 
repo creation in Kallithea. The new repo will be "different" from the 
old one, even if the name is reused. Access rules and PRs etc will be 
different.

Internally, Kallithea is using numerical primary key IDs to store 
database data. The (current) repository name is only used to look up the 
ID when a user is accessing web interface or with protocol access, and 
again when finding the repository on disk. Only the access log will not 
only use the ID but laso duplicate the (current) repository name so the 
logs are useful, even if the repo is removed completely.

/Mads



More information about the kallithea-general mailing list