Rewrite egit clone wizard UI
commitec7b3d530b718317684759804334c1513d0f1afa
authorShawn O. Pearce <spearce@spearce.org>
Mon, 28 Apr 2008 01:13:23 +0000 (27 21:13 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 11 May 2008 05:16:36 +0000 (11 01:16 -0400)
tree87932542a926a89cd280ca07754d9a20850358de
parenta64e95f03713f51ec809608c35ac4862c53af4cc
Rewrite egit clone wizard UI

We now allow the end-user to configure a Git repository clone by
a 3 step wizard:

 - Step 1: Source Repository

     Users can enter a complete Git URIish which is automatically
     parsed into individual input fields, or they can enter the
     individual input fields and see it form on the fly into a Git
     style URIish.  This makes it easy for users to insert a URI
     they have received from someone else, or to edit/populate the
     individual fields.

 - Step 2: Branches To Clone

     A remote connection is setup to the remote repository and
     the list of advertised branches (starts with "refs/heads/")
     is shown to the user.

     If the URIish configured in the prior step is invalid then the
     user can move back to the prior step and correct the incorrect
     parts of the URI and try again.

     Users may select individual branches to include/exclude on
     clone, possibly avoiding downloading unnecessary objects.
     For example the C Git repository contains additional branches
     like 'man', 'html' and 'pu' whose objects would not be
     downloaded unless these branches were checked by the user.

     If not all branches are checked in this step then the remote
     configuration in .git/config only fetches the selected branches,
     rather than wildcarding.

 - Step 3: Local Destination

     A local working directory is proposed to the user within their
     workspace directory and based upon the source repository's
     basename, but the user may adjust this by editing the path or
     using a Browse button to open a file browser.

     The initial branch to checkout after clone is offered from the
     list of branches selected in Step 2.  The branch that "HEAD"
     is referring to is guessed and shown as the default choice.

     The name of this remote configuration can also be modified by
     the user at this stage, but defaults to "origin".

Unlike the prior clone wizard the clone completes as a background
job, visible through the Progress view and/or in the status bar
of the workspace.  This allows the end-user to continue to use
their workbench while waiting for a repository clone to complete.
Forcing the job to run as part of the modal Import wizard dialog
prevents the end-user from using the workbench, or starting a second
clone from another source.

Unlike the prior clone wizard we do not currently show a project
import wizard once the clone has completed successfully.  This is
room for future work.  One way to do this would be a "Git Transfer"
view that shows the status of all active transfers, and show clones
as part of this view.  From here users could then access the final
result of a recent transfer, and for example launch the project
import wizard.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
17 files changed:
org.spearce.egit.core/src/org/spearce/egit/core/CoreText.java
org.spearce.egit.core/src/org/spearce/egit/core/coretext.properties
org.spearce.egit.core/src/org/spearce/egit/core/op/CloneOperation.java [new file with mode: 0644]
org.spearce.egit.ui/plugin.properties
org.spearce.egit.ui/plugin.xml
org.spearce.egit.ui/src/org/spearce/egit/ui/UIText.java
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/BranchChangeListener.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/CloneDestinationPage.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/CloneSourcePage.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/GitCloneWizard.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/SourceBranchPage.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/clone/URIishChangeListener.java [new file with mode: 0644]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/factories/GitJSchProtocolFetchClient.java [deleted file]
org.spearce.egit.ui/src/org/spearce/egit/ui/internal/wizards/GitCloneWizard.java [deleted file]
org.spearce.egit.ui/src/org/spearce/egit/ui/uitext.properties
org.spearce.jgit/src/org/spearce/jgit/lib/Repository.java
org.spearce.jgit/src/org/spearce/jgit/transport/FetchResult.java