darcs

Issue 2567 darcs whatsnew --unified outputs wrong context lines

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

Created on 2018-02-18.17:59:40 by bf, last changed 2018-02-18.17:59:40 by bf.

Messages
msg19900 (view) Author: bf 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).
History
Date User Action Args
2018-02-18 17:59:40bfcreate