darcs

Issue 2567 darcs whatsnew --unified outputs wrong context lines

Title darcs whatsnew --unified outputs wrong context lines
Priority Status duplicate
Milestone Resolved in
Superseder Nosy List bfrk
Assigned To
Topics

Created on 2018-02-18.17:59:40 by bfrk, last changed 2020-06-21.06:38:46 by bfrk.

Messages
msg19900 (view) Author: bfrk Date: 2018-02-18.17:59:38
The context calculation seems to be broken. Here is an example. The
recorded state is

1
2
3
4
5

This is the modified file:

1
3
4x
5

This is the expected output:

ben@yuiitsu[1]:/tmp/context>darcs whatsnew --unified
hunk ./file 2
 1
-2
 3
hunk ./file 3
-4
+4x
 5

and this is what you currently get:

ben@yuiitsu[1]:/tmp/context>darcs whatsnew --unified
hunk ./file 2
 1
-2
 3
 4
 5
hunk ./file 3
 1
 2
-4
+4x
 4
 5

I just tracked this down to:

patch 416f12b399c5fb1c64771302e80b54e68a40435c
Author: Ben Franksen <ben.franksen@online.de>
Date:   Thu Aug 31 23:37:43 CEST 2017
  * clean up display of file names by separating display and storage of
patches

I also found that we have no tests for the --unified flag (except for
darcs diff, but that is a different code path).
msg22073 (view) Author: bfrk Date: 2020-06-21.06:38:44
See issue2568
History
Date User Action Args
2018-02-18 17:59:40bfrkcreate
2020-06-21 06:38:46bfrksetstatus: unknown -> duplicate
messages: + msg22073