Use hash of repository name to allow tags.

This commit is contained in:
Anthony Sottile
2014-06-17 20:46:46 -07:00
parent d2a349a0d8
commit 4ec877628d
3 changed files with 14 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
from __future__ import unicode_literals
import hashlib
import io
import logging
import os
@@ -74,7 +75,9 @@ class Store(object):
self.require_created()
# Check if we already exist
sha_path = os.path.join(self.directory, sha)
sha_path = os.path.join(
self.directory, sha + '_' + hashlib.md5(url).hexdigest()
)
if os.path.exists(sha_path):
return os.readlink(sha_path)