reset password
Author Message
hgadhia
Posts: 52
Posted 14:26 Jan 22, 2015 |

In the Maven project created in HW2, I tried to rename few file/package names for HW3, and got few issues;

  1. I created a file called springmvc-servlet.xml in HW2. Now I have renamed this file to gefp-servlet.xml in HW3. I tried to commit this file in the cs3 repository, but got an error.
  2. I renamed the package name in HomeController.java from springmvc.web.controller to gefp.web.controller. Now the folder shows a blue plus sign in eclipse(Earlier it showed a orange bar).

So to update these changes on the repository created earlier, do I need to create a new folder in the trunk or is there a way to update the filenames and folder names online without creating a new folder in the trunk.

Error in console:

Illegal target for the requested operation
svn: Commit failed (details follow):
svn: Cannot commit 'D:\eclipse-luna\eclipse\workspace\gefp\src\main\webapp\WEB-INF\gefp-servlet.xml' because it was moved from 'D:\eclipse-luna\eclipse\workspace\gefp\src\main\webapp\WEB-INF\springmvc-servlet.xml' which is not part of the commit; both sides of the move must be committed together

 

Can someone please help?

Last edited by hgadhia at 14:34 Jan 22, 2015.
cysun
Posts: 2935
Posted 14:42 Jan 22, 2015 |

A rename operation is basically a delete operation plus an add operation. The error message says that you were trying to commit the "added" file but not the "deleted" one. You should see both as in the example below:

hgadhia
Posts: 52
Posted 14:51 Jan 22, 2015 |

So does that mean I need to create a new file with the new name and commit both files?

I am really confused in this area.

cysun
Posts: 2935
Posted 14:57 Jan 22, 2015 |
hgadhia wrote:

So does that mean I need to create a new file with the new name and commit both files?

I am really confused in this area.

You just need to do rename in Eclipse - right click on the file and select Rename..., or if it's a package or class, select Refactor -> Rename...

If you do it outside Eclipse (e.g. using Windows File Manager), it won't go through Subversion so it'll mess up version control.

 

hgadhia
Posts: 52
Posted 15:16 Jan 22, 2015 |

I am sorry, I am not getting this right. I have done the rename in the eclipse, and not in the file system.

I have uploaded the screenshot to show the icons against these files. May be I am doing it in a wrong way.

Attachments:
cysun
Posts: 2935
Posted 15:20 Jan 22, 2015 |

What does the commit screen look like?

hgadhia
Posts: 52
Posted 15:28 Jan 22, 2015 |

Ok I get my mistake. It can get really tough because of a small thing.

I was trying to commit the file and not the entire project. So these errors arise, i guess.

After I commit the entire project, I was able to get the changes done on the repository.

Thanks for the help Dr Sun.