aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes after commit a folder to svn, cannot svn:ignore it? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "after commit a folder to svn, cannot svn:ignore it?" Watch "after commit a folder to svn, cannot svn:ignore it?" New topic
Author

after commit a folder to svn, cannot svn:ignore it?

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
I add some compile class to version control wrongly, now I want to svn:ignore it but when I right click the folder and select Team, the "add to svn:ignore" is greyed out.
So there is always an arterisk logo in that folder, any method to svn:ignore that folder after I have wrongly commit it?
Also, I found there is no svn:delete in subclipse.
I am using VisualSVN server and subclipse.

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

I do that all the time.

While you cannot literally delete the folder from SVN as though it had never been, you can do the next best thing.

1. Delete the folder in Eclipse. Do NOT use the command line or Windows explorer to do this, use the Eclipse navigator. It should decorate the folder icon with a red "X", indicating that deletion has been done. This will also schedule any child files and folders for deletion.

2. Commit that deletion to svn. That should make the folder vanish from the Navigator. For good measure, update the working copy FROM svn head after the commit in order to get everything in sync.

3. Manually create the folder using the Eclipse navigator "new folder" function.

4. Use the context menu to tag the new copy of the folder as "svn:ignore". Commit this new folder and again update the project.

Customer surveys are for companies who didn't pay proper attention to begin with.
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
fail even on step one, the folder will directly delete from eclipse, but not a red mark for delete later when commit, the whole process is shown as attached. I want svn:ignore the folder "war\com.mycompany.project.GWTDesignerFirst"


[Thumbnail for beforedelete.jpg]

[Thumbnail for delete.jpg]

[Thumbnail for deleted1.jpg]

peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
continue the file attachment of previous problem


[Thumbnail for compile.jpg]

[Thumbnail for aftercompile.jpg]

[Thumbnail for aftercompile2.jpg]

Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

There is something wrong with your first screenshot. I can't seem to find that folder in the project navigator display.

Before deleting the folder, do an "svn update" to pull it from the archive. If you were re-creating the folder by doing a build, that isn't likely to work. You need the svn copy of it.
peter tong
Ranch Hand

Joined: Mar 15, 2008
Posts: 240
OH, sorry, the first image and the third image is misplaced, the third image is the before delete screenshot, and then the second image, and then the first image (the folder is deleted).


If you were re-creating the folder by doing a build, that isn't likely to work.


yes, when I compile the source, the "war\com.mycompany.project.GWTDesignerFirst" will be regenerated, is this impossible to svn:ignore it once I commit this folder?
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16065
    
  21

When you delete and regenerate folders and folder trees, the regenerated folders and files do not have their related .svn folders and files (metadata), which are needed to process the svn delete transaction properly. Among other things, svn not only has to delete the top-level folder, but also all its children from the archive.

That is why you have to do an "svn update" before deleting the folder you want to remove from svn. For best results, do a filesystem delete of the generated folder, an "svn update" to pull the svn copy of the folder (and its children), then an svn delete to remove it from the svn archive. Or, more correctly, from the archive head, since no trustworthy version control system would allow you to literally delete stuff from history. But that's all you need anyway.

Once you've pulled the archive copy of the folder and used svn delete on it, you can regenerate the folder, mark the regenerated folder (which won't have svn metadata) as svn:ignore, then commit that operation.
 
wood burning stoves
 
subject: after commit a folder to svn, cannot svn:ignore it?