Project

General

Profile

Actions

Patch #986

closed

Clone remote git repository

Added by Michael Bumann over 16 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2008-04-03
Due date:
% Done:

0%

Estimated time:

Description

this patch clones the repository of a remote GIT repository.
enter the public clone URL (git://..../.git) it will clone it to RAILS_ROOT/repositories/git/<project identifier>/<repository name>
It also changes the URL to use the local clone.


Files

clone_remote_git.diff (1.68 KB) clone_remote_git.diff Michael Bumann, 2008-04-03 19:27

Related issues

Related to Redmine - Feature #2580: Remote git repositoriesClosed2009-01-25

Actions
Related to Redmine - Feature #6515: Mercurial hgrc support with issues auto-syncronizatonNew2010-09-28

Actions
Related to Redmine - Patch #1783: automatic repository creationNew2008-08-13

Actions
Related to Redmine - Patch #7494: Patch for support http protocol wirh mercurial repositoryClosed2011-01-302011-01-30

Actions
Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Target version deleted (0.7)
Actions #2

Updated by Thomas Lecavelier over 16 years ago

Test cases are missing. I know it wouldn't be easy but you can try to accept "not so remote" repository in tmp dir.

Not tested, but the dir variable in the diff could break if white spaces appear: please protect this var expansion in the command line with simple quotes.

Actions #3

Updated by Toshi MARUYAMA about 13 years ago

  • Status changed from New to Closed

As I described #7494 note 2,
I think Redmine core should not have this feature.
It is impossible to test.
Plugins should provide this feature.

Actions #4

Updated by Gabriel Mazetto over 12 years ago

Toshi MARUYAMA wrote:

As I described #7494 note 2,
I think Redmine core should not have this feature.
It is impossible to test.
Plugins should provide this feature.

It is not impossible, it can be a little tricky, but still really possible. A easy test case could be: get a dummy git bare repository in the test folder, then run git-daemon configured to provide this dummy repository. The unit test will have to add a repository from git://localhost/1.git (for example) and then check to see if the folder was correctly created and if it's a git repository.

Also there is the "git" rubygem that can make it easy to clone and fetch revisions:

require 'git'
Git.clone('git://github.com/.../repo.git', '/destination/path.git', :bare => true)

and

git = Git.open('/destination/path.git', :log => Logger.new(STDOUT))
git.fetch('origin')

It can't be easier then that. Implementing this "feature" will make redmine usable with git.

Actions

Also available in: Atom PDF