hg_diff bug with empty diff fixed

#7 Merged
Repository
hgapi_diff_fix
Branch
default
Repository
hgapi
Branch
default
Author
  1. gadzhi
Reviewers
Description

If hg_command('diff') returned empty string, then result.split('\n') would return list [u'']. When we later iterate over it, IndexError is raised while trying to get diffs[-1] element. I've just wrapped the logic with if clause. Not a big deal, but it is important for our project. Thank you for this library)

Comments (2)