comparison mercurial/hgweb.py @ 369:09f24af48b82

hgweb: fix deleted file in changeset key error -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hgweb: fix deleted file in changeset key error We simply point to nullid. This is very arguably the correct thing to do. manifest hash: c16f1c05a087e5d3274cb84dfd09d048430f0495 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) iD8DBQFCsPCdywK+sNU5EO8RAuJzAJ9j2Yn7KHceFxYgKvOd5V4fNNLKmQCfTZ9s jorkRZcX2hdZqRkxM8q8VMk= =+bEb -----END PGP SIGNATURE-----
author mpm@selenic.com
date Wed, 15 Jun 2005 19:23:09 -0800
parents 21306bd3e0f5
children b29219389b00 fadc9e126369
comparison
equal deleted inserted replaced
368:4b1cec05f3eb 369:09f24af48b82
171 def diffblock(diff, f, fn): 171 def diffblock(diff, f, fn):
172 yield self.t("diffblock", 172 yield self.t("diffblock",
173 lines = prettyprintlines(diff), 173 lines = prettyprintlines(diff),
174 parity = parity[0], 174 parity = parity[0],
175 file = f, 175 file = f,
176 filenode = hex(fn)) 176 filenode = hex(fn or nullid))
177 parity[0] = 1 - parity[0] 177 parity[0] = 1 - parity[0]
178 178
179 def prettyprintlines(diff): 179 def prettyprintlines(diff):
180 for l in diff.splitlines(1): 180 for l in diff.splitlines(1):
181 if l.startswith('+'): 181 if l.startswith('+'):
299 299
300 files = [] 300 files = []
301 mf = self.repo.manifest.read(changes[0]) 301 mf = self.repo.manifest.read(changes[0])
302 for f in changes[3]: 302 for f in changes[3]:
303 files.append(self.t("filenodelink", 303 files.append(self.t("filenodelink",
304 filenode = hex(mf[f]), file = f)) 304 filenode = hex(mf.get(f, nullid)), file = f))
305 305
306 def diff(): 306 def diff():
307 yield self.diff(p1, n, changes[3]) 307 yield self.diff(p1, n, changes[3])
308 308
309 yield self.t('changeset', 309 yield self.t('changeset',