Returns commits that affected by the given revision.