##// END OF EJS Templates
rebase: optimize "source" calculation in adjustdest...
Jun Wu -
r33848:3ae2eaec default
parent child Browse files
Show More
@@ -916,12 +916,13 b' def adjustdest(repo, rev, dest, state):'
916 |/ |/
916 |/ |/
917 A A
917 A A
918 """
918 """
919 # pick already rebased revs from state
920 source = [s for s, d in state.items() if d > 0]
921
919 result = []
922 result = []
920 for prev in repo.changelog.parentrevs(rev):
923 for prev in repo.changelog.parentrevs(rev):
921 adjusted = dest
924 adjusted = dest
922 if prev != nullrev:
925 if prev != nullrev:
923 # pick already rebased revs from state
924 source = [s for s, d in state.items() if d > 0]
925 candidate = repo.revs('max(%ld and (::%d))', source, prev).first()
926 candidate = repo.revs('max(%ld and (::%d))', source, prev).first()
926 if candidate is not None:
927 if candidate is not None:
927 adjusted = state[candidate]
928 adjusted = state[candidate]
General Comments 0
You need to be logged in to leave comments. Login now