Added revision option support to revert and diff commands.
Fixed possible unterminated strings in hash handling in commit code.