autoland: add test for rewritecommitdescriptions with partial rewrites (bug 1253393) r?smacleod draft
authorbyron jones <glob@mozilla.com>
Wed, 20 Jul 2016 15:15:30 +0800
changeset 8977 c5f3e9f300126f4adc9cb832c7867e37a95e0666
parent 8976 08fdf631ddc7a8e5d803d1c1424f2e8c6c131fd1
push id1036
push userbjones@mozilla.com
push dateWed, 20 Jul 2016 07:34:03 +0000
reviewerssmacleod
bugs1253393
autoland: add test for rewritecommitdescriptions with partial rewrites (bug 1253393) r?smacleod Adds a test where we update the description of the second revision, but not the first. MozReview-Commit-ID: GTMprwyrV2g
autoland/tests/test-rewritecommitdescriptions.t
--- a/autoland/tests/test-rewritecommitdescriptions.t
+++ b/autoland/tests/test-rewritecommitdescriptions.t
@@ -121,8 +121,38 @@ We handle long sha1s properly
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     bug 1 - stuff++
   
   changeset:   0:3a9f6899ef84
   user:        test
   date:        Thu Jan 01 00:00:00 1970 +0000
   summary:     root commit
   
+We handle partial rewrites properly
+
+  $ cat > descriptions.json <<EOF
+  > {
+  > "a1dea3050632": "bug 1 - stuff++",
+  > "2c6f2ddf672a": "bug 1 - partial rewrite is ok"
+  > }
+  > EOF
+  $ hg rewritecommitdescriptions --descriptions descriptions.json .
+  saved backup bundle to $TESTTMP/clone/.hg/strip-backup/2c6f2ddf672a-c8370839-replacing.hg (glob)
+  rev: a1dea3050632 -> a1dea3050632
+  rev: 2c6f2ddf672a -> 515eca0c4333
+
+  $ hg --encoding utf-8 log
+  changeset:   2:515eca0c4333
+  tag:         tip
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     bug 1 - partial rewrite is ok
+  
+  changeset:   1:a1dea3050632
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     bug 1 - stuff++
+  
+  changeset:   0:3a9f6899ef84
+  user:        test
+  date:        Thu Jan 01 00:00:00 1970 +0000
+  summary:     root commit
+