Mercurial > hg-stable
changeset 25211:22f4ce49044d
util: drop the 'unpacker' helper
It is not helping anything anymore.
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Mon, 18 May 2015 23:43:36 -0500 |
parents | b58dde1bb32f |
children | a39c35e8e559 |
files | mercurial/obsolete.py mercurial/util.py |
diffstat | 2 files changed, 2 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/obsolete.py Mon May 18 16:56:04 2015 -0500 +++ b/mercurial/obsolete.py Mon May 18 23:43:36 2015 -0500 @@ -299,7 +299,7 @@ # Loop on markers stop = len(data) - _fm1fsize - ufixed = util.unpacker(_fm1fixed) + ufixed = struct.Struct(_fm1fixed).unpack while off <= stop: # read fixed part
--- a/mercurial/util.py Mon May 18 16:56:04 2015 -0500 +++ b/mercurial/util.py Mon May 18 23:43:36 2015 -0500 @@ -19,7 +19,7 @@ import errno, shutil, sys, tempfile, traceback import re as remod import os, time, datetime, calendar, textwrap, signal, collections -import imp, socket, urllib, struct +import imp, socket, urllib import gc if os.name == 'nt': @@ -232,10 +232,6 @@ import subprocess closefds = os.name == 'posix' -def unpacker(fmt): - """create a struct unpacker for the specified format""" - return struct.Struct(fmt).unpack - def popen2(cmd, env=None, newlines=False): # Setting bufsize to -1 lets the system decide the buffer size. # The default for bufsize is 0, meaning unbuffered. This leads to