D345: rebase: optimize "source" calculation in adjustdest
quark (Jun Wu)
phabricator at mercurial-scm.org
Wed Aug 16 02:33:42 EDT 2017
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
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]
To: quark, #hg-reviewers, martinvonz
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list