follow camlistore.org's refactoring (b24cad68) up to 91ffe6