##// END OF EJS Templates
rebase: move some variables after an error cases where they're not needed...
Martin von Zweigbergk -
r44628:1cb7ae9b default
parent child Browse files
Show More
@@ -1793,14 +1793,6 b' def defineparents(repo, rev, destmap, st'
1793 1793 for i, revs in enumerate(unwanted)
1794 1794 if revs is not None
1795 1795 )
1796 base = bases[i]
1797
1798 # newps[0] should match merge base if possible. Currently, if newps[i]
1799 # is nullrev, the only case is newps[i] and newps[j] (j < i), one is
1800 # the other's ancestor. In that case, it's fine to not swap newps here.
1801 # (see CASE-1 and CASE-2 above)
1802 if i != 0 and newps[i] != nullrev:
1803 newps[0], newps[i] = newps[i], newps[0]
1804 1796
1805 1797 # The merge will include unwanted revisions. Abort now. Revisit this if
1806 1798 # we have a more advanced merge algorithm that handles multiple bases.
@@ -1817,6 +1809,15 b' def defineparents(repo, rev, destmap, st'
1817 1809 % (rev, repo[rev], unwanteddesc)
1818 1810 )
1819 1811
1812 base = bases[i]
1813
1814 # newps[0] should match merge base if possible. Currently, if newps[i]
1815 # is nullrev, the only case is newps[i] and newps[j] (j < i), one is
1816 # the other's ancestor. In that case, it's fine to not swap newps here.
1817 # (see CASE-1 and CASE-2 above)
1818 if i != 0 and newps[i] != nullrev:
1819 newps[0], newps[i] = newps[i], newps[0]
1820
1820 1821 repo.ui.debug(b" future parents are %d and %d\n" % tuple(newps))
1821 1822
1822 1823 return newps[0], newps[1], base
General Comments 0
You need to be logged in to leave comments. Login now