# HG changeset patch # User Pierre-Yves David # Date 1435943271 25200 # Node ID 46e2c57026bcef81f5f8fc1b5a253e8497103393 # Parent d50677c3bf44db9738231278504bc2ee2642dc82 hgweb: drop the default argument for get_stat This default argument is used twice and is making things confusing. Making it explicit helps to clarify coming changesets diff -r d50677c3bf44 -r 46e2c57026bc mercurial/hgweb/common.py --- a/mercurial/hgweb/common.py Thu Jul 02 23:46:18 2015 -0700 +++ b/mercurial/hgweb/common.py Fri Jul 03 10:07:51 2015 -0700 @@ -112,8 +112,8 @@ def statusmessage(code, message=None): return '%d %s' % (code, message or _statusmessage(code)) -def get_stat(spath, fn="00changelog.i"): - """stat fn (00changelog.i by default) if it exists, spath otherwise""" +def get_stat(spath, fn): + """stat fn if it exists, spath otherwise""" cl_path = os.path.join(spath, fn) if os.path.exists(cl_path): return os.stat(cl_path) @@ -121,7 +121,7 @@ return os.stat(spath) def get_mtime(spath): - return get_stat(spath).st_mtime + return get_stat(spath, "00changelog.i").st_mtime def staticfile(directory, fname, req): """return a file inside directory with guessed Content-Type header diff -r d50677c3bf44 -r 46e2c57026bc mercurial/hgweb/hgweb_mod.py --- a/mercurial/hgweb/hgweb_mod.py Thu Jul 02 23:46:18 2015 -0700 +++ b/mercurial/hgweb/hgweb_mod.py Fri Jul 03 10:07:51 2015 -0700 @@ -120,7 +120,7 @@ return repo.filtered('served') def refresh(self, request=None): - st = get_stat(self.repo.spath) + st = get_stat(self.repo.spath, '00changelog.i') pst = get_stat(self.repo.spath, 'phaseroots') # changelog mtime and size, phaseroots mtime and size repostate = ((st.st_mtime, st.st_size), (pst.st_mtime, pst.st_size))