[PATCH] hgweb: fix serving shared clones
Wagner Bruna
wagner.bruna+mercurial at gmail.com
Thu Dec 3 15:56:15 CST 2009
# HG changeset patch
# User Wagner Bruna <wbruna at softwareexpress.com.br>
# Date 1259877047 7200
# Branch stable
# Node ID d08ad3412cedc0ddad521a483321af09483bfcf1
# Parent 8bce1e0d280105db1fa286aff28d08550767fa2c
hgweb: fix serving shared clones
diff --git a/mercurial/hgweb/common.py b/mercurial/hgweb/common.py
--- a/mercurial/hgweb/common.py
+++ b/mercurial/hgweb/common.py
@@ -37,7 +37,12 @@
def get_mtime(repo_path):
store_path = os.path.join(repo_path, ".hg")
if not os.path.isdir(os.path.join(store_path, "data")):
- store_path = os.path.join(store_path, "store")
+ new_store_path = os.path.join(store_path, "store")
+ if not os.path.isdir(new_store_path):
+ shared_path = open(os.path.join(store_path, "sharedpath")).read()
+ store_path = os.path.join(shared_path, "store")
+ else:
+ store_path = new_store_path
cl_path = os.path.join(store_path, "00changelog.i")
if os.path.exists(cl_path):
return os.stat(cl_path).st_mtime
More information about the Mercurial-devel
mailing list