# HG changeset patch # User Anton Shestakov # Date 1595264598 -28800 # Node ID 75ca371bd9d105ee0ff08a67ce337e5cecfad9e3 # Parent 7a184d29fff5d26a3b1c6d93f02dfedf10baa54a rewind: avoid yoda condition diff -r 7a184d29fff5 -r 75ca371bd9d1 hgext3rd/evolve/rewind.py --- a/hgext3rd/evolve/rewind.py Thu Sep 17 19:51:08 2020 +0800 +++ b/hgext3rd/evolve/rewind.py Tue Jul 21 01:03:18 2020 +0800 @@ -94,7 +94,7 @@ for rev in targets: ctx = unfi[rev] ssets = obsutil.successorssets(repo, ctx.node(), cache=sscache) - if 1 < len(ssets): + if len(ssets) > 1: msg = _(b'rewind confused by divergence on %s') % ctx hint = _(b'solve divergence first or use "--as-divergence"') raise error.Abort(msg, hint=hint)