# HG changeset patch # User Anton Shestakov # Date 1704911300 10800 # Node ID f0cbc19e77ef621958cebc08b24ed45842d764bf # Parent a7d94f235488ab7a8fc97df68b74f54c9feb4b58 topic: drop compatibility for changelog.add() for hg 5.5 and older Core Mercurial kinda made a circle with first adding p{1,2}copies in 4.9, then adding files{added,removed} in 5.0 and then removing all these kwargs again in 5.6 (6c56277317c2). We are aiming to only be compatible with 5.6 and later, so this extra code can be removed. diff -r a7d94f235488 -r f0cbc19e77ef hgext3rd/topic/__init__.py --- a/hgext3rd/topic/__init__.py Thu Oct 26 14:49:37 2023 -0300 +++ b/hgext3rd/topic/__init__.py Wed Jan 10 15:28:20 2024 -0300 @@ -973,8 +973,7 @@ self._extra[constants.extrakey] = b'' def wrapadd(orig, cl, manifest, files, desc, transaction, p1, p2, user, - date=None, extra=None, p1copies=None, p2copies=None, - filesadded=None, filesremoved=None): + date=None, extra=None): if b'topic-namespace' in extra and extra[b'topic-namespace'] == b'none': extra = extra.copy() del extra[b'topic-namespace'] @@ -985,19 +984,8 @@ # if topic is not in extra, drop namespace as well extra = extra.copy() del extra[b'topic-namespace'] - # hg <= 4.9 (0e41f40b01cc) - kwargs = {} - if p1copies is not None: - kwargs['p1copies'] = p1copies - if p2copies is not None: - kwargs['p2copies'] = p2copies - # hg <= 5.0 (f385ba70e4af) - if filesadded is not None: - kwargs['filesadded'] = filesadded - if filesremoved is not None: - kwargs['filesremoved'] = filesremoved return orig(cl, manifest, files, desc, transaction, p1, p2, user, - date=date, extra=extra, **kwargs) + date=date, extra=extra) def applychangewrap(orig, self): orig(self)