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: Carlie Harper
date: 2011-08-17 12:43:21.000000000

Uploaded patch set 9.

-------------------------------------
author: Brenden Conley
date: 2011-08-17 12:43:24.000000000

Patch Set 9:

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

-------------------------------------
author: Carlie Harper
date: 2011-08-17 12:44:01.000000000

Patch Set 9: Looks good to me, but someone else must approve; IP review completed

- Fixed maven build
- rebased

-------------------------------------
author: Brenden Conley
date: 2011-08-17 12:48:06.000000000

Patch Set 9: Build Failed

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

-------------------------------------
author: Carlie Harper
date: 2011-08-17 13:13:24.000000000

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

Test case testMoveProjectWithinGitRepoMoveFromLevelZeroDownOne will even fail if the fix of 307140 is there, because in GitMoveDeleteHook, l. 220 we check if (!srcm.getGitDir().startsWith("../")) and fail in this case

-------------------------------------
author: Carlie Harper
date: 2011-08-17 13:33:59.000000000

Patch Set 9:

That' strange: The fix contained in the patch file of bug 307140 for class FileStore is not there in my eclipse installation (Version: 3.7.0 Build id: I20110613-1736).

I had changed the call in test method testMoveProjectWithinGitRepoMoveFromLevelZeroDownOne to

dotestMoveProjectWithinRepo("P/", "Project-1", "P/Project-1/", "P2", "P/"); to avoid the problem with the project located in the same folder as the repo,

but now I get an exception from ResourceTree.standardMoveProject(ResourceTree.java:1085): 

java.io.FileNotFoundException: C:\Eclipse\workspaces\junit-workspace\P\Project-1\P2\.project (The system cannot find the path specified)

Did you successfully run the test with eclipse 3.7.0?

-------------------------------------
author: Carlie Harper
date: 2011-08-17 14:40:29.000000000

Patch Set 9: (2 inline comments)

Now I found out why testMoveProjectWithinGitRepoMoveFromLevelZeroDownOne fails even if I change it as described above: the fix of Bug 307140 will still not allow for moving a project to a subfolder.

Please see my inline comments.

Line:326, org.eclipse.egit.core.test/src/org/eclipse/egit/core/GitMoveDeleteHookTest.java -> We should remove this test because the fix of Bug 307140 will still not allow for moving a project to a subfolder.

Line:208, org.eclipse.egit.core/src/org/eclipse/egit/core/GitMoveDeleteHook.java -> We should remove this check because moving to a subfolder does still not work in eclipse 3.7.0. 

The fix to Bug 307140 does not allow for moving to a subfolder but it only prevents to enter such a location into the "MoveProject" dialog, in order to avoid the deletion of the project.

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