Mercurial > hg > mercurial-crew-with-dirclash
annotate templates/manifest.tmpl @ 1998:65cc17ae9649
fix race in localrepo.addchangegroup.
localrepo.addchangegroup writes to changelog, then manifest, then normal
files. this breaks access ordering. if reader reads changelog while
manifest is being written, can find pointers into places in manifest
that are not yet written. same can happen for manifest and normal files.
fix is to make almost no change to localrepo.addchangegroup. it must
to write changelog and manifest data early because it has to read them
while writing other files. instead, write changelog and manifest data
to temp file that reader cannot see, then append temp data to manifest
after all normal files written, finally append temp data to changelog.
temp file code is in new appendfile module. can be used in other places
with small changes.
much smaller race still left. we write all new data in one write call,
but reader can maybe see partial update because python or os or filesystem
cannot always make write really atomic. file locking no help: slow, not
portable, not reliable over nfs. only real safe other plan is write to
temp file every time and rename, but performance bad when manifest or
changelog is big.
author | Vadim Gelfer <vadim.gelfer@gmail.com> |
---|---|
date | Fri, 24 Mar 2006 09:08:12 -0800 |
parents | f2ebd5251e88 |
children | 46b19175fec6 |
rev | line source |
---|---|
142 | 1 #header# |
375 | 2 <title>#repo|escape#: manifest #manifest|short#</title> |
142 | 3 </head> |
138 | 4 <body> |
5 | |
154
1d5f799ebe1e
fixed problem with head/body tags, added dtd, fixed table attributes
jake@edge2.net
parents:
153
diff
changeset
|
6 <div class="buttons"> |
1410
17703aa4491e
hgweb: shorten all the URLs in the standard templates
Matt Mackall <mpm@selenic.com>
parents:
1370
diff
changeset
|
7 <a href="?cl=#rev#">changelog</a> |
17703aa4491e
hgweb: shorten all the URLs in the standard templates
Matt Mackall <mpm@selenic.com>
parents:
1370
diff
changeset
|
8 <a href="?tags=">tags</a> |
17703aa4491e
hgweb: shorten all the URLs in the standard templates
Matt Mackall <mpm@selenic.com>
parents:
1370
diff
changeset
|
9 <a href="?cs=#node|short#">changeset</a> |
1498
78590fb4a82b
hgweb: Added archive download buttons to manifest page.
Thomas Arendsen Hein <thomas@intevation.de>
parents:
1410
diff
changeset
|
10 #archives%archiveentry# |
142 | 11 </div> |
138 | 12 |
1650
f2ebd5251e88
changed template escape filter, added urlescape filter; audited all templates for insertion bugs; added note to manifest.py about newlines in filenames
Peter van Dijk <peter@dataloss.nl>
parents:
1498
diff
changeset
|
13 <h2>manifest for changeset #node|short#: #path|escape#</h2> |
138 | 14 |
359 | 15 <table cellpadding="0" cellspacing="0"> |
16 <tr class="parity1"> | |
17 <td><tt>drwxr-xr-x</tt> | |
1650
f2ebd5251e88
changed template escape filter, added urlescape filter; audited all templates for insertion bugs; added note to manifest.py about newlines in filenames
Peter van Dijk <peter@dataloss.nl>
parents:
1498
diff
changeset
|
18 <td><a href="?mf=#manifest|short#;path=#up|urlescape#">[up]</a> |
979
87d40e085e08
hgweb: Changed manifest page to list format syntax
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
377
diff
changeset
|
19 #dentries%manifestdirentry# |
87d40e085e08
hgweb: Changed manifest page to list format syntax
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
377
diff
changeset
|
20 #fentries%manifestfileentry# |
359 | 21 </table> |
153
e8a360cd5a9f
changed pos to rev for changelog cmd, changed & to ;
jake@edge2.net
parents:
142
diff
changeset
|
22 #footer# |