##// END OF EJS Templates
amend: don't preserve most extra fields...
Siddharth Agarwal -
r27973:ce969619 stable
parent child Browse files
Show More
@@ -2623,11 +2623,6 b' def amend(ui, repo, commitfunc, old, ext'
2623 message = old.description()
2623 message = old.description()
2624
2624
2625 pureextra = extra.copy()
2625 pureextra = extra.copy()
2626 if 'amend_source' in pureextra:
2627 del pureextra['amend_source']
2628 pureoldextra = old.extra()
2629 if 'amend_source' in pureoldextra:
2630 del pureoldextra['amend_source']
2631 extra['amend_source'] = old.hex()
2626 extra['amend_source'] = old.hex()
2632
2627
2633 new = context.memctx(repo,
2628 new = context.memctx(repo,
@@ -2645,7 +2640,7 b' def amend(ui, repo, commitfunc, old, ext'
2645 and newdesc == old.description()
2640 and newdesc == old.description()
2646 and user == old.user()
2641 and user == old.user()
2647 and date == old.date()
2642 and date == old.date()
2648 and pureextra == pureoldextra):
2643 and pureextra == old.extra()):
2649 # nothing changed. continuing here would create a new node
2644 # nothing changed. continuing here would create a new node
2650 # anyway because of the amend_source noise.
2645 # anyway because of the amend_source noise.
2651 #
2646 #
@@ -1682,9 +1682,6 b' def _docommit(ui, repo, *pats, **opts):'
1682 if not allowunstable and old.children():
1682 if not allowunstable and old.children():
1683 raise error.Abort(_('cannot amend changeset with children'))
1683 raise error.Abort(_('cannot amend changeset with children'))
1684
1684
1685 newextra = extra.copy()
1686 newextra['branch'] = branch
1687 extra = newextra
1688 # commitfunc is used only for temporary amend commit by cmdutil.amend
1685 # commitfunc is used only for temporary amend commit by cmdutil.amend
1689 def commitfunc(ui, repo, message, match, opts):
1686 def commitfunc(ui, repo, message, match, opts):
1690 return repo.commit(message,
1687 return repo.commit(message,
General Comments 0
You need to be logged in to leave comments. Login now