Importing a git bare repo, rhodecode shows it empty




It face a problem when wanting to import a git repository into RhodeCode CE.

I upload the bare repo in the correct directory via a tar archive, untar it, and use “Remap and rescan” from the admin console. The repo is correctly detected, but completely empty.
If I go into the repo’s directory and hit git log, I can see my commits.

I found the following in community.log:

2017-01-06 16:53:36.319 INFO  [rhodecode.lib.base] IP: User: <AuthUser('id:2[admin] ip: auth:True')> accessed /_admin/settings/mapping [admin/settings.settings_mapping_update]
2017-01-06 16:53:36.321 INFO  [rhodecode.lib.auth] user <AuthUser('id:2[admin] ip: auth:True')> authenticating with:RHODECODE_AUTH IS authenticated on func SettingsController:__before__
2017-01-06 16:53:36.487 INFO  [rhodecode.model.scm] scanning for repositories in /home/rcdev/repositories_store
2017-01-06 16:53:43.017 INFO  [rhodecode.lib.utils] repository repo not found, creating now
2017-01-06 16:53:44.039 INFO  [rhodecode.lib.utils] Logging action:`started_following_repo` on repo:`<RepoTemp('id:4')>` by user:<User('id:2:admin')> ip:
2017-01-06 16:53:45.587 INFO  [rhodecode.lib.middleware.request_wrapper] IP: Request to /_admin/settings/mapping time: 9.269s


OK, after checking back an hour after, it shows correctly in the interface. It would be nice to show the user that the repository is being scanned, instead of being empty


Usually remap and rescann is for initial importing.

There’s a default cache for 1hr. You can manually triggering cache purge(under repo > settings >cache). It cna be also done via API. We’ll investigate however if remap and rescann should purge cache when importing, just to provide a better experience.