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

Re: Strange mergeinfo-behaviour on double move

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2007-11-13 19:55:41 CET

Tor, odd that you should mention this. I've spent a couple of hours this
morning trying to understand this *exact same situation*, and only came into
understanding about 10 minutes ago!

I've got a little surprise for you. You aren't seeing a local mod that
shows the addition of svn:mergeinfo. You're seeing the *removal* of that
property. Yes, I know -- you can't tell that from the 'svn diff' output.
(Paul Burba is filing an issue about that right now, in fact.)

The reason for what you are seeing is that after an update runs, your child
dir2/file2 and its parent dir2 have mergeinfo. But dir2/file2's mergeinfo
can be trivially derived from that of dir2, so some post-update code removes
it as redundant. The result is a local mod on dir2/file2 reflecting that
removal.

We're discussing in #svn-dev whether or not this is desirable behavior. I
mean, there's value to removing redundant information, but if the cost is
that 'svn update' now has the ability to create modifications, that's likely
to really confuse folks and seems (to me, anyway) to overstep 'svn update's
bounds.

Tor Ringstad wrote:
> I was toying around with subversions new "multiple working copy
> copy/move operations" when I noticed the following strange behaviour:
>
> If I simultaneously rename both a directory and a file in that
> directory, then commit, then update, I will suddenly have local
> modifications in my WC (added svn:mergeinfo).
>
> Here's a reproduction:
>
> # Preparations; create a directory with one file
>
> svn mkdir dir
> touch dir/file
> svn add dir/file
> svn commit -m "preparations"
> svn up
> svn st
>
> # Rename both the directory and the file
>
> svn mv dir dir2
> svn mv dir2/file dir2/file2
> svn commit -m "double move"
> svn st
>
> # Everything seems fine so far, in particular no local changes. But at
> # the next update, something surprising happens:
>
> svn up
> # At revision 55.
>
> svn st
> # M dir2/file2
>
> # What? We suddenly have local changes?
>
> svn diff
> # Property changes on: dir2/file2
> # ___________________________________________________________________
> # Name: svn:mergeinfo
>
>
>
> - Tor Ringstad -
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
>

-- 
C. Michael Pilato <cmpilato@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand

Received on Tue Nov 13 19:56:06 2007

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