DESCRIPTION

Import a project set file

Very simple implementation:
- checks out 'master' branch (hard-coded)
- creates a local repository with o.e.e.core.op.CloneOperation in
  <workspaceroot>/<humanish-git-url> (hard-coded) for every unique
  repository from the project's reference.
- connects checked out projects with
  o.e.e.core.op.ConnectProviderOperation

No UI interaction had been implemented yet.

Due to the bug 244313 it depends on
org.eclipse.core.runtime.compatibility layer.

Bug: 296082
Change-Id: I800dd9f23953ad903f20289c442707e2dde08f75


COMMENTS

author: Yoselin Hanna
date: 2009-12-01 00:52:36.000000000

Patch Set 1: I would prefer that you didn't submit this; No score



Line:55, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Why can't this be private?

Line:73, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> The --branch option comment makes no sense in this context.  We don't use this string within the project reference in the project set, but I expected you to be using it given your comment right here.

Line:80, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> The --origin option comment makes no sense in this context.  We don't use this string within the project reference in the project set, but I expected you to be using it given your comment right here.

Also, we're probably OK to just hardcode this as "origin" via the DEFAULT_REMOTE_NAME constant.  Users aren't likely to change it.  IMHO project set files are about simplifying getting started with a project in Eclipse.  We should help that by also setting some basic standard rules, like the name of the default remote that the project set created.

Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> I don't think you need UrrishComparator here.  URIish implements hashCode and equals contract correctly for HashMap.

Line:114, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Shouldn't we do this only once during the projectsInRepository == null condition two lines above?

Line:131, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Shouldn't DEFAULT_BRANCH here be the branch field from the ProjectReference class?

Of course you could have the case where a project set has 2 or more projects from the same repository, but they are pointing at different branches.  IMHO this is an invalid project set for the EGit puglin, and we should reject it.

Line:15, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProviderType.java -> We don't xxx@xxx.xxx tags.

Line:18, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProviderType.java -> Style-nit: We prefer "public final class" round here.

Line:4, egit.psf -> I wonder if we shouldn't also be including our two Orbit based dependencies of args4j and jsch when we define this project set for egit/jgit ?

-------------------------------------
author: Ace Duncan
date: 2009-12-01 07:53:12.000000000

Patch Set 1: No score



Line:131, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> I'm not sure how this should be handled and waiting for any feedback,  http://wiki.eclipse.org/EGit/User_Guide/Project_Set_File#Same_branch_VS_individual_branches

Line:4, egit.psf -> My original intent was to define/show/discuss the project reference's format (i.e, do we need a version here like CVS does '1.0|git://...', single branch per repo VS individual branch per project and so on).

As of args4j and jsch: may be the better way here would be a target platform definition?

-------------------------------------
author: Juliet Cantu
date: 2009-12-01 17:44:52.000000000

Patch Set 1: Do not submit; No score

Not even the author considers it ready, so why is it here?

Line:80, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Any general discussions are better tracked using mail. Interesting topic though so please post to the mailing list.

-------------------------------------
author: Juliet Cantu
date: 2009-12-18 23:32:09.000000000

Patch Set 1: Looks good to me, but someone else must approve

Any good links for the Project set file format?

Line:80, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Yes, adding a new remote using the team project set makes sense to me. I don't know if it works. Another thing is that you may want to use another name for the remote master branch, like the ones i import from clearcase where the master branch is called main and I think it makes more sense to keep that name,

Line:131, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> Just throw an exception. Such a team project set should not be possible to
create using EGit so it's simply an example of a corrupt psf file.

This should happen at an early stage, so the user gets feedback in the import dialog.

-------------------------------------
author: Juliet Cantu
date: 2009-12-20 08:29:26.000000000

Patch Set 1: No score

Oops, I just wanted to ask a question. Not approve.

-------------------------------------
author: Ace Duncan
date: 2009-12-20 21:02:23.000000000

Patch Set 1: No score

> Any good links for the Project set file format?

I've found nothing. But we have a source code ;-)

-------------------------------------
author: Ace Duncan
date: 2009-12-01 08:59:49.000000000

MISMATCHED INLINE COMMENT
Line:55, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> ...due to 'origin field is never read locally' error. See next comment.

-------------------------------------
author: Ace Duncan
date: 2009-12-01 08:59:49.000000000

MISMATCHED INLINE COMMENT
Line:80, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> What about a (more generic) use case: for instance, I've checked out some project's fork from GitHub and now I'm trying to check out its original codebase from org.eclipse using a provided PSF. Dealing with two different local repositories of the same codebase in this case seems to me unhandy.

Would it be better try to add a new origin to the existing local repo and fetch from the repository specified in a PSF?

-------------------------------------
author: Ace Duncan
date: 2009-12-01 08:22:48.000000000

MISMATCHED INLINE COMMENT
Line:101, org.eclipse.egit.core/src/org/eclipse/egit/core/GitProjectSetCapability.java -> It's just a leftover from an original implementation which was TreeSet-based.

-------------------------------------
