Andrew Godwin avatar Andrew Godwin committed d79c63a

Use directory path for cache key, not UUID

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
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.