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

Matt Harbison mharbison72 at gmail.com
Sun Mar 4 14:45:01 EST 2018


On Sun, 04 Mar 2018 13:24:20 -0500, Yuya Nishihara <yuya at tcha.org> wrote:

> # HG changeset patch
> # User Yuya Nishihara <yuya at 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:

--- 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

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.


More information about the Mercurial-devel mailing list