# HG changeset patch # User Pierre-Yves David # Date 1598343149 -7200 # Node ID 565194775c41beb9126b54d1f7cb4f60fa9fb704 # Parent f2d919aa64d60e8305ff31e80c63df7b4218b449# Parent 9242d0b5f74d34cff28b3e5f39b10efa302682dd branching: merge with stable diff -r f2d919aa64d6 -r 565194775c41 CHANGELOG --- a/CHANGELOG Fri Jul 24 00:18:12 2020 +0530 +++ b/CHANGELOG Tue Aug 25 10:12:29 2020 +0200 @@ -10,6 +10,12 @@ * stack: support foo#stack relation revset (hg-5.4+ only) +10.0.2 - in progress +-------------------- + + * py3: use '%d' for formatting revision numbers in stable range cache warning + (issue6390) + 10.0.1 -- 2020-07-31 -------------------- diff -r f2d919aa64d6 -r 565194775c41 hgext3rd/evolve/cmdrewrite.py --- a/hgext3rd/evolve/cmdrewrite.py Fri Jul 24 00:18:12 2020 +0530 +++ b/hgext3rd/evolve/cmdrewrite.py Tue Aug 25 10:12:29 2020 +0200 @@ -1308,6 +1308,13 @@ # prompting for confirmation ui.status(_(b'discarding remaining changes\n')) target = newcommits[0] + args = [] + kwargs = {} + code = cmdutil.revert.__code__ + # hg <= 5.5 (8c466bcb0879) + if r'parents' in code.co_varnames[:code.co_argcount]: + args.append((target, node.nullid)) + assert target.node() == repo.dirstate.p1() if pats: status = repo.status(match=matcher) dirty = set() @@ -1315,12 +1322,10 @@ dirty.update(status.added) dirty.update(status.removed) dirty.update(status.deleted) - dirty = sorted(dirty) - cmdutil.revert(ui, repo, repo[target], - (target, node.nullid), *dirty) + args += sorted(dirty) else: - cmdutil.revert(ui, repo, repo[target], - (target, node.nullid), all=True) + kwargs[r'all'] = True + cmdutil.revert(ui, repo, repo[target], *args, **kwargs) elif nextaction == b'?': nextaction = None ui.write(_(b"y - yes, continue selection\n")) diff -r f2d919aa64d6 -r 565194775c41 hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Fri Jul 24 00:18:12 2020 +0530 +++ b/hgext3rd/evolve/rewind.py Tue Aug 25 10:12:29 2020 +0200 @@ -151,8 +151,14 @@ revertopts = {'no_backup': True, 'all': True, 'rev': oldctx.node()} with ui.configoverride({(b'ui', b'quiet'): True}): - cmdutil.revert(repo.ui, repo, oldctx, - repo.dirstate.parents(), **revertopts) + code = cmdutil.revert.__code__ + # hg <= 5.5 (8c466bcb0879) + if r'parents' in code.co_varnames[:code.co_argcount]: + cmdutil.revert(repo.ui, repo, oldctx, + repo.dirstate.parents(), + **revertopts) + else: + cmdutil.revert(repo.ui, repo, oldctx, **revertopts) else: hg.updaterepo(repo, update_target, False) diff -r f2d919aa64d6 -r 565194775c41 hgext3rd/evolve/stablerangecache.py --- a/hgext3rd/evolve/stablerangecache.py Fri Jul 24 00:18:12 2020 +0530 +++ b/hgext3rd/evolve/stablerangecache.py Tue Aug 25 10:12:29 2020 +0200 @@ -335,7 +335,7 @@ # to add. This will confuse sqlite msg = _(b'stable-range cache: skipping write, ' b'database drifted under my feet\n') - hint = _(b'(disk: %s-%s vs mem: %s-%s)\n') + hint = _(b'(disk: %s-%d vs mem: %s-%d)\n') data = (nodemod.hex(meta[2]), meta[1], nodemod.hex(self._ondisktipnode), self._ondisktiprev) repo.ui.warn(msg)