contrib/perf.py
changeset 29494 3b5389ef5cfe
parent 29493 4533f5b47949
child 29495 f83445296213
equal deleted inserted replaced
29493:4533f5b47949 29494:3b5389ef5cfe
    36     repoview,
    36     repoview,
    37     revlog,
    37     revlog,
    38     scmutil,
    38     scmutil,
    39     util,
    39     util,
    40 )
    40 )
       
    41 
       
    42 # for "historical portability":
       
    43 # define util.safehasattr forcibly, because util.safehasattr has been
       
    44 # available since 1.9.3 (or 94b200a11cf7)
       
    45 _undefined = object()
       
    46 def safehasattr(thing, attr):
       
    47     return getattr(thing, attr, _undefined) is not _undefined
       
    48 setattr(util, 'safehasattr', safehasattr)
    41 
    49 
    42 formatteropts = commands.formatteropts
    50 formatteropts = commands.formatteropts
    43 revlogopts = commands.debugrevlogopts
    51 revlogopts = commands.debugrevlogopts
    44 
    52 
    45 cmdtable = {}
    53 cmdtable = {}