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: