tags:

views:

163

answers:

2

Consider the following subversion directory structure

/dir1/file.txt

/dir2/file.txt

I want to move the file.txt in dir1 to replace the same file in dir2 and ensure that the history for the dir1 file is maintained. I don't care about the history of original dir2 file.

Is this possible using subversion commands and not hacking the backend?

+4  A: 

Firstly you should never consider hacking the backend - it negates the point of using SVN in the first place.

I don't see why you couldn't just do

svn rm /dir2/file.txt
svn mv /dir1/file.txt /dir2/file.txt

the history of the file will follow it after the move.

Richard Harrison
A: 

Try

  1. Delete dir2/file.txt and commit
  2. issue a svn move command to move dir1/file.txt to dir2/file.txt and commit - The history should be preserved.
Sijin
Duplicate answer.
Gamecat
So what happened was that I opened the page, it had no answers, I went away for a while and came back and answered. If I am going to be down voted for duplicate answers there should be a way to determine if I had seen the answers before :( :(
Sijin
There where 10+ minutes between the answers. But ok, removed the -1. (Next time try refresh ;-).
Gamecat