Mercurial > public > mercurial-scm > hg
diff hgext/mq.py @ 22545:6a2cfa61acb0
mq: upgrade non-plain patches to HG format when setting parent in patchheader
Parent will now always be updated or added when qrefreshing HG patches. Plain
patches will not be changed, but patches that neither are plain nor HG will be
upgraded to HG patches on first refresh.
author | Mads Kiilerich <madski@unity3d.com> |
---|---|
date | Sat, 20 Sep 2014 17:06:57 +0200 |
parents | 0d75ce895adc |
children | aac5482db318 |
line wrap: on
line diff
--- a/hgext/mq.py Sat Sep 20 17:06:56 2014 +0200 +++ b/hgext/mq.py Sat Sep 20 17:06:57 2014 +0200 @@ -241,7 +241,9 @@ patchheaderat = self.comments.index('# HG changeset patch') self.comments.insert(patchheaderat + 1, '# Parent ' + parent) except ValueError: - pass + if not self.plainmode: + tmp = ['# HG changeset patch', '# Parent ' + parent] + self.comments = tmp + self.comments self.parent = parent def setmessage(self, message):