Issue 2343 darcs amend-record does not record my change

Title darcs amend-record does not record my change
Priority Status resolved
Milestone Resolved in 2.10.0
Superseder Nosy List bf, gpiero, markstos
Assigned To

Created on 2013-09-05.15:10:14 by bf, last changed 2013-10-10.15:08:03 by noreply.

File name Uploaded Type Edit Remove
darcs-issue2343.tar.gz bf, 2013-09-06.15:26:30 application/x-gzip
test-repo.tgz gpiero, 2013-09-10.17:57:23 application/x-gtar-compressed
msg17008 (view) Author: bf Date: 2013-09-05.15:10:13
1. Summarise the issue (what were doing, what went wrong?)

I want to amend-record a change I am shown using darcs whatsnew:

franksen@tiber: ...support/mcan/devel > darcs whatsnew    
hunk ./MultiCAN/src/protocol/LowCAL/lowcal.c 2540

So I did:

franksen@tiber: ...support/mcan/devel > darcs amend-record 
Wed Sep  4 11:59:00 CEST 2013  benjamin.franksen@helmholtz-berlin.de
  * lowcal: removed OK and ERROR, info procedures return void
Shall I amend this patch? [yNjk...], or ? for more options: y
hunk ./MultiCAN/src/protocol/LowCAL/lowcal.c 2540
Shall I add this change? (1/1)  [ynW...], or ? for more options: y
Do you want to add these changes? [Yglqk...], or ? for more options: y
Finished amending patch:
Thu Sep  5 17:00:51 CEST 2013  benjamin.franksen@helmholtz-berlin.de
  * lowcal: removed OK and ERROR, info procedures return void

But the change is still there:

franksen@tiber: ...support/mcan/devel > darcs whatsnew    
hunk ./MultiCAN/src/protocol/LowCAL/lowcal.c 2540

2. What behaviour were you expecting instead?

There should be no changes left after the amend-record.

3. What darcs version are you using? (Try: darcs --exact-version)

2.9.7 (+ 143 patches)

4. What operating system are you running?

Linux tiber 3.2.0-52-generic #78-Ubuntu SMP Fri Jul 26 16:23:24 UTC 2013
i686 i686 i386 GNU/Linux
msg17009 (view) Author: bf Date: 2013-09-05.15:17:49
Let me hazard a wild guess: could it be that this is an accidental
side-effect of the attempt to fix Issue2313?
msg17010 (view) Author: bf Date: 2013-09-06.15:26:27
I think this is darcs showing changes that aren't actually there. I just
encountered another strange behaviour (same repository):

franksen@tiber: ...support/mcan/devel > darcs revert -a
Finished reverting.
franksen@tiber: ...support/mcan/devel > darcs whatsnew 
hunk ./MultiCAN/src/protocol/LowCAL/lowcal.c 2395
-            txt[cbuf[i].var_attrib.class+3],

This happens after I deleted white space characters on the otherwise
empty line before the one listed above by whatsnew. I have attached a
small test repo that demonstrates the issue with just 3 lines copied
from my source file.
msg17018 (view) Author: gpiero Date: 2013-09-10.17:57:23
I'm often seeing the same oddities since some days, when I've switched 
to the same version of darcs as the OP.

$ darcs --version 
2.9.7 (+ 143 patches)

Not sure which version was using before (sorry, deleted), but it was 
some patches before the new implementation of the patience algorithm.

Attached there's a sample repo that shows the wrong behaviour. The 
(untracked) darcs.t.patch file is a diff between the recorded darcs.t 
file and it's actual state. Please note that the myers algorithm shows 
the correct changes (and it's always been during these days, also during 

-- wrong:
$ darcs wh -s
M ./darcs.t -40 +36
$ darcs wh | tail -n3
hunk ./darcs.t 52

-- correct:
$ darcs wh -s --myers M ./darcs.t -32 +29
$ darcs wh --myers | tail -n2
hunk ./darcs.t 52

Gian Piero.
msg17042 (view) Author: gh Date: 2013-09-22.20:43:53
I've screened Jose's patch (http://bugs.darcs.net/patch1103), please try
http://darcs.net again with patience diff.
msg17045 (view) Author: bf Date: 2013-09-23.08:50:04
Yes, it works now. Thanks!
msg17047 (view) Author: gh Date: 2013-09-24.09:45:34
Hi bf,

I'm reverting the issue as "unknown" since the patch supposed to resolve 
it is not yet it the reviewed branch. This issue will be automatically 
marked as "resolved" when the patch gets accepted.
msg17057 (view) Author: noreply Date: 2013-10-10.15:08:01
The following patch sent by Jose Luis Neder <jlneder@gmail.com> updated issue issue2343 with
status=resolved;resolvedin=2.10.0 HEAD

* resolve issue2343: darcs amend-record does not record my change 
Ignore-this: 7e7dd597bb32a25f5b9d6f72a8b0a321
Date User Action Args
2013-09-05 15:10:14bfcreate
2013-09-05 15:17:50bfsetmessages: + msg17009
2013-09-06 15:26:32bfsetfiles: + darcs-issue2343.tar.gz
messages: + msg17010
2013-09-10 17:57:24gpierosetfiles: + test-repo.tgz
messages: + msg17018
2013-09-17 21:33:29jlnederlinkpatch1103 issues
2013-09-22 20:43:54ghsetnosy: + markstos, gpiero
messages: + msg17042
2013-09-23 08:50:05bfsetstatus: unknown -> resolved
messages: + msg17045
2013-09-24 09:45:36ghsetstatus: resolved -> unknown
messages: + msg17047
2013-10-10 15:08:03noreplysetstatus: unknown -> resolved
messages: + msg17057
resolvedin: 2.10.0