Patchwork [STABLE] test-annotate: rewrite sed with some python

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

Comments

Matt Harbison - March 4, 2018, 7:45 p.m.
On Sun, 04 Mar 2018 13:24:20 -0500, Yuya Nishihara <yuya@tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya@tcha.org>
> # Date 1520187545 18000
> #      Sun Mar 04 13:19:05 2018 -0500
> # Branch stable
> # Node ID 0c042b499ba989d193783a5cd64cca866ce01ae8
> # Parent  b394778b1a5042ca5799f5bae43620dd3324c797
> test-annotate: rewrite sed with some python

No joy, on Windows anyway:


The one difference I see from Linux (where it works), is that Windows does  
have the 'buffer' attribute on sys.stdout, while Linux doesn't.  Neither  
have 'buffer' in stdin.

Patch

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

    $ hg annotate -r0 a | $PYTHON "$TESTTMP/substcr.py"
-  0: 0a[CR]0b[CR]
-  0: 0c[CR]0d[CR]
+  0: 0a[CR]0b\r (esc)
+  0: 0c[CR]0d\r (esc)
    0: 0e
    0: 0f
    0: 0g
    $ hg annotate -r1 a | $PYTHON "$TESTTMP/substcr.py"
-  0: 0a[CR]0b[CR]
-  1: 1c[CR]1d[CR]
+  0: 0a[CR]0b\r (esc)
+  1: 1c[CR]1d\r (esc)
    0: 0e
    1: 1f
    0: 0g