Current SVN project - change hostname - eclipse

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.

Related

How to search for a file inside Eclipse CVS Repository without doing check out

I am eclipse CVS to checkout the Projects from a Repository location .
When i provided the path to the Eclipse CVS Repository it displayed a list of nearly 50 Projects (In Eclipse CVS Repository View )
I am searching for a Particualr java file , not sure in which project its present exactly , so my question is that , is it possible to search for a particular java file inside the Eclipse Respository without doing out the check out ??
I am using Windows 7 as Operating System and Eclipse 3.6 version .
Thanks .
[EDIT]
There is no way to "grep" a CVS repository remotely.
You will have to checkout the projects or ask a sysadmin to search for the file EasyOptions.java,v on the CVS server and tell you the path. The name of the project/CVS modules is part of that path.
If you're looking for a file in an official Eclipse project, you can use Google or grepcode.
To further narrow the search in Google, you can limit it by site:
site:eclipse.org filename

Adding images to version control with Subclipse

I know that when using Subversion, adding/copying/renaming files must be done via 'svn add' or 'svn copy' etc. In my Eclipse IDE, I use Subclipse to work with subversion. It's easy enough to add text-based files to version control (ie. php/html/js files) - but how do I properly add images to version control using Subclipse?
Thanks, Brian
If it turns out that you can't, just use SVN or (if on Windows) Tortoise to add the files outside of Eclipe, directly from the file system.

Search in SVN Eclipse plugin

I am using Subversive plugin for Eclipse to connect to SVN Code repository.
Our code base is so huge, that am finding it difficult to search for files.
I am not able to find files using Ctrl+F key also.
Is there anyway I can search for specific files in this plugin.
thanks in advance,
Regards,
PK
NO there is no search function in subversive (and not in svn either).
You can do a small workaround:
svn ls -R [YOUR_PROJECT_REPO_URL] > all_files.txt
will list all files in your repo into the file all_files.txt (Caution: This will take some time..maybe start it of friday and let it run through the weekend..). After retreiving the file you can just search via your favorite texteditor(or eclipse).
Sure this is just a workaround, and you can not update this textfile in shorter time, but if you do not rely on most current versions it is a workaround

How to change subversion settings in xcode?

I've had subversion running in Xcode for a while. The integration of subversion has always hung by a thread. However my subversion server has changed its ip address ... and my xcode project still tries to look up the source on the old ip.
I have changed the ip of the subversion server via the SCM menu in xcode ... however these changes don't seem to effect the project.
Anyone got any idea how I change the subversion ip in the project?
Cheers
Rich
I've run into a similar issue when relocating a Subversion repository would be completely ignored by XCode.
Here's a list of steps I've taken in order to force Xcode to update the repository path in my project:
Open up Terminal and go to your XCode project directory:
$ cd /path/to/your/project
Switch the Subversion working copy to the new URL (in the example below I also changed the SVN protocol but this is irrelevant):
$ svn switch --relocate svn://old_path svn+ssh://new_path
Fire up XCode, close your project's window and open up Organizer (⇧⌘2)
Go to the Projects tab, locate your project in the list on the left, right-click it and click Remove from Organizer...
Close XCode and open up your .xcodeproj XCode project file again.
You should now see an updated SVN path under the Location heading under Source Control in the File inspector (the Utilities panel).
If you go to Organizer, you should also see the project back in its place under the Projects tab and a new item under the Repositories tab.
The environment I've tested this solution in: Mac OS X Mountain Lion + XCode 4.4.1
You need to use the --relocate option for the svn switch command if you are just changing hostnames or ip addresses.
So, something like this:
svn sw --relocate svn://brian#123.123.123.123/mypath svn://brian#122.122.122.122/mypath
It's not Xcode, it's svn itself that still looks to the old reposotory. Try firing up a terminal, and cd'ing into the project directory. There use the switch svn command:
svn switch NewURL
then refresh or close/open the Xcode project.
Try creating a new SCM repository and setting your project to the new one, and if that works, you can safely delete the old one.
I had similar problems when the dns name for my svn server changed (but keeping the same IP)
svn sw --relocate worked for me (from terminal on a mac). After the change, go to "Refresh entire project" from the SCM menu in xcode.
Good idea to do an svn info first though to check your repo URL. On my first attempt I entered the wrong FROM URL and the svn sw --relocate just does nothing, with no error reported.
The confusing thing in xcode was the the SCM - repositories browser worked fine after I updated the svn settings in xcode preferences, but my project was not fixed until after the --relocate business.

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

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