Mercurial > hg > mercurial-crew-with-dirclash
annotate templates/filelog-gitweb.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 | 586b50294ea8 |
children | d07c322e0033 |
rev | line source |
---|---|
1572
385b8872b8e3
[hgweb] Initial import of the "gitweb" style
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
diff
changeset
|
1 #header# |
1668
586b50294ea8
[hgweb] Added rename information to gitweb templates & misc cleanups
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1650
diff
changeset
|
2 <title>#repo|escape#: File revisions</title> |
1576
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
3 <link rel="alternate" type="application/rss+xml" |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
4 href="?cmd=changelog;style=rss" title="RSS feed for #repo|escape#"> |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
5 </head> |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
6 <body> |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
7 |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
8 <div class="page_header"> |
1668
586b50294ea8
[hgweb] Added rename information to gitweb templates & misc cleanups
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1650
diff
changeset
|
9 <a href="http://www.selenic.com/mercurial/" title="Mercurial"><div style="float:right;">Mercurial</div></a><a href="?cmd=summary;style=gitweb">#repo|escape#</a> / file revisions |
1572
385b8872b8e3
[hgweb] Initial import of the "gitweb" style
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
diff
changeset
|
10 </div> |
385b8872b8e3
[hgweb] Initial import of the "gitweb" style
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
diff
changeset
|
11 |
1576
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
12 <div class="page_nav"> |
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:
1576
diff
changeset
|
13 <a href="?cmd=summary;style=gitweb">summary</a> | <a href="?cmd=changelog;style=gitweb">changelog</a> | <a href="?cmd=tags;style=gitweb">tags</a> | <a href="?cmd=file;file=#file|urlescape#;filenode=#filenode#;style=gitweb">file</a> | revisions | <a href="?cmd=annotate;file=#file|urlescape#;filenode=#filenode#;style=gitweb">annotate</a> | <a href="?fl=#filenode|short#;file=#file|urlescape#;style=rss">rss</a><br/> |
1576
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
14 </div> |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
15 |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
16 <table> |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
17 #entries%filelogentry# |
145cc9f68c05
File log and some FIXMEs
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
1572
diff
changeset
|
18 </table> |
1572
385b8872b8e3
[hgweb] Initial import of the "gitweb" style
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
diff
changeset
|
19 |
385b8872b8e3
[hgweb] Initial import of the "gitweb" style
Josef "Jeff" Sipek <jeffpc@optonline.net>
parents:
diff
changeset
|
20 #footer# |