Skip to content

add fork_project command #45

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Apr 17, 2013
Merged

Conversation

amacarthur
Copy link
Contributor

This is needed to support the project fork feature in the gitlabhq project. The fork command will create a bare clone of the project in the provided namespace.

@coveralls
Copy link

Coverage remained the same when pulling a471d55 on amacarthur:fork-feature into 8e75018 on gitlabhq:master.

View Details

@dzaporozhets
Copy link
Contributor

Please add usage section to README and https://github.com/gitlabhq/gitlab-shell/blob/master/bin/gitlab-projects

gl_projects.exec
File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name))
File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name, '/hooks/update/post-receive'))
File.exists?(File.join(tmp_repo_path, 'forked-to-namespace', repo_name, '/hooks/update/'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this lines have no should so basically this test does not check anything at all

Change-Id: Ia48a93ccbfea6fdc0791ce25cf3e6291bfe7fa08
Change-Id: I1b3d64d79187c414e326928a96427d1cc6176224
@amacarthur
Copy link
Contributor Author

Changes made as requested. Sorry, forgot to squash commits before pushing changes.

@coveralls
Copy link

Coverage increased (+0.13%) when pulling 934aacb on amacarthur:fork-feature into 8e75018 on gitlabhq:master.

View Details

return false unless new_namespace

namespaced_path = File.join(repos_path, new_namespace)
return false unless File.exists?(namespaced_path)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should check for existence of repo with same name in new_namespace.
Maybe something like
return false if File.exists?(File.join(namespaced_path, repository))

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that makes sense. I will update.

I was wondering if you had any plans to add logging to gitlab-shell? There currently doesn't seem to be a good way to diagnose failures when they happen.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes minimal logging will be great. Like:

[17/Apr/2013 09:13:57] create-projects test/repo.git
[17/Apr/2013 09:13:58] fork-projects test/repo.git randx

@coveralls
Copy link

Coverage remained the same when pulling d8e061d on amacarthur:fork-feature into 8e75018 on gitlabhq:master.

View Details

@dzaporozhets
Copy link
Contributor

All seems ok for me. Accepting this one

dzaporozhets added a commit that referenced this pull request Apr 17, 2013
@dzaporozhets dzaporozhets merged commit 335f9e8 into gitlabhq:master Apr 17, 2013
@dzaporozhets
Copy link
Contributor

@amacarthur thank you

@amacarthur
Copy link
Contributor Author

Thank you @randx . I see you have assigned the gitlabhq fork pull request to Milestone 5.2. Great! I hope you like it.

@amacarthur amacarthur deleted the fork-feature branch April 17, 2013 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants