plugin merge-request/mercurial: fixed missing last line in diff while parsing patch
This commit is contained in:
parent
1a74cdce28
commit
b9a6cdd785
1 changed files with 3 additions and 0 deletions
|
|
@ -191,6 +191,9 @@ class MercurialHandler(object):
|
|||
if state == 'diff':
|
||||
if line.startswith(u'# ') or idx == len(lines)-1:
|
||||
# a new patch is starting or we have reached end of patches
|
||||
if idx == len(lines)-1:
|
||||
# end of patches, we need to keep the line
|
||||
diff.append(line)
|
||||
patch[self._m.META_COMMIT_MSG] = u'\n'.join(commit_msg)
|
||||
patch[self._m.META_DIFF] = u'\n'.join(diff)
|
||||
patches.append(patch)
|
||||
|
|
|
|||
Loading…
Reference in a new issue