How do I delete all directories matching a pattern using SVN? - eclipse

I have checked in a huge Eclipse project from my desktop computer to the SVN server. I did it using the command line. However, by mistake I committed all the compiled classes also in the server.
For every plug-in, there is a directory /bin/ that contains the compiled classes.
Is there a way to quickly delete in the server all directories that match this pattern using the command line?
Additionally, is there a way to tell svn to ignore bin directories by default?

From here (for the 'additionally part'):
Click on Window -> Preferences
Select Team -> Ignored Resources
Click on Add Pattern and enter "bin"
Click on Apply and then OK
For the bin directories, do you have svn 1.5 ?
Because if you do, 'svn rm --keep-local' allows to pull them from version control but not delete it from your machine.
You can do it with Tortoise (Delete (keep local))

To add to what VonC suggests, if you're using the command line, you can edit your configuration file (and change your global-ignores entry) here:
~/.subversion/config
or in the windows registry:
HKCU\Software\Tigris.org\Config

Related

EGit Compare shows all lines as changed

Just installed Eclipse 4.3 (Kepler) which comes with EGit (which I updated to EGit 3.2.201312181205-r), and Git for Windows. I cloned a repository in the Git for Windows Bash shell under an existing Eclipse workspace, and then in Eclipse imported it as a project. However, if I right click a file that I haven't changed and select Compare With > HEAD Revision, it shows all lines as different.
In the Git for Windows bash shell, git diff on the file shows nothing. Running od -c on the file in Git bash shows it has Windows-style line endings.
When I go into Eclipse preferences for Compare/Patch and say to ignore whitespace, it shows no differences. But I'd like to understand why that is necessary.
What is really being compared here?
This is a know bug in Egit. https://bugs.eclipse.org/bugs/show_bug.cgi?id=342372
Even in Egit 3.4 (planned for June 2014) it won't be fixed. Robin Stocker gave this suggestion in the duplicate of the above bug:
Until this is implemented, I recommend this setup:
For each Eclipse project, go to Properties > Resource and change "New text file line delimiter" to Other: Unix. Commit the resulting
.settings/org.eclipse.core.runtime.prefs files.
Don't configure any .gitattributes or "core.autocrlf" for Git. This means that files will have the same line endings in the working
directory as in the repository. Git and EGit will not convert any file
contents.
With 1., all new files that are created in Eclipse will have correct
(LF) line endings, even when created by a user on Windows.
For files that are already in your repository with CRLF, you can fix
them and commit the result. I recommend using dos2unix or fromdos on
the command line.
However it's been reported that Egit ignores these settings when importing a project. https://bugs.eclipse.org/bugs/show_bug.cgi?id=421364
So it looks like all developers need to check the line endings themselves. But least you don't need any other tools to fix this. Under the File menu in Eclipse there's a: "Convert Line Delimiters To". Also note there are line ending settings for both individual projects and in the workspace settings.
For projects: right-click -> properities -> Resource
For Workspace: Window -> preferences -> General -> Workspace

Eclipse build failure when project folder has ampersand in pathname

I have a C/C++ project which has some normal and some linked/virtual folders and it has been building just fine. Now that I've put it into perforce over VPN (the path of which I cannot modify), there is an ampersand in the path of the project that causes eclipse to fail when it gets to building the files in the linked folders (it appears eclipse builds an entire pathname for linked folder's files from the environment variables and passes that to the gnu compiler). I don't know if Perforce allows aliasing of workspaces (to get rid of the ampersand) but I can't find one. I've tried alt root but that doesn't seem to do anything useful. I've found that using the DOS command prompt subst F:
C:\perforce\pathwithampersand will allow the project to build in eclipse but now I loose the ability to utilize the Perforce plugin features. Although I can still manually check files in/out using the P4 client, it would be very useful if the ampersand problem was taken care of by eclipse. I've searched and searched but can't find anything about eclipse having a problem (or solution) with ampersand in the folder path. I'm using eclipse platform 4.2.1 and CDT 8.1.1 but cannot update to any later version(s) than those because they are part of a tool suite a vendor controls. Perforce plugin is 2013.1/server is 2009.1.
Go to the P4 Client Connection->Edit Current Workspace
Expand the depot tree until you see your project. Right mouse click on it and choose Include Special.
Click Files radio button and click the Save button.
That will cause a path name to be displayed next to your project under Client Expression. Click to the right of this path which will cause it to become editable. Cursor over to the part that includes the ampersand and delete it. Click the OK button.
P4 will then (eventually) ask if you want to update files to the new location (or something like that). Choose update and it will take some time to create the new folder and move the files there. It is unclear whether you need to log out of P4 for it to be completely enforced so the best solution is to do so (Connection->Log Off). It might leave the old directory so you can delete it at will and it will not appear the next time you start P4.
Some users found this sequence did not work this way so they had to click the "View workspace mapping as text" button on the workspace edit dialog and delete the ampersand. Click apply.

Team->Commit in Eclipse shows resources from a symlinked directory. How to ignore?

When I want to commit my project into svn, Eclipse displays a list of files in our tmp directory. Eclipse offers the possibility to add all these files to svn. But I don't want that, I want Eclipse to ignore the entire directory.
About the project
Our project contains a symlink 'tmp' where all our cache files are written to:
lrwxrwxrwx 1 tijmen tijmen 11 Oct 14 11:28 tmp -> ../tmp
The tmp symlink is already added to svn:ignore. The ../tmp directory is not in version control.
The ../tmp directory contains a lot of cache files (837 as of now). Every time I do Team->Commit it lists all the cache files as New in the Content column. Because the list is so long it is very hard to find the files I actually want to add and/or commit.
Is there a setting in Eclipse which enables me to ignore contents of a (symlinked) directory in the Team->Commit view?
I found a solution.
Right mouse on project -> Properties -> Resource -> Resource Filters. Here I created an exclude filter to exclude symbolic links. Luckily I have only one symbolic link in this project. For other projects a stricter filter can be created.
Add the selected tmp symlink to the svn:ignore property of its container folder. If it has not been added to the repository at all, simply right click on the folder, and select Team/Add to SVN Ignore (or something really similar name).
Otherwise you might have manually remove the existing folder, and add the corresponding property to its container folder.
EDIT: BTW. I am using the Eclipse Subversive plug-in; if you are using the Subclipse plug-in, search for option setting the svn:ignore properties.

Current SVN project - change hostname

My mate created a project from SVN with bad hostname - 192.168.0.100. - yes, with a dot at the end. :)
Eclipse created this project, downloaded files, etc but there is problem with commits.
Is it possible to change SVN hostname in this current existing project from 192.168.0.100. to 192.168.0.100 without creating a new one (from shell or something) ?
Solution:
svn --relocate switch http://192.168.0.100./project http://192.168.0.100/project .
You can use the svn switch command to change the location (using the --relocate option)
You can use your favorite text search/replace tool and replace "192.168.0.100." with "192.168.0.100" in all the .svn/entries files in all the directories of the project.

ClearCase and Eclipse: How to hide/ignore files?

I'm working with Eclipse and ClearCase and we're facing the problem that there's no "ignore"-feature in ClearCase and we're having regularly checked-in files that shouldn't have been checked in.
In Eclipse, I already found the "Ignored Resources" configuration in Window -> Preferences -> Team and have been able to ignore files that follow a specific pattern that way.
But what do I do if I want to
keep a folder and all its contents from being checked in (such as a target-folder containing classes and such) or
keep a single specific file that can't be matched by a pattern in "Ignored Resources" from being checked in?
Update: We're using the provided Eclipse-plugin.
Within eclipse itself, the current ClearCase plugin cannot specify files to ignores, and they will always show up with a native ls -private command as private files.
Only a dedicated GUI (like CCRC -- ClearCase Remote Client -- used as Rich Client Platform based on eclipse) has a way to specify ignore files.
I'd say look at creating an entry in your configspec to exclude the target file/folder.
(I'm assuming you are using the Eclipse plugin)
When you create a new file or folder, it asks you whether or not you want to add the element(s) to source control. If you simply click cancel on the popup, then it will be ignored until you specifically add it. So, ClearCase, in effect, asks you whether or not this is an ignored file as soon as you create it. If the files are being checked in, blame the people who checked it in, not ClearCase.