trim + suffix from hg commit ids