Tom A
Tom A

Reputation: 1682

Tortoise SVN error on merge

I'm trying to merge two branches with Tortoise SVN, and get an error both in test mode and in the real merge. the error is:

Command: Merging from svn://[IP Address]/Folder1, revision HEAD to svn://[IP Address]/Folder2, revision HEAD into C:\code\Folder2, respecting ancestry, Test Only  
Error: Unable to connect to a repository at URL  
Error:  'svn://[IP Address]/Folder1'  
Error: Network connection closed unexpectedly  
Completed!:

Searching for this, I've found plenty of information about SVN+SSH conflicting with PuTTY, but that's not my issue as I don't even have PuTTY installed on this machine. I can check out, check in, browse, and generally work with both branches, its only merges that give me this error, and I can't find anything online that helps me. Also, I've tried removing and re-installing, and dropping back a few versions, but no luck fixing it. Does anyone know why?

Upvotes: 3

Views: 3292

Answers (3)

Jeevan Patil
Jeevan Patil

Reputation: 6079

When Tortoise does the merge, it will only use the mergeinfo property to determine which revisions to merge if you leave the revision box empty. So, you 'unblock' the revision, just merge that one explicitly. Tortoise doesn't list the already-merged revisions in the log.

Tortoise might record the merge in mergeinfo again, so have a look at the directory's svn properties afterwards to see if it does that (and edit the extra entry out - though I think the server will do this, its easier to do it manually sometimes).

The alternative way, is to look at the mergeinfo property and see if this revision is already listed, if so, remove it and commit. Then repeat the merge and it should work as you expect.

The destination usually has the mergeinfo, but I'm guessing that in your case the branch also has some which might be blocking the merge.

Upvotes: 2

David W.
David W.

Reputation: 107040

When you merge, you need a clean checkout of where you're merging to. Then, you merge the URL of the merge from in your working directory.

Fortunately, TortoiseSVN has the Subversion command line client, the svn command. Whenever you have problems with something, I recommend that you try it with the command line client because it will usually show you where the error may be.

You may have to put the PATH to the command line client in your PATH environment variable, but it should be there under the C:\Program Files\TortoiseSVN\bin directory (or where ever TortoiseSVN was installed).

Try this on the command line:

C> cd %TO_YOUR_DIRECTORY%
C> svn st   <==== You should see nothing under here. No 'M'odified files. No 'A'dded files.
C> svn up   <==== Make sure your working directory is completely up to date.

You should see a completely clean and up to date working directory. If there are any status issues, resolve them first. Or better yet, do a new clean checkout:

C> svn co svn://url/Folder1      <=== Merging to here

Once you're satisfied that everything is clean, do the merge from the command line.

C> svn merge svn://url/Folder2   <=== This is where you're merging from.

THis will give you a better idea of what is going on. I like TortoiseSVN, but sometimes convenience and ease of use just gets in the way.

By the way, check out svn help merge to see all the various command line parameters. First try it without any to make sure you don't get the same error as last time, and once you've verified that, you can do a svn revert -R . and then try again.

Upvotes: 0

Rafael Colucci
Rafael Colucci

Reputation: 6078

A long time ago I have a similar problem when I was running SVN from a virtual machine. After some testing and error I found out that the problem was the IP address. So instead of using the IP adress of the server I started to use the name of the server. I do not know why but this solved my problem.

Also, make sure you have update your SVN client. Also, you should try another SVN client to se e if you get the same error.

And you can run a CLEAN in the repository using Tortoise. Most of the errors I find can be solved by simple running the CLEAN command.

One last tip: Try to run the command in another machine, disable firewalls and antivirus.

Upvotes: 0

Related Questions