mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
Use sqlite3 instead of symlinks for managing repositories
This commit is contained in:
parent
3babceb2ca
commit
56e5c4eb2d
3 changed files with 72 additions and 34 deletions
|
|
@ -2,7 +2,6 @@ from __future__ import unicode_literals
|
|||
|
||||
import contextlib
|
||||
import functools
|
||||
import hashlib
|
||||
import os
|
||||
import os.path
|
||||
import shutil
|
||||
|
|
@ -60,14 +59,6 @@ def shell_escape(arg):
|
|||
return "'" + arg.replace("'", "'\"'\"'".strip()) + "'"
|
||||
|
||||
|
||||
def hex_md5(s):
|
||||
"""Hexdigest an md5 of the string.
|
||||
|
||||
:param text s:
|
||||
"""
|
||||
return hashlib.md5(s.encode('utf-8')).hexdigest()
|
||||
|
||||
|
||||
@contextlib.contextmanager
|
||||
def tarfile_open(*args, **kwargs):
|
||||
"""Compatibility layer because python2.6"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue