# HG changeset patch # User Goffi # Date 1530280486 -7200 # Node ID 163aab916bcff47070e84609778864fe7382f84e # Parent 6ef2b4fa90a5734ae425591f99410bc380b7b03f plugin merge-request/mercurial: fixed missing last line in diff while parsing patch diff -r 6ef2b4fa90a5 -r 163aab916bcf sat/plugins/plugin_merge_req_mercurial.py --- 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)