Show More
@@ -1783,20 +1783,18 b' def clearrebased(ui, repo, destmap, stat' | |||||
1783 | oldnode = tonode(rev) |
|
1783 | oldnode = tonode(rev) | |
1784 | newnode = collapsedas or tonode(newrev) |
|
1784 | newnode = collapsedas or tonode(newrev) | |
1785 | moves[oldnode] = newnode |
|
1785 | moves[oldnode] = newnode | |
1786 |
|
|
1786 | succs = None | |
1787 | succs = None |
|
1787 | if rev in skipped: | |
1788 | if rev in skipped: |
|
1788 | if stripcleanup or not repo[rev].obsolete(): | |
1789 | if stripcleanup or not repo[rev].obsolete(): |
|
1789 | succs = () | |
1790 | succs = () |
|
1790 | elif collapsedas: | |
1791 |
|
|
1791 | collapsednodes.append(oldnode) | |
1792 | collapsednodes.append(oldnode) |
|
1792 | else: | |
1793 |
|
|
1793 | succs = (newnode,) | |
1794 |
|
|
1794 | if succs is not None: | |
1795 | if succs is not None: |
|
1795 | replacements[(oldnode,)] = succs | |
1796 | replacements[(oldnode,)] = succs |
|
|||
1797 | if collapsednodes: |
|
1796 | if collapsednodes: | |
1798 | replacements[tuple(collapsednodes)] = (collapsedas,) |
|
1797 | replacements[tuple(collapsednodes)] = (collapsedas,) | |
1799 | scmutil.cleanupnodes(repo, replacements, 'rebase', moves, backup=backup) |
|
|||
1800 | if fm: |
|
1798 | if fm: | |
1801 | hf = fm.hexfunc |
|
1799 | hf = fm.hexfunc | |
1802 | fl = fm.formatlist |
|
1800 | fl = fm.formatlist | |
@@ -1807,6 +1805,9 b' def clearrebased(ui, repo, destmap, stat' | |||||
1807 | changes[hf(oldn)] = fl([hf(n) for n in newn], name='node') |
|
1805 | changes[hf(oldn)] = fl([hf(n) for n in newn], name='node') | |
1808 | nodechanges = fd(changes, key="oldnode", value="newnodes") |
|
1806 | nodechanges = fd(changes, key="oldnode", value="newnodes") | |
1809 | fm.data(nodechanges=nodechanges) |
|
1807 | fm.data(nodechanges=nodechanges) | |
|
1808 | if keepf: | |||
|
1809 | replacements = {} | |||
|
1810 | scmutil.cleanupnodes(repo, replacements, 'rebase', moves, backup=backup) | |||
1810 |
|
1811 | |||
1811 | def pullrebase(orig, ui, repo, *args, **opts): |
|
1812 | def pullrebase(orig, ui, repo, *args, **opts): | |
1812 | 'Call rebase after pull if the latter has been invoked with --rebase' |
|
1813 | 'Call rebase after pull if the latter has been invoked with --rebase' |
@@ -55,3 +55,30 b' Getting the JSON output for nodechanges' | |||||
55 |
|
55 | |||
56 | $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}" |
|
56 | $ hg rebase -s 6 -d 4 -q -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}" | |
57 | d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol) |
|
57 | d9d6773efc831c274eace04bc13e8e6412517139: f48cd65c6dc3d2acb55da54402a5b029546e546f (no-eol) | |
|
58 | ||||
|
59 | $ hg log -G -T "{rev}:{node|short} {desc}" | |||
|
60 | o 7:f48cd65c6dc3 Added b | |||
|
61 | | | |||
|
62 | | @ 5:df21b32134ba Added d | |||
|
63 | |/ | |||
|
64 | o 4:849767420fd5 Added c | |||
|
65 | | | |||
|
66 | o 0:18d04c59bb5d Added a | |||
|
67 | ||||
|
68 | ||||
|
69 | ||||
|
70 | $ hg rebase -s 7 -d 5 -q --keep -T "{nodechanges % '{oldnode}:{newnodes % ' {node} '}'}" | |||
|
71 | f48cd65c6dc3d2acb55da54402a5b029546e546f: 6f7dda91e55e728fb798f3e44dbecf0ebaa83267 (no-eol) | |||
|
72 | ||||
|
73 | $ hg log -G -T "{rev}:{node|short} {desc}" | |||
|
74 | o 8:6f7dda91e55e Added b | |||
|
75 | | | |||
|
76 | | o 7:f48cd65c6dc3 Added b | |||
|
77 | | | | |||
|
78 | @ | 5:df21b32134ba Added d | |||
|
79 | |/ | |||
|
80 | o 4:849767420fd5 Added c | |||
|
81 | | | |||
|
82 | o 0:18d04c59bb5d Added a | |||
|
83 | ||||
|
84 |
General Comments 0
You need to be logged in to leave comments.
Login now