diff -r 53c265a6fc83 -r edf4fa06df94 mercurial/revlog.py --- a/mercurial/revlog.py Tue Oct 13 03:30:49 2020 +0200 +++ b/mercurial/revlog.py Tue Oct 13 05:14:37 2020 +0200 @@ -2705,14 +2705,16 @@ (srcrevlog, rev) - and return a triplet that control changes to sidedata content from the + and return a quintet that control changes to sidedata content from the old revision to the new clone result: - (dropall, filterout, update) + (dropall, filterout, update, new_flags, dropped_flags) * if `dropall` is True, all sidedata should be dropped * `filterout` is a set of sidedata keys that should be dropped * `update` is a mapping of additionnal/new key -> value + * new_flags is a bitfields of new flags that the revision should get + * dropped_flags is a bitfields of new flags that the revision shoudl not longer have """ if deltareuse not in self.DELTAREUSEALL: raise ValueError( @@ -2783,7 +2785,7 @@ p2 = index[entry[6]][7] node = entry[7] - sidedataactions = (False, [], {}) + sidedataactions = (False, [], {}, 0, 0) if sidedatacompanion is not None: sidedataactions = sidedatacompanion(self, rev) @@ -2792,7 +2794,11 @@ cachedelta = None rawtext = None if any(sidedataactions) or deltareuse == self.DELTAREUSEFULLADD: - dropall, filterout, update = sidedataactions + dropall = sidedataactions[0] + filterout = sidedataactions[1] + update = sidedataactions[2] + new_flags = sidedataactions[3] + dropped_flags = sidedataactions[4] text, sidedata = self._revisiondata(rev) if dropall: sidedata = {} @@ -2801,6 +2807,10 @@ sidedata.update(update) if not sidedata: sidedata = None + + flags |= new_flags + flags &= ~dropped_flags + destrevlog.addrevision( text, tr,