DESCRIPTION

Implement project rename and move for some cases

We can now move and rename projects within a repository for a number
of cases. Moving a project to a subdirectory does not work and since
Eclipse actually destroys the project, we simply forbid it for now
(Platform bug 307140). Since it is resolved in 3.7, check the version
number and only forbid this case for platforms e earlier than 3.7.

This also adds tests for move and delete of folders and files. We are
quite inconsistent so the current behavior may not be the final
behavior.

We cannot move projects with repositories inside them in this
version and so we forbid it. Disconnect and share manually
to accomplish this.

Bug: 334112
Change-Id: I634d5b44bc7fc6a7453b5d718733c9f8f3542840
Signed-off-by: Juliet Cantu xxx@xxx.xxx


COMMENTS

author: Gerrit Johnathan Pham
date: 2011-08-10 18:42:27.000000000

Your change could not be merged due to a path conflict.

Please merge (or rebase) the change locally and upload the resolution for review.

-------------------------------------
author: Juliet Cantu
date: 2011-08-20 00:29:10.000000000

Uploaded patch set 10.

-------------------------------------
author: Brenden Conley
date: 2011-08-20 00:29:14.000000000

Patch Set 10:

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

-------------------------------------
author: Brenden Conley
date: 2011-08-20 00:32:46.000000000

Patch Set 10: Build Failed

Build Failed 
 
https://hudson.eclipse.org/sandbox/job/egit.gerrit/1503/ : FAILURE

-------------------------------------
author: Carlie Harper
date: 2011-08-22 15:31:01.000000000

Patch Set 10: (3 inline comments)

Please see my inline comments.

Line:279, org.eclipse.egit.core.test/src/org/eclipse/egit/core/GitMoveDeleteHookTest.java -> No. That's not a simple rename. If you rename a project in the default location (the eclipse workspace), the folder where the project is located is also renamed. This case is still not handled by the GitMoveDeleteHook. 

It should work if you rename a project that is not located in the default location.

Line:342, org.eclipse.egit.core.test/src/org/eclipse/egit/core/GitMoveDeleteHookTest.java -> This test fails on my machine (Version: 3.7.0 Build id: I20110613-1736). Why should it ever work? Bug 307410 does only prevent the user from entering a subfolder of the current folder into the "move" dialog.

What do you think about just removing this test?

Line:228, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> This leads to a java.lang.StringIndexOutOfBoundsException if I rename a project which has a repository in the project folder and which is located outside the eclipse workspace. In this case the location does not change. 

This error had been there before. I think it is the same as was reported in comment 2 of bug 334112. Mabe we could fix it in another change, but you could mention it in the commit message as a further limitation.

-------------------------------------
author: Carlie Harper
date: 2011-08-22 15:31:14.000000000

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



-------------------------------------
author: Juliet Cantu
date: 2011-08-29 20:52:28.000000000

Patch Set 10: (3 inline comments)



Line:279, org.eclipse.egit.core.test/src/org/eclipse/egit/core/GitMoveDeleteHookTest.java -> (Simple as in SOAP).
Ok, not simple. Done

Line:342, org.eclipse.egit.core.test/src/org/eclipse/egit/core/GitMoveDeleteHookTest.java -> It has happened more than once that I've mistakenly created the repo in the project, so I want an extra directory level. It's non-trivial, but that's what tools are for.

The tests fails because I assumed it was fixed with 3.7.0.
I might add xxx@xxx.xxx instead the version logic.

Line:228, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> Adding as a code comment. Done

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