Merge with Eric
authorMatt Mackall <mpm@selenic.com>
Tue, 24 Jan 2006 13:50:40 +1300
changeset 1632 3f214984fd9e
parent 1631 4fb25c078d06 (current diff)
parent 1630 5ecf05541e11 (diff)
child 1633 94c179a92f4a
Merge with Eric
mercurial/localrepo.py
--- a/mercurial/localrepo.py	Tue Jan 24 13:49:20 2006 +1300
+++ b/mercurial/localrepo.py	Tue Jan 24 13:50:40 2006 +1300
@@ -1203,8 +1203,11 @@
                 filerevlog = self.file(fname)
                 # Toss out the filenodes that the recipient isn't really
                 # missing.
-                prune_filenodes(fname, filerevlog)
-                msng_filenode_lst = msng_filenode_set[fname].keys()
+                if msng_filenode_set.has_key(fname):
+                    prune_filenodes(fname, filerevlog)
+                    msng_filenode_lst = msng_filenode_set[fname].keys()
+                else:
+                    msng_filenode_lst = []
                 # If any filenodes are left, generate the group for them,
                 # otherwise don't bother.
                 if len(msng_filenode_lst) > 0:
@@ -1218,8 +1221,9 @@
                                              lookup_filenode_link_func(fname))
                     for chnk in group:
                         yield chnk
-                # Don't need this anymore, toss it to free memory.
-                del msng_filenode_set[fname]
+                if msng_filenode_set.has_key(fname):
+                    # Don't need this anymore, toss it to free memory.
+                    del msng_filenode_set[fname]
             # Signal that no more groups are left.
             yield struct.pack(">l", 0)