mirror of
https://github.com/facebook/sapling.git
synced 2024-12-28 23:54:12 +03:00
ad3f789bf9
Summary: `>>> open(file).write(data)` is a common patten for writing files across the tests. In py3 such statement return the number of bytes written in py2 the output is none. Let's make it None in py3 as well. Reviewed By: xavierd Differential Revision: D19666339 fbshipit-source-id: 5424287f85f34f3aef2d1596bb476d622464564a
22 lines
589 B
Raku
22 lines
589 B
Raku
#chg-compatible
|
|
|
|
$ newrepo
|
|
$ setconfig diff.git=1 diff.hashbinary=1
|
|
|
|
>>> _ = open('a.bin', 'wb').write(b'\0\1')
|
|
$ hg commit -m A -A a.bin
|
|
|
|
>>> _ = open('a.bin', 'wb').write(b'\0\2')
|
|
|
|
$ hg diff
|
|
diff --git a/a.bin b/a.bin
|
|
Binary file a.bin has changed to 9ac521e32f8e19473bc914e1af8ae423a6d8c122
|
|
|
|
$ HGPLAIN=1 hg diff
|
|
diff --git a/a.bin b/a.bin
|
|
Binary file a.bin has changed to 9ac521e32f8e19473bc914e1af8ae423a6d8c122
|
|
|
|
$ HGPLAIN=1 HGPLAINEXCEPT=diffopts hg diff
|
|
diff --git a/a.bin b/a.bin
|
|
Binary file a.bin has changed to 9ac521e32f8e19473bc914e1af8ae423a6d8c122
|