[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Proper way to copy files between a branch and trunk

From: Mark _ <mark_aok_at_hotmail.com>
Date: Thu, 21 Oct 2010 19:08:19 +0000

Hi all,

I have never understood the proper way to transfer files (or directories) between a branch and trunk and vice versa.

Originally I thought the svn copy command was the best command to use, but then someone on this forum informed me that instead svn merge should be used, so that in the future updates can easily be transferered using svn merge again.

The problem is...svn merge doesn't work :(

Consider a very simple scenerio:
I add a directory called myFeature to branchX. I then want to copy this myFeature directory to trunk. Using svn copy everything is fine. But check what happens when I try to merge:

$ svn merge http://svn/trunk/myFeature@HEAD http://svn/branches/branchX/myFeature@1234 .
svn: '/product/!svn/bc/389517/trunk/myFeature' path not found.

Presumably this is because the 'myFeature' directory obviously does not exist on trunk.

I'll ask again, what is the proper way to transfer code between trunk and a branch (and vice versa)? If svn copy should be used, how does one get around the tree conflicts that occur when trying to do a svn merge in the future? If svn merge should be used, how do you transfer an entire directory without getting "directory does not exist" errors?

For what it's worth I'm using SVN 1.6.5

Thanks,
Mark
                                               
Received on 2010-10-21 21:08:59 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.