##// END OF EJS Templates
streamclone: force @filecache properties to be reloaded from file...
streamclone: force @filecache properties to be reloaded from file Before this patch, consumev1() invokes repo.invalidate() after closing transaction, to force @filecache properties to be reloaded from files at next access, because streamclone writes data into files directly. But this doesn't work as expected in the case below: 1. at closing transaction, repo._refreshfilecachestats() refreshes file stat of each @filecache properties with streamclone-ed files This means that in-memory properties are treated as valid. 2. but streamclone doesn't changes in-memory properties This means that in-memory properties are actually invalid. 3. repo.invalidate() just forces to examine file stat of @filecache properties at the first access after it Such examination should concludes that reloading from file isn't needed, because file stat was already refreshed at (1). Therefore, invalid in-memory cached properties (2) are unintentionally treated as valid (1). This patch invokes repo.invalidate() with clearfilecache=True, to force @filecache properties to be reloaded from file at next access. BTW, it is accidental that repo.invalidate() without clearfilecache=True in streamclone case seems to work as expected before this patch. If transaction is started via "filtered repo" object, repo._refreshfilecachestats() tries to refresh file stat of each @filecache properties on "filtered repo" object, even though all of them are stored into "unfiltered repo" object. In this case, repo._refreshfilecachestats() does nothing unintentionally, but this unexpected behavior causes reloading @filecache properties after repo.invalidate(). This is reason why this patch should be applied before making _refreshfilecachestats() correctly refresh file stat of @filecache properties.

File last commit:

r26021:b57d05ca default
r29917:f32f8bf5 default
Show More
index.tmpl
35 lines | 1001 B | application/x-cheetah | CheetahLexer
{header}
<title>Mercurial repositories index</title>
</head>
<body>
<div id="container">
<div class="page-header">
<h1 class="breadcrumb"><a href="/">Mercurial</a> {pathdef%breadcrumb}</h1>
<ul class="page-nav">
</ul>
</div>
<table cellspacing="0">
<tr>
<td><a href="?sort={sort_name}">Name</a></td>
<td><a href="?sort={sort_description}">Description</a></td>
<td><a href="?sort={sort_contact}">Contact</a></td>
<td><a href="?sort={sort_lastchange}">Last modified</a></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
{entries%indexentry}
</table>
<div class="page-footer">
{motd}
</div>
<div id="powered-by">
<p><a href="{logourl}" title="Mercurial"><img src="{staticurl|urlescape}{logoimg}" width=75 height=90 border=0 alt="mercurial"></a></p>
</div>
</div>
<script type="text/javascript">process_dates()</script>
</body>
</html>