-
Notifications
You must be signed in to change notification settings - Fork 312
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
Conversation
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/')) |
There was a problem hiding this comment.
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
Changes made as requested. Sorry, forgot to squash commits before pushing changes. |
return false unless new_namespace | ||
|
||
namespaced_path = File.join(repos_path, new_namespace) | ||
return false unless File.exists?(namespaced_path) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
Change-Id: I0c343c03ee3f033641f9958030ac57d92296547d
All seems ok for me. Accepting this one |
@amacarthur thank you |
Thank you @randx . I see you have assigned the gitlabhq fork pull request to Milestone 5.2. Great! I hope you like it. |
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.