Fixed a crash bug
added compress history checkbox

if the compress history checkbox is checked, only the first and
last history will show. It is used for visualize large repo.