Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 498209

Summary: New git repository for EMF Compare
Product: Community Reporter: Laurent Goubet <laurent.goubet>
Component: GitAssignee: Derek Toolan <derek.toolan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: frederic.gurr
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Laurent Goubet CLA 2016-07-20 11:31:44 EDT
Hi, 

Would it be possible to create a new git repository for EMF Compare, beside the two existing ones? We have "acceptance" tests and samples that we'd like to keep separate from the main repository and that don't belong into the "releng" repository.

I'd like this repository to be named org.eclipse.emf.compare-acceptance.git

We'd like the same configuration as the main repository org.eclipse.emf.compare.git (gerrit enabled, same access rights for the same commiters, ...). Thanh already created a permission parent that should simplify this process (see bug 438936 comment 3 ).

Thanks
Comment 1 Derek Toolan CLA 2016-07-20 12:10:38 EDT
I've created the requested Git repository for org.eclipse.emf.compare-acceptance.git. You must now use the Gerrit URLs below for origin.

You can add it to the list of projects you watch:
https://git.eclipse.org/r/#/settings/projects

Upload your SSH public keys to Gerrit if you wish to use SSH:
https://git.eclipse.org/r/#/settings/ssh-keys

Gerrit uses a specific password for https repo access.  You can set/reset the password here:
https://git.eclipse.org/r/#/settings/http-password

Your Gerrit-enabled repo URLs:
ssh://committer_id@git.eclipse.org:29418/emfcompare/org.eclipse.emf.compare-acceptance.git
https://committer_id@git.eclipse.org/r/emfcompare/org.eclipse.emf.compare-acceptance.git
Comment 2 Laurent Goubet CLA 2016-07-25 04:47:24 EDT
Thanks for the repository, however I have a little issue with it.

I need submodules nested under this repository, and the only way I found to push into submodules is to first create and initialize it on the server.

Basically, for each submodule I have (we currently need 5, but new ones might be needed in the future) I would need you to create a new bare repository on its target location on the server. These wouldn't need to be gerrit enabled though (there'll be no commit in them apart from the initial push).

Is there a way for me to create these nested repositories myself?

If not, could you kindly initialize bare repositories at the following nested locations under the first :

git.eclipse.org/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitExtLibrary
git.eclipse.org/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitExtLibraryID
git.eclipse.org/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitUML
git.eclipse.org/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitUMLDesigner
git.eclipse.org/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitUMLStereotyped

Thank you.
Comment 3 Laurent Goubet CLA 2016-07-28 03:56:06 EDT
reopening and bumping
Comment 4 Frederic Gurr CLA 2016-07-28 04:39:23 EDT
Since you have shell access, you should be able to do it yourself by using the initrepo script.
Comment 5 Derek Toolan CLA 2016-08-04 10:57:18 EDT
Closing - please reopen if you require further Webmaster assistance.
Comment 6 Laurent Goubet CLA 2016-08-22 07:52:20 EDT
Sorry haven't had time to really test this until now.

It seems like I do have the necessary permissions to create a repo as I can't create folders in the hierarchy:

lgoubet@build:~> cd /gitroot/emfcompare/org.eclipse.emf.compare-acceptance.git/
lgoubet@build:/gitroot/emfcompare/org.eclipse.emf.compare-acceptance.git> mkdir testGitExtLibrary
mkdir: cannot create directory `testGitExtLibrary': Permission denied


I also tried using the initrepo script but had the same issue:

lgoubet@build:/gitroot/emfcompare/org.eclipse.emf.compare-acceptance.git> initrepo /gitroot/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitExtLibrary.git
/bin/mkdir: cannot create directory `/gitroot/emfcompare/org.eclipse.emf.compare-acceptance.git/testGitExtLibrary.git': Permission denied
/home/data/git/emfcompare/org.eclipse.emf.compare-acceptance.git/refs/heads: Permission denied


Note that this last line seems strange : I'm trying to create a "sub" repository, but the log is telling me there was an error trying to touch refs/heads on the containing folder (guess the initrepo script is searching for the first ".git"-ending folder)?
Comment 7 Frederic Gurr CLA 2016-08-23 12:12:32 EDT
Sorry about that. You are not allowed to create sub-directories on the file system in a Gerrit enabled Git repository.

I have not used git submodules a lot, but according to https://git-scm.com/book/en/v2/Git-Tools-Submodules you should not have to create the directories on the server. Instead you would use git submodule add <URL to repo that you want to use as submodule>, commit and push.
What you do have to create (if they don't exist yet) are the repositories that you are referencing in the submodules.
Comment 8 Laurent Goubet CLA 2016-08-24 04:37:23 EDT
Yes, unfortunately I'm using nested submodules (the submodules are self contained under the main repo). If I'm able to create the repositories elsewhere I guess I'll switch to that instead.
Comment 9 Frederic Gurr CLA 2016-08-24 09:17:38 EDT
In reply to Laurent Goubet from comment #8)
> Yes, unfortunately I'm using nested submodules (the submodules are self
> contained under the main repo).

I'm confused. AFAIK a nested submodule is a submodule that is contained in another submodule, e.g.:
<Parent Git Project>
    -> <Submodule A>
        -> <Submodule B>
In this case, Submodule B is a nested submodule.

What do you mean with "submodules are self contained under the main repo"?
AFAIK a submodule is just a "fancy link" from one Git repo (A) to another independent Git repo (B).
Comment 10 Laurent Goubet CLA 2016-09-01 09:39:49 EDT
It seemed either to just put them under the main repository as far as containment tree goes, but I guess I'll run into the same access rights anyway so yes, I would be able to use repositories located elsewhere as well.

However, that too I cannot do since our namespace /gitroot/emfcompare is itself a location I cannot write to (owned by "gerrit" which I guess is what you mentionned by "gerrit enabled repository"... though it's not a repo, just a folder holding repositories).

So could you please create either a directory in which I have write access at /gitroot/emfcompare/acceptance-submodules ? That would be the best solution so that we can later create the submodule repositories we need.

If not possible, please create these 5:

git.eclipse.org/emfcompare/acceptance-submodules/testGitExtLibrary.git
git.eclipse.org/emfcompare/acceptance-submodules/testGitExtLibraryID.git
git.eclipse.org/emfcompare/acceptance-submodules/testGitUML.git
git.eclipse.org/emfcompare/acceptance-submodules/testGitUMLDesigner.git
git.eclipse.org/emfcompare/acceptance-submodules/testGitUMLStereotyped.git
Comment 11 Frederic Gurr CLA 2016-09-05 08:09:41 EDT
I've created the repos as specified.