darcs

Issue 2739 darcs failed to commute common patches

Title darcs failed to commute common patches
Priority invalid Status duplicate
Milestone Resolved in
Superseder Nosy List lemming
Assigned To
Topics

Created on 2025-01-22.09:09:08 by lemming, last changed 2025-01-28.13:18:01 by bfrk.

Messages
msg24168 (view) Author: lemming Date: 2025-01-22.09:08:59
On Wed, 22 Jan 2025, Henning Thielemann wrote:

> I have attached two repositories, where htam-4.16 is a cherry picked version 
> of "htam". When I push or pull patches between htam and htam-4.16 I get:

I remember I created htam-4.16 by pulling some patches from htam, answered 
"w" to most patches and only "y" to the last two ones.
msg24169 (view) Author: bfrk Date: 2025-01-28.00:42:23
The error message was:

This is a bug! Please report it at http://bugs.darcs.net or via email to 
bugs@darcs.net:
failed to commute common patches
CallStack (from HasCallStack):
  error, called at src/Darcs/Patch/Ident.hs:277:10 in darcs-2.18.5-
6c16f972831d2226bab583beffd8387531edab291caba6a3fc0d1e5b14a3c20f:Darcs.P
atch.Ident

I know this because I received a copy of the original bug report email 
to bugs@darcs.net, which apparently did not result in creating an entry 
in the tracker. However, this is a different issue.
msg24170 (view) Author: bfrk Date: 2025-01-28.12:19:34
When I saw this report, I was ready to dismiss it as being caused by the 
well-known problems in darcs-2 patch semantics. However, looking closer at 
the two repos reveals that there are neither conflictors nor duplicates on 
either side! I am investigating what happens here.
msg24171 (view) Author: bfrk Date: 2025-01-28.12:57:42
After instrumenting darcs to print information about the common patches that 
it cannot commute, I was able to narrow the problem down. It appears that in 
htam-4.16 (but not in htam) we have this patch:

patch b5e1fcb06ca81dc05a006a987dd3b5bd28340c52
Author: haskell@henning-thielemann.de
Date:   Mon Jan 20 00:34:31 CET 2025
  * Fourier.transform_bijective, transform_transform
  PrimitiveRoot.root_pow_top_sq, primitive_root_inv
  Fin.natCast_mul

In both repos we have

patch 7d7eb29c3f49a107ea8b89b8ec8cab08d1f3f77b
Author: haskell@henning-thielemann.de
Date:   Tue Jan 21 19:24:18 CET 2025
  * Vector.Linear: module extracted from Fourier.Basic

Now, in htam-4.16 the latter (7d7eb29c) depends on the former (b5e1fcb0), 
while obviously this is not the case in htam which doesn't even have 
b5e1fcb0.

The first step in solving this riddle will be to understand why exactly the 
two patches do not commute in htam-4.16.
msg24177 (view) Author: bfrk Date: 2025-01-28.13:18:00
See issue2738.
History
Date User Action Args
2025-01-22 09:09:08lemmingcreate
2025-01-28 00:42:24bfrksetmessages: + msg24169
2025-01-28 12:19:34bfrksetmessages: + msg24170
2025-01-28 12:57:42bfrksetmessages: + msg24171
2025-01-28 13:18:01bfrksetstatus: unknown -> duplicate
priority: invalid
messages: + msg24177