cmdutil: remove the redundant commit during amend
There was an extra commit made during the amend operation to track the changes to the working copy. However, this logic was written a long time back and newer API's make this extra commit redundant. Therefore, I am removing the extra commit. After this change, I noticed that - Execution time of the cmdutil.amend improved by over 40%. - Execution time of "hg commit --amend" improved by over 20%. Test Plan: I ensured that the all the hg tests passed after the change. I had to fix a few tests which were aware of the extra commit made during the amend. Differential Revision: https://phab.mercurial-scm.org/D636
Showing
- mercurial/cmdutil.py 66 additions, 45 deletionsmercurial/cmdutil.py
- tests/test-amend.t 6 additions, 15 deletionstests/test-amend.t
- tests/test-commit-amend.t 118 additions, 119 deletionstests/test-commit-amend.t
- tests/test-commit-interactive-curses.t 1 addition, 1 deletiontests/test-commit-interactive-curses.t
- tests/test-histedit-obsolete.t 6 additions, 8 deletionstests/test-histedit-obsolete.t
- tests/test-log.t 4 additions, 4 deletionstests/test-log.t
- tests/test-obsmarker-template.t 31 additions, 46 deletionstests/test-obsmarker-template.t
- tests/test-obsolete.t 20 additions, 32 deletionstests/test-obsolete.t
- tests/test-rebase-obsolete.t 28 additions, 28 deletionstests/test-rebase-obsolete.t
- tests/test-treemanifest.t 1 addition, 1 deletiontests/test-treemanifest.t
Loading
Please register or sign in to comment