Mercurial > libervia-backend
diff sat/plugins/plugin_merge_req_mercurial.py @ 2627:163aab916bcf
plugin merge-request/mercurial: fixed missing last line in diff while parsing patch
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 29 Jun 2018 15:54:46 +0200 |
parents | 49533de4540b |
children | 378188abe941 |
line wrap: on
line diff
--- a/sat/plugins/plugin_merge_req_mercurial.py Wed Jun 27 22:50:32 2018 +0200 +++ b/sat/plugins/plugin_merge_req_mercurial.py Fri Jun 29 15:54:46 2018 +0200 @@ -191,6 +191,9 @@ 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)