DESCRIPTION

Allow GitProjectSetCapability to accept SCM URIs 

Bug: 356448
Change-Id: I04bcf212469f4a9422fd7eb839f874f55cf3f92c


COMMENTS

author: Brenden Conley
date: 2011-11-15 12:33:59.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/sandbox/job/egit.gerrit/2036/ 

-------------------------------------
author: Brenden Conley
date: 2011-11-15 12:48:30.000000000

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

Build Unstable 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/2036/ : UNSTABLE

-------------------------------------
author: Ace Duncan
date: 2011-11-15 17:29:16.000000000

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

(3 inline comments)

Is it possible to use more specific names for tests? test[0-9] pattern is not so useful in a long term.

Line:202, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> Please reflect ' " not allowed' from the comment below in a method's name

Line:214, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> May be GitURI deserves for it's own test?

Line:236, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> Should go into GitURI's test, no?

-------------------------------------
author: Ace Duncan
date: 2011-11-15 17:45:52.000000000

Patch Set 1: (3 inline comments)



Line:29, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Does it make sense to create it public?

Line:47, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Why not a constructor that accepts URI as a parameter?

Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Do you have constants in o.e.team.* to replace these path, tag and project 'magic strings'?

-------------------------------------
author: Clay Cameron
date: 2011-11-16 10:25:06.000000000

Patch Set 1: (1 inline comment)



Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Actually, they reside in GITFetchTaskFactory as private constants named KEY_PATH and KEY_ELEMENT_TAG. Only "project" doesn't seem to be extracted to a constant. 

GITFetchTaskFactory is in the egit-pde repo. I would need a separate (blocking) Change for it, wouldn't I?

-------------------------------------
author: Ace Duncan
date: 2011-11-16 13:33:16.000000000

Patch Set 1: (1 inline comment)



Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Would using constants from GITFetchTaskFactory introduce a new dependency for EGit? Right now I'm not sure if it a bad thing to add such dependency VS 'magic string'.

-------------------------------------
author: Clay Cameron
date: 2011-11-16 17:23:29.000000000

Patch Set 1: (1 inline comment)



Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Yes, that would require a new dep on org.eclipse.egit.fetchfactory, which is in egit-pde. How about opening a new bug for this particular issue? I agree with other comments, so I could prepare a new patch and move this forward.

-------------------------------------
author: Clay Cameron
date: 2011-11-17 13:03:42.000000000

Patch Set 1: (2 inline comments)



Line:29, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> It's public so it's available in tests. Notice it's in an internal package.

Line:47, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> What if the URI is not valid? Do you think throwing IllegalArgExc is better?

-------------------------------------
author: Douglas Trujillo
date: 2011-11-17 22:44:24.000000000

Patch Set 1: (2 inline comments)



Line:27, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> missing javadoc for public class

Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> I think we should not make egit.core depending on  org.eclipse.egit.fetchfactory as it requires a newer platform version compared to what egit currently can work on. Also I think introducing a dependency on a library dedicated for PDE build support isn't a good thing for egit.core as it pulls in transitive dependencies on pde.build we don't want for egit.

-------------------------------------
author: Clay Cameron
date: 2011-11-18 10:07:51.000000000

Patch Set 1: (5 inline comments)



Line:202, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> Done

Line:214, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> Done

Line:236, org.eclipse.egit.core.test/src/org/eclipse/egit/core/test/GitProjectSetCapabilityTest.java -> Done

Line:27, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Done

Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Makes sense to me, in the latest Patch Set I left the "magic strings" untouched.

-------------------------------------
author: Ace Duncan
date: 2011-11-18 16:13:48.000000000

Patch Set 1: (2 inline comments)



Line:47, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Return null and force user *always* check for null is not much better though...

Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Could we change direction for this dependency: declare these constants here, in GitURI, and use them in GITFetchTaskFactory? In any case the intent of GitURI class is to make egit-pde happy, this very class has some logic dependent on these values.

-------------------------------------
author: Clay Cameron
date: 2011-11-18 17:22:15.000000000

Patch Set 1: (2 inline comments)



Line:47, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Well, I would prefer to check for null rather than catch IAE to see if the given URI is valid. But I don't have strong feelings for the method, so the constructor is fine with me, if you insist ;)

Line:59, org.eclipse.egit.core/src/org/eclipse/egit/core/internal/GitURI.java -> Good point, agreed.

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