Commits

Andrew Godwin committed d79c63a

Use directory path for cache key, not UUID

  • Participants
  • Parent commits 22f41ca

Comments (0)

Files changed (2)

heechee/repo/hg.py

     def __init__(self, directory):
         super(Repository, self).__init__()
         # Set our repo
+        self.path = directory
         self._hg_repo = hg.repository(ui_.ui(), directory)
         # Work out a new 'UUID' (it's not one) based on the first commit's hash
         hash_hex = self.hg_repo[0].node().encode("hex")

heechee/webdav/__init__.py

         """
         Uses the request and the repo to make a cache key.
         """
-        return "%s:%s:%s:%s" % (request.method, self.repo.uuid, str(self.repo.mtime()), md5(request.path + ":" + request.raw_body).hexdigest())
+        return "%s:%s:%s:%s" % (request.method, md5(self.repo.path).hexdigest(), str(self.repo.mtime()), md5(request.path + ":" + request.raw_body).hexdigest())
     
     def access_check(self, request, accesss_type):
         # Get their status