Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [egit-dev] Fwd: [Bug 326926] New: API to configure and import SCM URLs

Am 05.10.2010 10:42, schrieb Swindells, Thomas:
> I've looked hard and couldn't find any official scheme to do the above, hopefully someone will correct me and point to a page where it is defined...

As with all URLs it's up to the scheme implementor to make a decision.
For example, the Eclipse CVS plug-in came up with the following URI syntax.

scm:cvs:pserver:dev.eclipse.org:/cvsroot/eclipse:org.eclipse.core.runtime.compatibility.registry;tag=v20100520

Similar syntax could be used for EGit urls.

  scm:git:<git-repo-url>:<path-within-repo>;tag=<tag>

Examples:

scm:git:git://git.eclipse.org/gitroot/gyrex/main.git:org.eclipse.core.runtime.compatibility.registry;tag=v20100520

scm:git:ssh://git.eclipse.org/gitroot/gyrex/main.git:org.eclipse.core.runtime.compatibility.registry;tag=v20100520

scm:git:http://git.eclipse.org/gitroot/gyrex/main.git:org.eclipse.core.runtime.compatibility.registry;tag=v20100520


I think the tricky thing is that Git does not support a partial clone of
repos (i.e. just a sub path) as CVS does. Thus, under the covers always
a clone must be performed. Alternatively, a UI could pop up and ask the
user for an existing local clone. However, then again switching to a
particular tag is problematic because only the whole repo must be switch
which could potentially cause conflicts in existing local repos.

The latter is indeed problematic. For example, imagine a user wants to
import two bundles at once. Both bundles come from the same repo but use
a different tag. IMHO EGit must create a second local clone in this case
in order to have both projects in the workspace at different tags. It's
not impossible to implement, though.

-Gunnar

-- 
Gunnar Wagenknecht
gunnar@xxxxxxxxxxxxxxx
http://wagenknecht.org/


Back to the top