[PATCH] store: add comment in _hashencode with reason for skipping the first 5 chars

Adrian Buehlmann adrian at cadifra.com
Wed May 13 18:43:16 UTC 2015


# HG changeset patch
# User Adrian Buehlmann <adrian at cadifra.com>
# Date 1431542216 -7200
# Node ID 27ba2f5ec24f4aca655433eb7185a9aa12e4c575
# Parent  297ea0df75d0f7ab552fc8986d04c8196de8d9dd
store: add comment in _hashencode with reason for skipping the first 5 chars

diff --git a/mercurial/store.py b/mercurial/store.py
--- a/mercurial/store.py
+++ b/mercurial/store.py
@@ -187,7 +187,7 @@
 
 def _hashencode(path, dotencode):
     digest = _sha(path).hexdigest()
-    le = lowerencode(path[5:]).split('/')
+    le = lowerencode(path[5:]).split('/') # skips prefix 'data/'
     parts = _auxencode(le, dotencode)
     basename = parts[-1]
     _root, ext = os.path.splitext(basename)


More information about the Mercurial-devel mailing list