Mercurial > hg
comparison tests/test-ssh-proto-unbundle.t @ 36660:11b279a75bf1
tests: fix inline extension bytes in test-ssh-proto-unbundle.t
# skip-blame just b prefixes
Differential Revision: https://phab.mercurial-scm.org/D2610
author | Augie Fackler <augie@google.com> |
---|---|
date | Sat, 03 Mar 2018 17:07:18 -0500 |
parents | 8395fddde46c |
children | 31581528f242 |
comparison
equal
deleted
inserted
replaced
36659:dc11f257ad1d | 36660:11b279a75bf1 |
---|---|
156 | 156 |
157 $ cat > $TESTTMP/failhook << EOF | 157 $ cat > $TESTTMP/failhook << EOF |
158 > from __future__ import print_function | 158 > from __future__ import print_function |
159 > import sys | 159 > import sys |
160 > def hook1line(ui, repo, **kwargs): | 160 > def hook1line(ui, repo, **kwargs): |
161 > ui.write('ui.write 1 line\n') | 161 > ui.write(b'ui.write 1 line\n') |
162 > return 1 | 162 > return 1 |
163 > def hook2lines(ui, repo, **kwargs): | 163 > def hook2lines(ui, repo, **kwargs): |
164 > ui.write('ui.write 2 lines 1\n') | 164 > ui.write(b'ui.write 2 lines 1\n') |
165 > ui.write('ui.write 2 lines 2\n') | 165 > ui.write(b'ui.write 2 lines 2\n') |
166 > return 1 | 166 > return 1 |
167 > def hook1lineflush(ui, repo, **kwargs): | 167 > def hook1lineflush(ui, repo, **kwargs): |
168 > ui.write('ui.write 1 line flush\n') | 168 > ui.write(b'ui.write 1 line flush\n') |
169 > ui.flush() | 169 > ui.flush() |
170 > return 1 | 170 > return 1 |
171 > def hookmultiflush(ui, repo, **kwargs): | 171 > def hookmultiflush(ui, repo, **kwargs): |
172 > ui.write('ui.write 1st\n') | 172 > ui.write(b'ui.write 1st\n') |
173 > ui.flush() | 173 > ui.flush() |
174 > ui.write('ui.write 2nd\n') | 174 > ui.write(b'ui.write 2nd\n') |
175 > ui.flush() | 175 > ui.flush() |
176 > return 1 | 176 > return 1 |
177 > def hookwriteandwriteerr(ui, repo, **kwargs): | 177 > def hookwriteandwriteerr(ui, repo, **kwargs): |
178 > ui.write('ui.write 1\n') | 178 > ui.write(b'ui.write 1\n') |
179 > ui.write_err('ui.write_err 1\n') | 179 > ui.write_err(b'ui.write_err 1\n') |
180 > ui.write('ui.write 2\n') | 180 > ui.write(b'ui.write 2\n') |
181 > ui.write_err('ui.write_err 2\n') | 181 > ui.write_err(b'ui.write_err 2\n') |
182 > return 1 | 182 > return 1 |
183 > def hookprintstdout(ui, repo, **kwargs): | 183 > def hookprintstdout(ui, repo, **kwargs): |
184 > print('printed line') | 184 > print('printed line') |
185 > return 1 | 185 > return 1 |
186 > def hookprintandwrite(ui, repo, **kwargs): | 186 > def hookprintandwrite(ui, repo, **kwargs): |
187 > print('print 1') | 187 > print('print 1') |
188 > ui.write('ui.write 1\n') | 188 > ui.write(b'ui.write 1\n') |
189 > print('print 2') | 189 > print('print 2') |
190 > ui.write('ui.write 2\n') | 190 > ui.write(b'ui.write 2\n') |
191 > return 1 | 191 > return 1 |
192 > def hookprintstderrandstdout(ui, repo, **kwargs): | 192 > def hookprintstderrandstdout(ui, repo, **kwargs): |
193 > print('stdout 1') | 193 > print('stdout 1') |
194 > print('stderr 1', file=sys.stderr) | 194 > print('stderr 1', file=sys.stderr) |
195 > print('stdout 2') | 195 > print('stdout 2') |
1899 | 1899 |
1900 Pushing a bundle1 with ui.write() and ui.write_err() | 1900 Pushing a bundle1 with ui.write() and ui.write_err() |
1901 | 1901 |
1902 $ cat > $TESTTMP/hook << EOF | 1902 $ cat > $TESTTMP/hook << EOF |
1903 > def hookuiwrite(ui, repo, **kwargs): | 1903 > def hookuiwrite(ui, repo, **kwargs): |
1904 > ui.write('ui.write 1\n') | 1904 > ui.write(b'ui.write 1\n') |
1905 > ui.write_err('ui.write_err 1\n') | 1905 > ui.write_err(b'ui.write_err 1\n') |
1906 > ui.write('ui.write 2\n') | 1906 > ui.write(b'ui.write 2\n') |
1907 > ui.write_err('ui.write_err 2\n') | 1907 > ui.write_err(b'ui.write_err 2\n') |
1908 > EOF | 1908 > EOF |
1909 | 1909 |
1910 $ hg init uiwriterepo | 1910 $ hg init uiwriterepo |
1911 $ cd uiwriterepo | 1911 $ cd uiwriterepo |
1912 $ cat > .hg/hgrc << EOF | 1912 $ cat > .hg/hgrc << EOF |