# HG changeset patch # User Gregory Szorc # Date 2018-02-24 19:07:07 # Node ID 0b57596253b89d7dc5e6d0c03e1aa3e20fa241aa # Parent 6905c4ec312cc0a66ea5f9a9332c39f786414422 rebase: use ctx.rev() instead of %d % ctx Weaning away from basectx.__int__. Differential Revision: https://phab.mercurial-scm.org/D2427 diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -924,7 +924,7 @@ def _definedestmap(ui, repo, rbsrt, dest roots = [] # selected children of branching points bpbase = {} # {branchingpoint: [origbase]} for b in base: # group bases by branching points - bp = repo.revs('ancestor(%d, %d)', b, dest).first() + bp = repo.revs('ancestor(%d, %d)', b, dest.rev()).first() bpbase[bp] = bpbase.get(bp, []) + [b] if None in bpbase: # emulate the old behavior, showing "nothing to rebase" (a better @@ -946,7 +946,7 @@ def _definedestmap(ui, repo, rbsrt, dest else: ui.status(_('nothing to rebase - working directory ' 'parent is also destination\n')) - elif not repo.revs('%ld - ::%d', base, dest): + elif not repo.revs('%ld - ::%d', base, dest.rev()): if basef: ui.status(_('nothing to rebase - "base" %s is ' 'already an ancestor of destination '