diff --git a/sat/plugins/plugin_merge_req_mercurial.py b/sat/plugins/plugin_merge_req_mercurial.py index a2aadac0..d80b1d2f 100755 --- a/sat/plugins/plugin_merge_req_mercurial.py +++ b/sat/plugins/plugin_merge_req_mercurial.py @@ -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)