1. Fredrik Håård
  2. hgapi
  3. Pull requests

Pull requests

#7 Merged
Repository
hgapi_diff_fix
Branch
default
Repository
hgapi
Branch
default

hg_diff bug with empty diff fixed

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)

  • Learn about pull requests

Comments (2)