D107: util: remove dead code which used to be for old python2 versions
alex_gaynor (Alex Gaynor)
phabricator at mercurial-scm.org
Mon Jul 17 14:31:10 EDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG9a2ee9591acc: util: remove dead code which used to be for old python2 versions (authored by alex_gaynor).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D107?vs=204&id=208
REVISION DETAIL
https://phab.mercurial-scm.org/D107
AFFECTED FILES
mercurial/util.py
CHANGE DETAILS
diff --git a/mercurial/util.py b/mercurial/util.py
--- a/mercurial/util.py
+++ b/mercurial/util.py
@@ -295,16 +295,10 @@
try:
buffer = buffer
except NameError:
- if not pycompat.ispy3:
- def buffer(sliceable, offset=0, length=None):
- if length is not None:
- return sliceable[offset:offset + length]
- return sliceable[offset:]
- else:
- def buffer(sliceable, offset=0, length=None):
- if length is not None:
- return memoryview(sliceable)[offset:offset + length]
- return memoryview(sliceable)[offset:]
+ def buffer(sliceable, offset=0, length=None):
+ if length is not None:
+ return memoryview(sliceable)[offset:offset + length]
+ return memoryview(sliceable)[offset:]
closefds = pycompat.osname == 'posix'
EMAIL PREFERENCES
https://phab.mercurial-scm.org/settings/panel/emailpreferences/
To: alex_gaynor, #hg-reviewers, durin42
Cc: indygreg, mercurial-devel
More information about the Mercurial-devel
mailing list