##// END OF EJS Templates
histedit: use safecleanupnode in _finishhistedit...
Jun Wu -
r31526:9d55494b default
parent child Browse files
Show More
@@ -1169,29 +1169,13 b' def _finishhistedit(ui, repo, state):'
1169 for n in succs[1:]:
1169 for n in succs[1:]:
1170 ui.debug(m % node.short(n))
1170 ui.debug(m % node.short(n))
1171
1171
1172 supportsmarkers = obsolete.isenabled(repo, obsolete.createmarkersopt)
1172 safecleanupnode(ui, repo, 'temp', tmpnodes)
1173 if supportsmarkers:
1174 # Only create markers if the temp nodes weren't already removed.
1175 obsolete.createmarkers(repo, ((repo[t],()) for t in sorted(tmpnodes)
1176 if t in repo))
1177 else:
1178 cleanupnode(ui, repo, 'temp', tmpnodes)
1179
1173
1180 if not state.keep:
1174 if not state.keep:
1181 if mapping:
1175 if mapping:
1182 movebookmarks(ui, repo, mapping, state.topmost, ntm)
1176 movebookmarks(ui, repo, mapping, state.topmost, ntm)
1183 # TODO update mq state
1177 # TODO update mq state
1184 if supportsmarkers:
1178 safecleanupnode(ui, repo, 'replaced', mapping)
1185 markers = []
1186 # sort by revision number because it sound "right"
1187 for prec in sorted(mapping, key=repo.changelog.rev):
1188 succs = mapping[prec]
1189 markers.append((repo[prec],
1190 tuple(repo[s] for s in succs)))
1191 if markers:
1192 obsolete.createmarkers(repo, markers)
1193 else:
1194 cleanupnode(ui, repo, 'replaced', mapping)
1195
1179
1196 state.clear()
1180 state.clear()
1197 if os.path.exists(repo.sjoin('undo')):
1181 if os.path.exists(repo.sjoin('undo')):
General Comments 0
You need to be logged in to leave comments. Login now