Bug 356953 - Implement new Sharing Wizard
Summary: Implement new Sharing Wizard
Status: NEW
Alias: None
Product: EGit
Classification: Technology
Component: UI (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 353608 353636 323947 341543 347454
  Show dependency tree
 
Reported: 2011-09-07 11:25 EDT by Matthias Sohn CLA
Modified: 2011-09-30 12:02 EDT (History)
8 users (show)

See Also:


Attachments
First wizard page: select repository (87.23 KB, image/png)
2011-09-07 11:34 EDT, Matthias Sohn CLA
no flags Details
Dialog: create new local repository (45.43 KB, image/png)
2011-09-07 11:35 EDT, Matthias Sohn CLA
no flags Details
Second wizard page: select relative path in working dir (64.17 KB, image/png)
2011-09-07 11:36 EDT, Matthias Sohn CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Sohn CLA 2011-09-07 11:25:32 EDT
In order to fix the usability problems with the existing Sharing Wizard we should implement a new Sharing Wizard. This was discussed during the EGit hackaton and we came to the proposal described here.

1. Sharing projects located in the working directory of an existing Git repository

Projects should be auto-shared by a resource change listener which 
shall trigger 
- when a new project is created or imported which is located under the 
   working directory of a Git repository known to the Eclipse workbench.
- in order to prevent that we miss projects created or imported before
   EGit bundles are active we need to scan the existing projects when 
   the org.eclipse.egit.core bundle gets activated

2. Explicit sharing of projects using the new wizard
- First wizard page 
   - allows to select the repository the selected projects should be shared with 
   - we can reuse the first page of the existing
      "Import... > Git > Projects from Git" wizard
   - add a "Create..." button into that wizard page that opens a dialog
      to enable creation of a new local repository
- Second wizard page
   - similar to the CVS Sharing Wizard this page allows to specify where the
      selected projects should be located relative to the repository's 
      working directory
Comment 1 Matthias Sohn CLA 2011-09-07 11:34:31 EDT
Created attachment 202909 [details]
First wizard page: select repository
Comment 2 Matthias Sohn CLA 2011-09-07 11:35:11 EDT
Created attachment 202910 [details]
Dialog: create new local repository
Comment 3 Matthias Sohn CLA 2011-09-07 11:36:00 EDT
Created attachment 202911 [details]
Second wizard page: select relative path in working dir
Comment 4 Tobias Oberlies CLA 2011-09-07 12:09:18 EDT
(In reply to comment #0)
> Projects should be auto-shared by a resource change listener which 
> shall trigger 
> - when a new project is created or imported which is located under the 
>    working directory of a Git repository known to the Eclipse workbench.
> - in order to prevent that we miss projects created or imported before
>    EGit bundles are active we need to scan the existing projects when 
>    the org.eclipse.egit.core bundle gets activated

This doesn't sound like a good idea, at least not with a preference option to disable this feature. I have repeatedly created a Git repository in the source tree of a legacy SCM (like CVS, Perforce,...), and I would prefer if this great way of adding missing functionality to legacy SCMs isn't broken.
Comment 5 Remy Suen CLA 2011-09-07 21:36:14 EDT
(In reply to comment #0)
> Projects should be auto-shared by a resource change listener which 
> shall trigger

I don't think the other SCM plug-ins do this and like Tobias am against this proposal.
Comment 6 Matthias Sohn CLA 2011-09-08 09:05:24 EDT
(In reply to comment #4)
> (In reply to comment #0)
> > Projects should be auto-shared by a resource change listener which 
> > shall trigger 
> > - when a new project is created or imported which is located under the 
> >    working directory of a Git repository known to the Eclipse workbench.
> > - in order to prevent that we miss projects created or imported before
> >    EGit bundles are active we need to scan the existing projects when 
> >    the org.eclipse.egit.core bundle gets activated
> 
> This doesn't sound like a good idea, at least not with a preference option to
> disable this feature. I have repeatedly created a Git repository in the source
> tree of a legacy SCM (like CVS, Perforce,...), and I would prefer if this great
> way of adding missing functionality to legacy SCMs isn't broken.

We could provide a preference to switch auto-sharing off for such cases. 
Also we should check that projects are not yet shared with another team provider.
Comment 7 Mathias Kinzler CLA 2011-09-22 10:46:14 EDT
(In reply to comment #0)
> Projects should be auto-shared by a resource change listener which 
> shall trigger 
> - when a new project is created or imported which is located under the 
>    working directory of a Git repository known to the Eclipse workbench.

This sounds intriguing indeed. However, I wonder how frequently this would actually happen once people follow our recommendations and default proposals for creating Repositories outside the Eclipse workspace. In that case, the change listener wouldn't find the Repository, so it would be pointless.
Of course people may create the projects by manually changing the project location to some child folder of the working folder in their respective creation wizards (where available), but that sounds more cumbersome than the option to decide during sharing where to move the project location (IMHO).

In case the project is in fact located under an existing Repository's working folder (either because the Repo is in the workspace or because people have carefully crafted the project location), then I think the wizard should be smart enough to auto-detect this situation and suggest that Repository and the project's location as default (I know, it will be quite ugly to do a good UI for this once this is supposed to work for multi project selection). Still the user would have to hit "Team->Share" and I agree with Tobias and Remy here when it comes to do this automagically.

> 2. Explicit sharing of projects using the new wizard

I like the "screenshots". Perhaps the first screen should (rather prominently) indicate if an existing Repository is a parent of the project, but we shouldn't restrict the user from chosing another Repository.
Comment 8 Jens Baumgart CLA 2011-09-30 12:02:34 EDT
Auto-sharing of projects was implemented with commit e20c835071615cd81ceb3e150f5a75c0db4ebf51