Patchwork [STABLE] annotate: do not poorly split lines at CR (issue5798)

login
register
mail settings
Submitter Matt Harbison
Date March 4, 2018, 3:45 a.m.
Message ID <op.zfb12qdi9lwrgf@envy>
Download mbox | patch
Permalink /patch/28900/
State Not Applicable
Headers show

Comments

Matt Harbison - March 4, 2018, 3:45 a.m.
On Wed, 21 Feb 2018 07:49:41 -0500, Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1519215245 -32400
> #      Wed Feb 21 21:14:05 2018 +0900
> # Branch stable
> # Node ID 24b17a714a92c8fe860db5f6d0d49c23293deec6
> # Parent  c19e66dacaa184feba31136c18a369ba995ddfe4
> annotate: do not poorly split lines at CR (issue5798)

Should this difference be conditionalized away, or is it  
important/unexpected?

$ ./run-tests.py --local -t9000 -j9 test-annotate.t
Yuya Nishihara - March 4, 2018, 12:20 p.m.
On Sat, 03 Mar 2018 22:45:52 -0500, Matt Harbison wrote:
> On Wed, 21 Feb 2018 07:49:41 -0500, Yuya Nishihara <yuya@tcha.org> wrote:
> 
> > # HG changeset patch
> > # User Yuya Nishihara <yuya@tcha.org>
> > # Date 1519215245 -32400
> > #      Wed Feb 21 21:14:05 2018 +0900
> > # Branch stable
> > # Node ID 24b17a714a92c8fe860db5f6d0d49c23293deec6
> > # Parent  c19e66dacaa184feba31136c18a369ba995ddfe4
> > annotate: do not poorly split lines at CR (issue5798)
> 
> Should this difference be conditionalized away, or is it  
> important/unexpected?

>     $ hg annotate -r0 a | substcr
> -  0: 0a[CR]0b[CR]
> -  0: 0c[CR]0d[CR]
> +  0: 0a[CR]0b
> +  0: 0c[CR]0d

It's kinda important. Is the last CR eaten by Windows sed?

Patch

--- c:/Users/Matt/projects/hg/tests/test-annotate.t
+++ c:/Users/Matt/projects/hg/tests/test-annotate.t.err
@@ -913,14 +913,14 @@ 
    $ hg ci -m1

    $ hg annotate -r0 a | substcr
-  0: 0a[CR]0b[CR]
-  0: 0c[CR]0d[CR]
+  0: 0a[CR]0b
+  0: 0c[CR]0d
    0: 0e
    0: 0f
    0: 0g
    $ hg annotate -r1 a | substcr
-  0: 0a[CR]0b[CR]
-  1: 1c[CR]1d[CR]
+  0: 0a[CR]0b
+  1: 1c[CR]1d
    0: 0e
    1: 1f
    0: 0g