mercurial/hgweb.py
changeset 369 09f24af48b82
parent 366 21306bd3e0f5
child 375 b29219389b00
child 376 fadc9e126369
--- a/mercurial/hgweb.py
+++ b/mercurial/hgweb.py
@@ -173,7 +173,7 @@ class hgweb:
                          lines = prettyprintlines(diff),
                          parity = parity[0],
                          file = f,
-                         filenode = hex(fn))
+                         filenode = hex(fn or nullid))
             parity[0] = 1 - parity[0]
             
         def prettyprintlines(diff):
@@ -301,7 +301,7 @@ class hgweb:
         mf = self.repo.manifest.read(changes[0])
         for f in changes[3]:
             files.append(self.t("filenodelink",
-                                filenode = hex(mf[f]), file = f))
+                                filenode = hex(mf.get(f, nullid)), file = f))
 
         def diff():
             yield self.diff(p1, n, changes[3])