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

Re: Problems merging renamed file with contents changes

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2002-09-10 21:30:25 CEST

Colin D Bennett <cbennett@radsoft.com> writes:

> Is there an easier way to merge changes containing file moves on files you've
> changed? If someone else has renamed a file I've edited, and I merge in their
> changes, my changed file is conveniently deleted and the changes lost.
>
> It is possible to do an svn revert on the file with my changes, and then merge
> by hand. (I'm not sure what the best way to merge these two files then...)
> What do you do when you encounter this situation?

Yes, revert is possible. If you revert the deleted file you will then
have both files in your working copy: your original file in state '_',
and the new file in state 'A'. You can compare the two files and
determine what changes to make to the new file. If the rename is a
change you want to keep, then you will probably 'svn rm' the reverted
file once you have modified the new file.

However, you do not need to revert at all, you can merge your "lost"
changes into the renamed file directly. Something like

svn merge -r4:HEAD file:///tmp/repos/bobs-branch/REAMDE README

should do the trick.

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Sep 10 21:31:16 2002

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

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