##// END OF EJS Templates
amend: removing redundant if condition...
Saurabh Singh -
r34057:ae92e5c0 default
parent child Browse files
Show More
@@ -3173,13 +3173,14 b' def amend(ui, repo, commitfunc, old, ext'
3173 newid = repo.commitctx(new)
3173 newid = repo.commitctx(new)
3174 finally:
3174 finally:
3175 repo.ui.setconfig('phases', 'new-commit', ph, 'amend')
3175 repo.ui.setconfig('phases', 'new-commit', ph, 'amend')
3176 if newid != old.node():
3176
3177 # Reroute the working copy parent to the new changeset
3177 # Reroute the working copy parent to the new changeset
3178 repo.setparents(newid, nullid)
3178 repo.setparents(newid, nullid)
3179 mapping = {old.node(): (newid,)}
3179 mapping = {old.node(): (newid,)}
3180 if node:
3180 if node:
3181 mapping[node] = ()
3181 mapping[node] = ()
3182 scmutil.cleanupnodes(repo, mapping, 'amend')
3182 scmutil.cleanupnodes(repo, mapping, 'amend')
3183
3183 return newid
3184 return newid
3184
3185
3185 def commiteditor(repo, ctx, subs, editform=''):
3186 def commiteditor(repo, ctx, subs, editform=''):
General Comments 0
You need to be logged in to leave comments. Login now