Mercurial 4.6 introduces a new module - logcmdutil - and migrates a number of methods from cmdutil over to logcmdutil. Some of these methods get renamed along the way.
Attempting to use smartlog in hg 4.6 or higher results in AttributeErrors being thrown; see https://bitbucket.org/facebook/hg-experimental/issues/14/broken-smartlog
This diff uses a conditional import (I suppose it could just try: the import too) to load logcmdutil if the major.minor is high enough, and then uses try/except handling to squelch the AttributeErrors.
I changed this to csdisplayer to be consistent to Mercurial naming convention (no underscores).