comparison mercurial/util.py @ 30053:dbcef8918bbd

util: correct check of sys.version_info sys.version is a string, and shouldn't be compared against a tuple for version comparisons. This was always true, so we were never disabling gc on 2.6. >>> (2, 7) >= '2.7' True >>> (2, 6) >= '2.7' True
author Augie Fackler <augie@google.com>
date Fri, 07 Oct 2016 08:01:16 -0400
parents ff7697b436ab
children 8b89521a69ba
comparison
equal deleted inserted replaced
30052:eaaedad68011 30053:dbcef8918bbd
879 into. As a workaround, disable GC while building complex (huge) 879 into. As a workaround, disable GC while building complex (huge)
880 containers. 880 containers.
881 881
882 This garbage collector issue have been fixed in 2.7. 882 This garbage collector issue have been fixed in 2.7.
883 """ 883 """
884 if sys.version >= (2, 7): 884 if sys.version_info >= (2, 7):
885 return func 885 return func
886 def wrapper(*args, **kwargs): 886 def wrapper(*args, **kwargs):
887 gcenabled = gc.isenabled() 887 gcenabled = gc.isenabled()
888 gc.disable() 888 gc.disable()
889 try: 889 try: