From patchwork Wed Aug 16 06:33:42 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: D345: rebase: optimize "source" calculation in adjustdest From: phabricator X-Patchwork-Id: 23080 Message-Id: <2e4a2eca585e8a71ca9086487ba51a69@localhost.localdomain> To: mercurial-devel@mercurial-scm.org Date: Wed, 16 Aug 2017 06:33:42 +0000 This revision was automatically updated to reflect the committed changes. Closed by commit rHG3ae2eaecb49e: rebase: optimize "source" calculation in adjustdest (authored by quark). REPOSITORY rHG Mercurial CHANGES SINCE LAST UPDATE https://phab.mercurial-scm.org/D345?vs=779&id=982 REVISION DETAIL https://phab.mercurial-scm.org/D345 AFFECTED FILES hgext/rebase.py CHANGE DETAILS To: quark, #hg-reviewers, martinvonz Cc: mercurial-devel diff --git a/hgext/rebase.py b/hgext/rebase.py --- a/hgext/rebase.py +++ b/hgext/rebase.py @@ -916,12 +916,13 @@ |/ |/ A A """ + # pick already rebased revs from state + source = [s for s, d in state.items() if d > 0] + result = [] for prev in repo.changelog.parentrevs(rev): adjusted = dest if prev != nullrev: - # pick already rebased revs from state - source = [s for s, d in state.items() if d > 0] candidate = repo.revs('max(%ld and (::%d))', source, prev).first() if candidate is not None: adjusted = state[candidate]