a —+«bUã@sbdZddlmZddlmZmZmZddlmZda dd„Z dd „Z d d „Z d d „Z e ejƒZdS)z*utilities to assist in working with pygit2é)Úabsolute_import)ÚbinÚhexÚsha1nodeconstants)ÚpycompatNc Cs6tdur2zddlatjWnttfy0Yn0tS)Nr)Ú pygit2_moduleZpygit2ZInvalidSpecErrorÚ ImportErrorÚAttributeError©r r ú7/usr/lib64/python3.9/site-packages/hgext/git/gitutil.pyÚ get_pygit2 s r cCs:tƒ}d}|r,z |j}Wnty*Yn0d| d¡S)NzN/As (pygit2 %s)zutf-8)r Ú __version__r Úencode)ÚmodÚvr r r Úpygit2_versions  rcCst t|ƒ¡S)zŠWrapper to convert a Mercurial binary node to a unicode hexlified node. pygit2 and sqlite both need nodes as strings, not bytes. )rZsysstrr©Únr r r Ú togitnode$srcCstjrt| d¡ƒSt|ƒS)zOpposite of togitnode.Úascii)rZispy3rrrr r r Ú fromgitnode-sr)Ú__doc__Z __future__rZmercurial.noderrrZ mercurialrrr rrrZnullidZnullgitr r r r Ús