[PATCH 02 of 10] chgserver: document why we don't merge mtimehash and confighash
Jun Wu
quark at fb.com
Thu Jun 30 12:58:57 EDT 2016
# HG changeset patch
# User Jun Wu <quark at fb.com>
# Date 1467240800 -3600
# Wed Jun 29 23:53:20 2016 +0100
# Node ID 1d101ceeac163f43962347f9c8ee597a701f241a
# Parent 8e7bc663d76a8ac51d9587e0e441e6688c5a57b1
# Available At https://bitbucket.org/quark-zju/hg-draft
# hg pull https://bitbucket.org/quark-zju/hg-draft -r 1d101ceeac16
chgserver: document why we don't merge mtimehash and confighash
People may get confused about chg's mtimehash and confighash design: why two
hashes instead of just one. This patch adds text addressing the concern.
diff --git a/hgext/chgserver.py b/hgext/chgserver.py
--- a/hgext/chgserver.py
+++ b/hgext/chgserver.py
@@ -154,6 +154,10 @@ def _mtimehash(paths):
for chgserver, it is designed that once mtimehash changes, the server is
considered outdated immediately and should no longer provide service.
+
+ mtimehash is not included in confighash because we only know the paths of
+ extensions after importing them (there is imp.find_module but that faces
+ race conditions). Wwe need to calculate confighash without importing.
"""
def trystat(path):
try:
More information about the Mercurial-devel
mailing list