After importing a non-empty project GitLab is suggesting for me to add new files to the repo:
Here are the steps I performed:
vagrant@gitlab:/home/git$ sudo su gitgit@gitlab:~$ cd repositories/git@gitlab:~/repositories$ lsjoseph.andaverdegit@gitlab:~/repositories$ git clone --bare http://ssi-vcs/engineering/illuminate/clinical.demo/Cloning into bare repository 'clinical.demo.git'...git@gitlab:~/repositories$ lsclinical.demo.git joseph.andaverdegit@gitlab:~/repositories$ cd ../gitlab/git@gitlab:~/gitlab$ bundle exec rake gitlab:import:repos RAILS_ENV=productionProcessing clinical.demo.git * Created clinical.demo (clinical.demo.git)Done!git@gitlab:~/gitlab$
Then when visiting the newly created project I'm presented with this:
Designs
Child items
...
Show closed items
Linked items
0
Link issues together to show that they're related.
Learn more.
When doing an import gitlab doesn't seem to like repositories with a period in the name, the period gets changed to a dash, so clinical.demo becomes clinical-demo
What worked for me was to replace the new repository directory created by the import with the original import directory, something along the lines of:
cd repositoriesrm-Rf joseph.andaverde/clinical-demo.gitmv clinical.demo.git joseph.andaverde/clinical-demo.git
Similar issue also occurs if the imported repository uses capital letters, which get changed to lowercase by gitlab import.
By Administrator on 2013-05-13T19:45:15 (imported from GitLab project)
By Administrator on 2013-05-13T19:45:15 (imported from GitLab)
I cloned the repo with the period in the name to a repo without a period (demo.git instead of clinical.demo.git).
After importing this the problem persisted. I removed the imported repo (joseph.andaverde/demo.git) and replaced it with the direct clone I made in repositories/. This resolved the issue now the files are showing up.
The problem seems to be with how the files that are copied to the group ("joseph.andaverde" in this case) directory.
By Administrator on 2013-05-13T20:01:13 (imported from GitLab project)
By Administrator on 2013-05-13T20:01:13 (imported from GitLab)
When performing the steps above (cloning at command line to the repositories directory) and then executing the bundle rake here are the steps the rake task takes.
# Import project from cloneable resourceif@project.valid?&&@project.import_url.present?shell=Gitlab::Shell.newifshell.import_repository(@project.path_with_namespace,@project.import_url)# We should create satellite for imported repo@project.satellite.createunless@project.satellite.exists?trueelse@project.errors.add(:import_url,'cannot clone repo')endend
defafter_create(project)unlessproject.forked?GitlabShellWorker.perform_async(:add_repository,project.path_with_namespace)log_info("#{project.owner.name} created a new project \"#{project.name_with_namespace}\"")endend
The third step above is the reason why the repository is empty when importing from the file system.
By Administrator on 2013-05-15T04:30:26 (imported from GitLab project)
By Administrator on 2013-05-15T04:30:26 (imported from GitLab)
Does this issue still exist on the latest master? Thanks for the issue report. Please reformat your issue to conform to the issue tracker guidelines found in our contributing guidelines.
By Administrator on 2013-06-15T08:26:46 (imported from GitLab project)
By Administrator on 2013-06-15T08:26:46 (imported from GitLab)
It's been at least 2 weeks (and a new release) since we heard from you. I'm closing this issue but if you still experience this problem, please open a new issue (but also reference the old issue(s)). Make sure to also include the necessary debugging information conforming to the issue tracker guidelines found in our contributing guidelines. /cc @razer6
By Administrator on 2014-03-02T16:26:16 (imported from GitLab project)
By Administrator on 2014-03-02T16:26:16 (imported from GitLab)