warning about divergent renames

Brodie Rao brodie at bitheap.org
Mon Oct 11 09:58:56 CDT 2010


On Oct 11, 2010, at 4:27 AM, Dirkjan Ochtman wrote:

> On Fri, Sep 10, 2010 at 21:29, Dirkjan Ochtman <dirkjan at ochtman.nl>  
> wrote:
>> On Fri, Sep 10, 2010 at 20:34, Matt Mackall <mpm at selenic.com> wrote:
>>> This is another instance of an issue that needs full historical  
>>> context
>>> to progress.
>>>
>>> There originally wasn't a warning, then I added one after various  
>>> people
>>> complained. Notably there's a warning in the book about Mercurial  
>>> not
>>> doing -more- in this case.
>>
>> I suspected something like that. Do you know/remember what the edge
>> cases are why people would want to be aware of this? I think it has  
>> to
>> do with merging, right? When you merge a file that has modifications
>> on one side and a divergent rename on the other?
>
> Matt, can you respond to this? I saw Dan sent in some patches relating
> to this. For those of us trying to follow along at home, was this
> discussed at the sprint? What was the outcome?

So, there are a couple of cases where the warning happens when doing  
hg update:

1. A changeset either copies or renames the same file to different  
destinations.

2. One or more changesets *just* copy the same file to different  
destinations.

copies.copies() wasn't distinguishing between copies and renames when  
recording divergent renames, so you'd get warnings for all of those  
cases.

Dan's patch makes it only display the warning for renames. That gets  
rid of #2 completely but still warns you on actual divergent renames.


More information about the Mercurial-devel mailing list