# HG changeset patch # User Andrey Vlasovskikh # Date 1268001544 -10800 # Node ID 0c560be0cd5af8c92434572bf5c63b7c97cda341 # Parent 10fa939a4a3e902a65603d06508e493e5ac41b52 Added #cf0d1e: KeyError while accessing an empty Maildir diff -r 10fa939a4a3e -r 0c560be0cd5a .issues/cf0d1e2ca226848d/new/1268012009.M102732P9773Q1.vlan-laptop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/.issues/cf0d1e2ca226848d/new/1268012009.M102732P9773Q1.vlan-laptop Mon Mar 08 01:39:04 2010 +0300 @@ -0,0 +1,18 @@ +From: Andrey Vlasovskikh +Date: Mon, 08 Mar 2010 01:23:25 +0300 +State: new +Subject: KeyError while accessing an empty Maildir +Message-Id: + +If a Maildir contains no message files, `hg ilist` raises the following +exception: + + KeyError: 'No message with key: None' + +This can happen if one updates his repository to an early revision where there +was less issues than it is now. Mercurial doesn't delete empty directories, so +an issue from the future is represented a Maildir with no messages. + +The problem is in handling the result of `_find_root_key`, which will be `None` +in that case. +