Submitter | Yuya Nishihara |
---|---|
Date | March 4, 2018, 7:53 p.m. |
Message ID | <20180304145300.ff97f3b1190a4fea0948ce61@tcha.org> |
Download | mbox | patch |
Permalink | /patch/28981/ |
State | Not Applicable |
Headers | show |
Comments
On Sun, 04 Mar 2018 14:53:00 -0500, Yuya Nishihara <yuya@tcha.org> wrote: > On Sun, 04 Mar 2018 14:45:01 -0500, Matt Harbison wrote: >> 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: > > Can you test this? > > diff --git a/tests/test-annotate.t b/tests/test-annotate.t > --- a/tests/test-annotate.t > +++ b/tests/test-annotate.t > @@ -903,6 +903,9 @@ Annotate with orphaned CR (issue5798) > $ cat <<'EOF' >> "$TESTTMP/substcr.py" > > import sys > + > from mercurial import util > + > util.setbinary(sys.stdin) > + > util.setbinary(sys.stdout) > > stdin = getattr(sys.stdin, 'buffer', sys.stdin) > > stdout = getattr(sys.stdout, 'buffer', sys.stdout) > > stdout.write(stdin.read().replace(b'\r', b'[CR]')) This does the trick for Windows, thanks.
Patch
diff --git a/tests/test-annotate.t b/tests/test-annotate.t --- a/tests/test-annotate.t +++ b/tests/test-annotate.t @@ -903,6 +903,9 @@ Annotate with orphaned CR (issue5798) $ cat <<'EOF' >> "$TESTTMP/substcr.py" > import sys + > from mercurial import util + > util.setbinary(sys.stdin) + > util.setbinary(sys.stdout) > stdin = getattr(sys.stdin, 'buffer', sys.stdin) > stdout = getattr(sys.stdout, 'buffer', sys.stdout) > stdout.write(stdin.read().replace(b'\r', b'[CR]'))