warning about divergent renames

Dan Villiom Podlaski Christiansen danchr at gmail.com
Fri Sep 10 12:31:12 CDT 2010

On 10 Sep 2010, at 18:37, Faheem Mitha wrote:

> On Fri, 10 Sep 2010 07:52:39 -0500, Augie Fackler  
> <durin42 at gmail.com> wrote:
>> On Sep 9, 2010, at 3:37 AM, Sune Foldager wrote:
>>> On 09-09-2010 09:58, Dirkjan Ochtman wrote:
>>>> Hi all,
>>>> I'm seeing some people complain about the warning about divergent
>>>> renames that we have in there. I recently encountered this  
>>>> myself, and
>>>> I think in most cases there's not really anything you should do  
>>>> when
>>>> the warning occurs, meaning it's needlessly alarming for most  
>>>> people.
>>>> Can we further restrict it to cases where it actually matters?
>>> It happens when you copy a file to two different destinations, for
>>> instance. Doesn't even have to be a merge involved.
>> But why does it matter? I've not seen anything that is actually
>> *dangerous* about this, so it's just a warning with no actual harm
> A warning suggests one has done something, or at any rate it is likely
> one has done something wrong, imo. Copying a file to two places is
> just normal usage. So, I agree that in most cases the warning occurs,
> it is spurious, and should be removed if possible.

Indeed. I suspect that Dirkjan noticed this in my recent changes in  
hgsubversion, where I first split a file in two, and then added a  
third file based on one of the two. The result is:

$ hg st -C --rev 1.1.2 --rev tip hgsubversion/svnwrap
M hgsubversion/svnwrap/__init__.py
M hgsubversion/svnwrap/svn_swig_wrapper.py
A hgsubversion/svnwrap/common.py
A hgsubversion/svnwrap/subvertpy_wrapper.py
R hgsubversion/svnwrap/svn_ctypes_wrapper.py
$ hg up 1.1.2
37 files updated, 0 files merged, 8 files removed, 0 files unresolved
$ hg up
warning: detected divergent renames of hgsubversion/svnwrap/ 
svn_swig_wrapper.py to:
43 files updated, 0 files merged, 2 files removed, 0 files unresolved

I don't think the warning is appropriate here, nor is it correct; no  
file was actually renamed. A notice might be useful for the case where  
the user has a divergent copy with modifications, but I don't see how  
it qualifies for a warning…


Dan Villiom Podlaski Christiansen
danchr at gmail.com

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 1943 bytes
Desc: not available
URL: <http://selenic.com/pipermail/mercurial-devel/attachments/20100910/ab823fb8/attachment.bin>

More information about the Mercurial-devel mailing list