# HG changeset patch # User Matt Harbison # Date 1556420388 14400 # Node ID c9798965b1f4d9a4cb69c03f1d528413fbd61975 # Parent 0adb59b55addc73d9a64cc1e0d9854391b5e3dd5 revset: switch internal uses and tests to `predecessors` from legacy name diff -r 0adb59b55add -r c9798965b1f4 hgext3rd/evolve/__init__.py --- a/hgext3rd/evolve/__init__.py Sat Apr 27 22:33:16 2019 -0400 +++ b/hgext3rd/evolve/__init__.py Sat Apr 27 22:59:48 2019 -0400 @@ -497,7 +497,7 @@ def _installalias(ui): if ui.config('alias', 'odiff', None) is None: ui.setconfig('alias', 'odiff', - "diff --hidden --rev 'limit(precursors(.),1)' --rev .", + "diff --hidden --rev 'limit(predecessors(.),1)' --rev .", 'evolve') ### Unstable revset symbol diff -r 0adb59b55add -r c9798965b1f4 hgext3rd/evolve/evolvecmd.py --- a/hgext3rd/evolve/evolvecmd.py Sat Apr 27 22:33:16 2019 -0400 +++ b/hgext3rd/evolve/evolvecmd.py Sat Apr 27 22:59:48 2019 -0400 @@ -204,7 +204,7 @@ msg = _('skipping %s : we do not handle merge yet\n') % bumped ui.write_err(msg) return (False, ".") - prec = repo.set('last(allprecursors(%d) and public())', bumped.rev()).next() + prec = repo.set('last(allpredecessors(%d) and public())', bumped.rev()).next() # For now we deny target merge if len(prec.parents()) > 1: msg = _('skipping: %s: public version is a merge, ' @@ -1120,7 +1120,7 @@ XXX this woobly function won't survive XXX """ repo = ctx._repo.unfiltered() - for base in repo.set('reverse(allprecursors(%d))', ctx.rev()): + for base in repo.set('reverse(allpredecessors(%d))', ctx.rev()): newer = obsutil.successorssets(ctx._repo, base.node()) # drop filter and solution including the original ctx newer = [n for n in newer if n and ctx.node() not in n] @@ -1318,7 +1318,7 @@ ctx = repo[rev] unpars = _preparelistctxs(ctx.parents(), lambda p: p.orphan()) obspars = _preparelistctxs(ctx.parents(), lambda p: p.obsolete()) - imprecs = _preparelistctxs(repo.set("allprecursors(%n)", ctx.node()), + imprecs = _preparelistctxs(repo.set("allpredecessors(%n)", ctx.node()), lambda p: not p.mutable()) dsets = divergentsets(repo, ctx) diff -r 0adb59b55add -r c9798965b1f4 hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Sat Apr 27 22:33:16 2019 -0400 +++ b/hgext3rd/evolve/rewind.py Sat Apr 27 22:59:48 2019 -0400 @@ -136,7 +136,7 @@ rewinded.update(scmutil.revrange(repo, revsto)) if revsfrom: succs = scmutil.revrange(repo, revsfrom) - rewinded.update(unfi.revs('precursors(%ld)', succs)) + rewinded.update(unfi.revs('predecessors(%ld)', succs)) if not rewinded: raise error.Abort('no revision to rewind to') diff -r 0adb59b55add -r c9798965b1f4 tests/test-obsolete.t --- a/tests/test-obsolete.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-obsolete.t Sat Apr 27 22:59:48 2019 -0400 @@ -66,9 +66,9 @@ 2 - 4538525df7e2 -Test that obsolete precursors are properly computed +Test that obsolete predecessors are properly computed - $ qlog -r 'precursors(.)' --hidden + $ qlog -r 'predecessors(.)' --hidden 2 - 4538525df7e2 $ qlog -r . @@ -110,7 +110,7 @@ - 4538525df7e2 3 - 0d3f46688ccc - $ qlog -r 'allprecursors(4)' --hidden + $ qlog -r 'allpredecessors(4)' --hidden 2 - 4538525df7e2 3 diff -r 0adb59b55add -r c9798965b1f4 tests/test-rewind.t --- a/tests/test-rewind.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-rewind.t Sat Apr 27 22:59:48 2019 -0400 @@ -802,7 +802,7 @@ Automatically rewinding the full stack (with --to) -------------------------------------------------- - $ hg rewind --hidden --to 'precursors(.)' + $ hg rewind --hidden --to 'predecessors(.)' rewinded to 2 changesets (2 changesets obsoleted) working directory is now at 70892f498f29 diff -r 0adb59b55add -r c9798965b1f4 tests/test-sharing.t --- a/tests/test-sharing.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-sharing.t Sat Apr 27 22:59:48 2019 -0400 @@ -534,7 +534,7 @@ o 3:a06ec1bf97bd public fix bug 15 (v2) | ~ - $ hg --hidden shortlog -r 'precursors(b1499b0f03ca)' + $ hg --hidden shortlog -r 'predecessors(b1499b0f03ca)' 5:a360947f6faf draft fix bug 24 (v2 by bob) 6:e3f99ce9d9cd draft fix bug 24 (v2 by alice) $ cat file1 diff -r 0adb59b55add -r c9798965b1f4 tests/test-topic-stack-complex.t --- a/tests/test-topic-stack-complex.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-topic-stack-complex.t Sat Apr 27 22:59:48 2019 -0400 @@ -146,7 +146,7 @@ 3 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg id -r . ec94a1ed1330 tip - $ hg up --hidden 'min(precursors(.))' + $ hg up --hidden 'min(predecessors(.))' 1 files updated, 0 files merged, 0 files removed, 0 files unresolved updated to hidden changeset f1d3649d6a8b (hidden revision 'f1d3649d6a8b' was rewritten as: ec94a1ed1330) diff -r 0adb59b55add -r c9798965b1f4 tests/test-uncommit.t --- a/tests/test-uncommit.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-uncommit.t Sat Apr 27 22:59:48 2019 -0400 @@ -361,9 +361,9 @@ b: no such file in rev 5b27f6b17da2 [1] -Test uncommiting precursors +Test uncommiting predecessors - $ hg uncommit --hidden --rev 'precursors(.)' b --traceback + $ hg uncommit --hidden --rev 'predecessors(.)' b --traceback $ hg cat b --rev . b b diff -r 0adb59b55add -r c9798965b1f4 tests/test-userguide.t --- a/tests/test-userguide.t Sat Apr 27 22:33:16 2019 -0400 +++ b/tests/test-userguide.t Sat Apr 27 22:59:48 2019 -0400 @@ -122,7 +122,7 @@ ~ $ hg --hidden log -q -r 'successors(05e61aab8294) | successors(be6d5bc8e4cc) | successors(35f432d9f7c1)' 9:171c6a79a27b - $ hg --hidden log -q -r 'precursors(171c6a79a27b)' + $ hg --hidden log -q -r 'predecessors(171c6a79a27b)' 6:05e61aab8294 7:be6d5bc8e4cc 8:35f432d9f7c1