diff tests/test-amend.t @ 34102:e8a7c1a0565a

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
author Saurabh Singh <singhsrb@fb.com>
date Fri, 01 Sep 2017 12:34:36 -0700
parents 24ce7b0edaf9
children ae95853c250a
line wrap: on
line diff
--- a/tests/test-amend.t	Wed Sep 06 12:56:19 2017 -0700
+++ b/tests/test-amend.t	Fri Sep 01 12:34:36 2017 -0700
@@ -29,7 +29,7 @@
   $ echo 2 >> B
 
   $ hg amend
-  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-af2c0941-amend.hg (glob) (obsstore-off !)
+  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/112478962961-7e959a55-amend.hg (glob) (obsstore-off !)
 #if obsstore-off
   $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
   @  1 be169c7e8dbe B
@@ -51,7 +51,7 @@
   
 #else
   $ hg log -p -G --hidden -T '{rev} {node|short} {desc}\n'
-  @  3 be169c7e8dbe B
+  @  2 be169c7e8dbe B
   |  diff --git a/B b/B
   |  new file mode 100644
   |  --- /dev/null
@@ -59,15 +59,6 @@
   |  @@ -0,0 +1,1 @@
   |  +B2
   |
-  | x  2 edf08988b141 temporary amend commit for 112478962961
-  | |  diff --git a/B b/B
-  | |  --- a/B
-  | |  +++ b/B
-  | |  @@ -1,1 +1,1 @@
-  | |  -B
-  | |  \ No newline at end of file
-  | |  +B2
-  | |
   | x  1 112478962961 B
   |/   diff --git a/B b/B
   |    new file mode 100644
@@ -100,13 +91,13 @@
   $ echo 4 > D
   $ hg add C D
   $ hg amend -m NEWMESSAGE -I C
-  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-c24d73fe-amend.hg (glob) (obsstore-off !)
+  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/be169c7e8dbe-7684ddc5-amend.hg (glob) (obsstore-off !)
   $ hg log -r . -T '{node|short} {desc} {files}\n'
   c7ba14d9075b NEWMESSAGE B C
   $ echo 5 > E
   $ rm C
   $ hg amend -d '2000 1000' -u 'Foo <foo@example.com>' -A C D
-  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b26ed45c-amend.hg (glob) (obsstore-off !)
+  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/c7ba14d9075b-b3e76daa-amend.hg (glob) (obsstore-off !)
   $ hg log -r . -T '{node|short} {desc} {files} {author} {date}\n'
   14f6c4bcc865 NEWMESSAGE B D Foo <foo@example.com> 2000.01000
 
@@ -153,7 +144,7 @@
   new file mode 100644
   examine changes to 'G'? [Ynesfdaq?] n
   
-  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-7ae43d04-amend.hg (glob) (obsstore-off !)
+  saved backup bundle to $TESTTMP/repo1/.hg/strip-backup/507be9bdac71-c8077452-amend.hg (glob) (obsstore-off !)
   $ hg log -r . -T '{files}\n'
   B D F
 
@@ -186,7 +177,7 @@
 
   $ hg amend
   $ hg log -T '{rev} {node|short} {desc}\n' -G
-  @  4 be169c7e8dbe B
+  @  3 be169c7e8dbe B
   |
   | o  2 26805aba1e60 C
   | |