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

RE: branch sync with unversioned files results in versioned file being deleted when reintegrated

From: Varnau, Steve (Neoview) <steve.varnau_at_hp.com>
Date: Mon, 1 Aug 2011 16:08:03 +0000

From: C L [mailto:cl_111_at_hotmail.com]
Sent: Sunday, July 31, 2011 8:52 PM
To: users_at_subversion.apache.org
Subject: branch sync with unversioned files results in versioned file being deleted when reintegrated

Hey all,

I found this oddity today with a branch which had an unversioned file in a checkout, which I then synced up with a trunk which had a version of the file committed. "svn merge" reported the file skipped and a "svn status" afterwards didn't complain about conflicts. The merge was committed and then reintegrated into trunk, which promptly marked the file as being deleted.

Anyone else encounter this?

Yes, this is a common scenario. It is the easiest way to inadvertently lose content when merging.
A common problem is that when you do a sync-up merge, which has new files they get added in your working copy. You revert the merge, and they get left in the working copy as private files (just like reverting any other added file). You then re-try the merge and to avoid over-writing your private files, they get skipped. The skipped messages get lost in the noise of a large merge, but you check for conflicts and finding none, you check in. As far as svn is concerned, you intentionally deleted those files in your branch. Re-integrating the branch removes them from trunk, (or parent branch).

I tell our developers to always clean up private files after reverting a merge, but it is an easy thing to miss.

By my understanding, there are some improvements coming in 1.7 which will considerably improve the situation -- better merge reporting and mergeinfo recording will not show a skipped file as merged.

-Steve
Received on 2011-08-01 18:09:43 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.