NetBeans, Subversion and Symlinks

I have been using NetBeans the past couple of weeks for PHP coding, and am generally happy with it. One small annoyance I have is with the Subversion plugin and symlinks. I have a project that has symlinks to other folders. After committing the symlinks to Subversion, when I issue svn status from the command line, there are no additional files. When I check the status in NetBeans, it says all the files in the symlinked directory are new, and need to be added to the repository. I know Subversion treats a symlink as a file and in essence ignores all the stuff in the directory the symlink points to, so why is NetBeans considering it differently? The only work around I have found is to manually ignore all the files:

I could set an svn property to ignore that symlink, but I want the symlinks there when I checkout the project on another computer…

One Response to “NetBeans, Subversion and Symlinks”

  1. Mark Says:

    I’ve also come across this problem! For me its a huge issue because it basically cripples the functionality of netbeans and subversion as we have hundreds/thousands of files in the symlinked directories - imagine clicking exclude from commit for that many files! I have figured out a semi-workaround which might help out!

    If you have the ‘projects’ window open, select all files/folders (everything but the symlinked ones) you want netbeans to consider for versioning and right click on the selected files and goto ‘Subversion’ -> ‘Show Changes’. Now you’ll get a listing of all modified files that aren’t in the symlinked directories. Now if you click ‘commit all’ it will only commit the files that are listed in the subversion pane and you don’t have to worry about clicking ‘exclude from commit’ on all those files!

    One other thing: If the symlinked folder is underneath a parent folder… Deselect the parent folder and manually select everything in the folder except for the symlinked directory (using ctrl+click and ctrl+shift+click).

    It’s far from optimal but at least it works!! I’d really like to see netbeans deal with the symlinked directories properly at some point however. Hope that helps!

Leave a Reply