Remove query interface, add whole-repository interface; add hg support