Fork has problems with relative paths

Issue #394 resolved
Matteo Bertini
created an issue

I used "./" as path for repos, this causes some problem doing a fork:

{{{ 2012-03-07 11:35:58.926 INFO [rhodecode.lib.celerylib.tasks] creating fork of ./prova-git as ./fork-prova-git 2012-03-07 11:35:58.992 ERROR [rhodecode.controllers.forks] Traceback (most recent call last): File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/controllers/forks.py", line 156, in fork_create RepoModel().create_fork(form_result, self.rhodecode_user) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/model/repo.py", line 305, in create_fork run_task(tasks.create_repo_fork, form_data, cur_user) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/celerylib/init.py", line 79, in run_task return ResultWrapper(task(args, kwargs)) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/celery/task/base.py", line 241, in call return self.run(*args, kwargs) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/celery/app/init.py", line 141, in run return fun(args, kwargs) File "<string>", line 2, in create_repo_fork File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/celerylib/__init__.py", line 122, in __wrapper ret = func(*fargs, fkwargs) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/celerylib/tasks.py", line 388, in create_repo_fork update_after_clone=update_after_clone) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/repository.py", line 49, in init self._repo = self._get_repo(create, src_url, update_after_clone, bare) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/repository.py", line 127, in _get_repo self.clone(src_url, update_after_clone, bare) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/repository.py", line 454, in clone self.run_git_command(cmd) File "/home/naufraghi/pyenv/lib/python2.7/site-packages/rhodecode/lib/vcs/backends/git/repository.py", line 101, in run_git_command "stderr:\n%s" % (cmd, se)) RepositoryError: Couldn't run git command (git clone -- "file:///./prova-git" "/home/naufraghi/Documents/src/rhodecode/fork-prova-git"). stderr: fatal: '/./prova-git' does not appear to be a git repository }}}