vcssync: log number of commits converted; r?glob draft
authorGregory Szorc <gps@mozilla.com>
Fri, 27 Jan 2017 14:19:57 -0800
changeset 10264 41592751ae32a7b35b73f6511fadfd5695ba01be
parent 10263 92cb8e06a43513abc3da1c35c7fdde6ebd8be7de
child 10265 97335960d69a78b334ff53792f9dc8b505ecdf05
push id1494
push userbmo:gps@mozilla.com
push dateFri, 27 Jan 2017 22:32:04 +0000
reviewersglob
vcssync: log number of commits converted; r?glob In a future patch, we'll skip certain commits from rewriting. This logging will make it easier to identify what's going on. MozReview-Commit-ID: 39kQ1TSsbuG
vcssync/mozvcssync/gitrewrite/linearize.py
vcssync/tests/test-linearize-git-author-map.t
vcssync/tests/test-linearize-git-basic.t
vcssync/tests/test-linearize-git-committer.t
vcssync/tests/test-linearize-git-exclude-dirs.t
vcssync/tests/test-linearize-git-message-rewrite.t
vcssync/tests/test-linearize-git-multiple-roots.t
vcssync/tests/test-linearize-git-not-fast-forward.t
vcssync/tests/test-linearize-git-p2-author.t
vcssync/tests/test-linearize-git-record-original-commit.t
vcssync/tests/test-linearize-git-reflog.t
vcssync/tests/test-linearize-git-to-hg-basic.t
vcssync/tests/test-linearize-git-to-hg-copy-metadata.t
vcssync/tests/test-linearize-git-to-hg-push-git.t
vcssync/tests/test-linearize-git-to-hg-source-annotations.t
--- a/vcssync/mozvcssync/gitrewrite/linearize.py
+++ b/vcssync/mozvcssync/gitrewrite/linearize.py
@@ -187,16 +187,18 @@ def linearize_git_repo(git_repo, ref, ex
 
     if source_repo and source_repo.startswith(b'https://github.com/'):
         orgrepo = source_repo[len(b'https://github.com/'):]
         github_org, github_repo = orgrepo.split(b'/')
 
     if github_client and github_repo and not os.path.exists(github_cache_dir):
         os.mkdir(github_cache_dir)
 
+    rewrite_count = 0
+
     for i, source_commit in enumerate(source_commits):
         logger.warn('%d/%d %s %s' % (
             i + 1, len(source_commits), source_commit.id,
             source_commit.message.splitlines()[0].decode('utf-8', 'replace')))
 
         dest_commit = source_commit.copy()
 
         # If we're pruning directories, we need to rewrite tree objects.
@@ -262,16 +264,17 @@ def linearize_git_repo(git_repo, ref, ex
                 lines.append(b'%s: %s' % (source_revision_key,
                                           source_commit.id))
 
             dest_commit.message = b'%s\n' % b'\n'.join(lines)
 
         # Our commit object is fully transformed. Write it.
         repo.object_store.add_object(dest_commit)
 
+        rewrite_count += 1
         dest_commit_id = dest_commit.id
         result['commit_map'][source_commit.id] = dest_commit_id
 
     result['dest_commit'] = dest_commit_id
 
     # Store refs to the converted source and dest commits. We use
     # ``git update-ref`` so reflogs are written (Dulwich doesn't appear
     # to write reflogs).
@@ -295,18 +298,18 @@ def linearize_git_repo(git_repo, ref, ex
                          stdin=subprocess.PIPE,
                          cwd=git_repo)
     p.stdin.write(b'\0'.join(reflog_commands))
     p.stdin.close()
     res = p.wait()
     if res:
         raise Exception('failed to update refs')
 
-    logger.warn('%s converted; original: %s; rewritten: %s' % (
-                ref, head, repo[dest_ref].id))
+    logger.warn('%d commits from %s converted; original: %s; rewritten: %s' % (
+                rewrite_count, ref, head, repo[dest_ref].id))
 
     # Perform a garbage collection so we don't have potentially thousands
     # of loose objects sitting around, as performance will suffer and Git
     # will complain otherwise.
     subprocess.check_call([b'git',
                            b'-c', b'gc.autodetach=false',
                            b'gc', b'--auto'], cwd=git_repo)
 
--- a/vcssync/tests/test-linearize-git-author-map.t
+++ b/vcssync/tests/test-linearize-git-author-map.t
@@ -27,17 +27,17 @@ Author map works
   > Old Committer <old-committer@example.com> = New Committer <new-committer@example.com>
   > # This ia another comment
   > EOF
 
   $ linearize-git --author-map author_map . heads/master
   linearizing 2 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to cb229eaf293faecf0580d4b911000425a3338150)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 cb229eaf293faecf0580d4b911000425a3338150 1
-  heads/master converted; original: cb229eaf293faecf0580d4b911000425a3338150; rewritten: cc01022a784bb7973b3ec8c5167c41302426286c
+  2 commits from heads/master converted; original: cb229eaf293faecf0580d4b911000425a3338150; rewritten: cc01022a784bb7973b3ec8c5167c41302426286c
 
   $ git log convert/dest/heads/master
   commit cc01022a784bb7973b3ec8c5167c41302426286c
   Author: New Author <new-author@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       1
   
--- a/vcssync/tests/test-linearize-git-basic.t
+++ b/vcssync/tests/test-linearize-git-basic.t
@@ -47,17 +47,17 @@ Create a Git repo with a simple merge
 
 Linearized repo should have no merges
 
   $ linearize-git . heads/master
   linearizing 3 commits from heads/master (a547cc07d30f025e022b27310c713705158c21b4 to 9127cbf8ed74dd362cf28e37e8df7864df3057e3)
   1/3 a547cc07d30f025e022b27310c713705158c21b4 initial
   2/3 c37ea67cfc02a686d402594235bcba334fb727af add file1
   3/3 9127cbf8ed74dd362cf28e37e8df7864df3057e3 Merge branch 'head1'
-  heads/master converted; original: 9127cbf8ed74dd362cf28e37e8df7864df3057e3; rewritten: 4a8e25bc50dc5e927f209e1cbac8a7c0346b72b7
+  3 commits from heads/master converted; original: 9127cbf8ed74dd362cf28e37e8df7864df3057e3; rewritten: 4a8e25bc50dc5e927f209e1cbac8a7c0346b72b7
 
   $ git log --graph --format=oneline convert/dest/heads/master
   * 4a8e25bc50dc5e927f209e1cbac8a7c0346b72b7 Merge branch 'head1'
   * c37ea67cfc02a686d402594235bcba334fb727af add file1
   * a547cc07d30f025e022b27310c713705158c21b4 initial
 
 Original refs should be untouched, new tracking refs should be added
 
@@ -94,17 +94,17 @@ Incremental linearize should only conver
   9127cbf8ed74dd362cf28e37e8df7864df3057e3 commit	refs/convert/source/heads/master
   48fba69d25d8ec2d06c8d0a00851d109acd7d986 commit	refs/heads/head1
   e6c4fa028c4bbb545d8b72667cf224e2141d88e7 commit	refs/heads/master
 
   $ linearize-git . heads/master
   linearizing 2 commits from heads/master (622273f903fba1c0fabe939ec34a61e804fa66cf to e6c4fa028c4bbb545d8b72667cf224e2141d88e7)
   1/2 622273f903fba1c0fabe939ec34a61e804fa66cf add file2
   2/2 e6c4fa028c4bbb545d8b72667cf224e2141d88e7 add file3
-  heads/master converted; original: e6c4fa028c4bbb545d8b72667cf224e2141d88e7; rewritten: dd15e055c3525362c7d61d09f0e71be97d730415
+  2 commits from heads/master converted; original: e6c4fa028c4bbb545d8b72667cf224e2141d88e7; rewritten: dd15e055c3525362c7d61d09f0e71be97d730415
 
   $ git for-each-ref
   dd15e055c3525362c7d61d09f0e71be97d730415 commit	refs/convert/dest/heads/master
   e6c4fa028c4bbb545d8b72667cf224e2141d88e7 commit	refs/convert/source/heads/master
   48fba69d25d8ec2d06c8d0a00851d109acd7d986 commit	refs/heads/head1
   e6c4fa028c4bbb545d8b72667cf224e2141d88e7 commit	refs/heads/master
 
   $ git log --graph --format=oneline refs/heads/master
--- a/vcssync/tests/test-linearize-git-committer.t
+++ b/vcssync/tests/test-linearize-git-committer.t
@@ -22,58 +22,58 @@
   $ git branch use-author
   $ git branch use-committer
 
 Git committer should be retained by default
 
   $ linearize-git . heads/master
   linearizing 1 commits from heads/master (81ceece45bfdbe831a28eb6b90d196aea1330184 to 81ceece45bfdbe831a28eb6b90d196aea1330184)
   1/1 81ceece45bfdbe831a28eb6b90d196aea1330184 initial
-  heads/master converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 81ceece45bfdbe831a28eb6b90d196aea1330184
+  1 commits from heads/master converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 81ceece45bfdbe831a28eb6b90d196aea1330184
 
   $ git cat-file -p refs/convert/dest/heads/master
   tree 2d2675b9e90bde3e722e6ef55faee52aec2e3857
   author Git Author <author@example.com> 0 +0000
   committer Git Committer <committer@example.com> 1483660800 +0000
   
   initial
 
 --committer-action keep is the default behavior
 
   $ linearize-git --committer-action keep . heads/keep
   linearizing 1 commits from heads/keep (81ceece45bfdbe831a28eb6b90d196aea1330184 to 81ceece45bfdbe831a28eb6b90d196aea1330184)
   1/1 81ceece45bfdbe831a28eb6b90d196aea1330184 initial
-  heads/keep converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 81ceece45bfdbe831a28eb6b90d196aea1330184
+  1 commits from heads/keep converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 81ceece45bfdbe831a28eb6b90d196aea1330184
 
   $ git cat-file -p refs/convert/dest/heads/keep
   tree 2d2675b9e90bde3e722e6ef55faee52aec2e3857
   author Git Author <author@example.com> 0 +0000
   committer Git Committer <committer@example.com> 1483660800 +0000
   
   initial
 
 use-author copies author to committer
 
   $ linearize-git --committer-action use-author . heads/use-author
   linearizing 1 commits from heads/use-author (81ceece45bfdbe831a28eb6b90d196aea1330184 to 81ceece45bfdbe831a28eb6b90d196aea1330184)
   1/1 81ceece45bfdbe831a28eb6b90d196aea1330184 initial
-  heads/use-author converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 42591cc3c328b9e9c0ee9ae6e4573894b17ba691
+  1 commits from heads/use-author converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 42591cc3c328b9e9c0ee9ae6e4573894b17ba691
 
   $ git cat-file -p refs/convert/dest/heads/use-author
   tree 2d2675b9e90bde3e722e6ef55faee52aec2e3857
   author Git Author <author@example.com> 0 +0000
   committer Git Author <author@example.com> 0 +0000
   
   initial
 
 use-committer copies committer to author
 
   $ linearize-git --committer-action use-committer . heads/use-committer
   linearizing 1 commits from heads/use-committer (81ceece45bfdbe831a28eb6b90d196aea1330184 to 81ceece45bfdbe831a28eb6b90d196aea1330184)
   1/1 81ceece45bfdbe831a28eb6b90d196aea1330184 initial
-  heads/use-committer converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 610b4fec36ab4c55172fa95cfa9c462323ad335f
+  1 commits from heads/use-committer converted; original: 81ceece45bfdbe831a28eb6b90d196aea1330184; rewritten: 610b4fec36ab4c55172fa95cfa9c462323ad335f
 
   $ git cat-file -p refs/convert/dest/heads/use-committer
   tree 2d2675b9e90bde3e722e6ef55faee52aec2e3857
   author Git Committer <committer@example.com> 1483660800 +0000
   committer Git Committer <committer@example.com> 1483660800 +0000
   
   initial
--- a/vcssync/tests/test-linearize-git-exclude-dirs.t
+++ b/vcssync/tests/test-linearize-git-exclude-dirs.t
@@ -67,17 +67,17 @@ Create a Git repo with files we wish to 
 Directories can be excluded when linearizing
 
   $ linearize-git --exclude-dir dir2 . heads/master
   linearizing 4 commits from heads/master (a547cc07d30f025e022b27310c713705158c21b4 to e9fb4537517445c07d491482211919591e4dae45)
   1/4 a547cc07d30f025e022b27310c713705158c21b4 initial
   2/4 0ac77c9293242a70f71defcee37a74659207b19e add file1s
   3/4 b7b3abcd50597761f65c0a11846de6ebc98cc5b7 add dir0/file2
   4/4 e9fb4537517445c07d491482211919591e4dae45 Merge branch 'head1'
-  heads/master converted; original: e9fb4537517445c07d491482211919591e4dae45; rewritten: d017a118a5429ca800345e6f14e1a61f6f613b57
+  4 commits from heads/master converted; original: e9fb4537517445c07d491482211919591e4dae45; rewritten: d017a118a5429ca800345e6f14e1a61f6f613b57
 
   $ git show -m refs/convert/dest/heads/master
   commit d017a118a5429ca800345e6f14e1a61f6f613b57
   Author: test <test@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       Merge branch 'head1'
   
@@ -93,17 +93,17 @@ Directories can be excluded when lineari
   $ git update-ref -d refs/convert/source/heads/master
   $ git update-ref -d refs/convert/dest/heads/master
   $ linearize-git --exclude-dir dir0 --exclude-dir dir1 . heads/master
   linearizing 4 commits from heads/master (a547cc07d30f025e022b27310c713705158c21b4 to e9fb4537517445c07d491482211919591e4dae45)
   1/4 a547cc07d30f025e022b27310c713705158c21b4 initial
   2/4 0ac77c9293242a70f71defcee37a74659207b19e add file1s
   3/4 b7b3abcd50597761f65c0a11846de6ebc98cc5b7 add dir0/file2
   4/4 e9fb4537517445c07d491482211919591e4dae45 Merge branch 'head1'
-  heads/master converted; original: e9fb4537517445c07d491482211919591e4dae45; rewritten: d8230193bc11a2745bec8258c94b95324f3c4955
+  4 commits from heads/master converted; original: e9fb4537517445c07d491482211919591e4dae45; rewritten: d8230193bc11a2745bec8258c94b95324f3c4955
   $ git log --graph --format=oneline refs/convert/dest/heads/master
   * d8230193bc11a2745bec8258c94b95324f3c4955 Merge branch 'head1'
   * 8a2c50c762f3483c5b3d26947d81a0cbe2ba8e69 add dir0/file2
   * 925f1eab825ed50a1f80058c6a1f220c009a8bfd add file1s
   * a547cc07d30f025e022b27310c713705158c21b4 initial
   $ git show -m refs/convert/dest/heads/master
   commit d8230193bc11a2745bec8258c94b95324f3c4955
   Author: test <test@example.com>
@@ -142,17 +142,17 @@ Excluding an intermediate directory work
    create mode 100644 dir2/file0
    create mode 100644 dir2/subdir0/file0
    create mode 100644 dir2/subdir1/file0
   $ git branch master2 HEAD
 
   $ linearize-git --exclude-dir dir0/subdir0 . heads/master
   linearizing 1 commits from heads/master (1190a970be8401aac3e4773332dd10f78e4141f2 to 1190a970be8401aac3e4773332dd10f78e4141f2)
   1/1 1190a970be8401aac3e4773332dd10f78e4141f2 initial
-  heads/master converted; original: 1190a970be8401aac3e4773332dd10f78e4141f2; rewritten: 2c092d0f01a4a443e2120c897bc7f1fa3b94c3c5
+  1 commits from heads/master converted; original: 1190a970be8401aac3e4773332dd10f78e4141f2; rewritten: 2c092d0f01a4a443e2120c897bc7f1fa3b94c3c5
 
   $ git ls-tree -r -t refs/convert/dest/heads/master
   040000 tree a5a64b4a01d3e32ff0050e6323ff8abcbce0ded7	dir0
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir0/file0
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir0/subdir1
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir0/subdir1/file0
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir1
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir1/file0
@@ -161,17 +161,17 @@ Excluding an intermediate directory work
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir2/subdir0
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir2/subdir0/file0
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir2/subdir1
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir2/subdir1/file0
 
   $ linearize-git --exclude-dir dir1 --exclude-dir dir2/subdir0 . heads/master2
   linearizing 1 commits from heads/master2 (1190a970be8401aac3e4773332dd10f78e4141f2 to 1190a970be8401aac3e4773332dd10f78e4141f2)
   1/1 1190a970be8401aac3e4773332dd10f78e4141f2 initial
-  heads/master2 converted; original: 1190a970be8401aac3e4773332dd10f78e4141f2; rewritten: d46fb3759f69a9ed2c56395653cf3e61fad6f5e7
+  1 commits from heads/master2 converted; original: 1190a970be8401aac3e4773332dd10f78e4141f2; rewritten: d46fb3759f69a9ed2c56395653cf3e61fad6f5e7
 
   $ git ls-tree -r -t refs/convert/dest/heads/master2
   040000 tree 871a0c072ebc416415cc682bbda94e7948c8f568	dir0
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir0/file0
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir0/subdir0
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir0/subdir0/file0
   040000 tree 09767bd3484e22b41138116992cc1cb5bc45fb7f	dir0/subdir1
   100644 blob e69de29bb2d1d6434b8b29ae775ad8c2e48c5391	dir0/subdir1/file0
--- a/vcssync/tests/test-linearize-git-message-rewrite.t
+++ b/vcssync/tests/test-linearize-git-message-rewrite.t
@@ -17,17 +17,17 @@
    1 file changed, 1 insertion(+), 1 deletion(-)
 
 --summary-prefix adds prefix to the summary line of commit message
 
   $ linearize-git --summary-prefix my-prefix: . heads/master
   linearizing 2 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to f3dcf0ea970616078b22c97ff104fa368b61973c)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 f3dcf0ea970616078b22c97ff104fa368b61973c commit 1
-  heads/master converted; original: f3dcf0ea970616078b22c97ff104fa368b61973c; rewritten: 10874c20986a49df5dd96f35017858fc3e52fe70
+  2 commits from heads/master converted; original: f3dcf0ea970616078b22c97ff104fa368b61973c; rewritten: 10874c20986a49df5dd96f35017858fc3e52fe70
 
   $ git cat-file -p 10874c20986a49df5dd96f35017858fc3e52fe70
   tree a229c158b3d5560cc44ad3dec6ff5d13a47e11cf
   parent e532d0c9cf2e5662401c8821f9eedb37356201f9
   author test <test@example.com> 0 +0000
   committer test <test@example.com> 0 +0000
   
   my-prefix: commit 1
@@ -68,17 +68,17 @@ Reviewable Markdown can be rewritten to 
    1 file changed, 1 insertion(+), 1 deletion(-)
 
   $ git branch master2 master
 
   $ linearize-git --reviewable-key Reviewable-URL . heads/master
   linearizing 2 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 9ccde32cb7cc412d2c797a0fea52c258be9b76f2)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 9ccde32cb7cc412d2c797a0fea52c258be9b76f2 Auto merge of #14737 - UK992:package-prefs, r=Wafflespeanut
-  heads/master converted; original: 9ccde32cb7cc412d2c797a0fea52c258be9b76f2; rewritten: 58b5ec5252ed2d3d8ab73d6abae4f6253b88674f
+  2 commits from heads/master converted; original: 9ccde32cb7cc412d2c797a0fea52c258be9b76f2; rewritten: 58b5ec5252ed2d3d8ab73d6abae4f6253b88674f
 
   $ git log convert/dest/heads/master
   commit 58b5ec5252ed2d3d8ab73d6abae4f6253b88674f
   Author: test <test@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       Auto merge of #14737 - UK992:package-prefs, r=Wafflespeanut
       
@@ -96,17 +96,17 @@ Reviewable Markdown can be rewritten to 
       initial
 
 Reviewable.io Markdown can be removed
 
   $ linearize-git --remove-reviewable . heads/master2
   linearizing 2 commits from heads/master2 (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 9ccde32cb7cc412d2c797a0fea52c258be9b76f2)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 9ccde32cb7cc412d2c797a0fea52c258be9b76f2 Auto merge of #14737 - UK992:package-prefs, r=Wafflespeanut
-  heads/master2 converted; original: 9ccde32cb7cc412d2c797a0fea52c258be9b76f2; rewritten: e7fa11e1edfada45a007d36941b4d919f4b7fe5d
+  2 commits from heads/master2 converted; original: 9ccde32cb7cc412d2c797a0fea52c258be9b76f2; rewritten: e7fa11e1edfada45a007d36941b4d919f4b7fe5d
 
   $ git log convert/dest/heads/master2
   commit e7fa11e1edfada45a007d36941b4d919f4b7fe5d
   Author: test <test@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       Auto merge of #14737 - UK992:package-prefs, r=Wafflespeanut
       
@@ -208,17 +208,17 @@ Servo style commit message syntax rewrit
   $ linearize-git --normalize-github-merge-message --remove-reviewable . heads/master
   linearizing 6 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to a7332b8424dc931df611b8feab5fa6840218bfa1)
   1/6 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/6 026e845f3f1293fb53ea2ee98cbc349120993c7c Merge pull request #376 from servo/foo-feature
   3/6 2e52fe53a63dc972ef737702f0467ea0575d0392 Merge pull request #653 from foo/bar
   4/6 fa522c79808c18641e57fff1e3a7d67ae802fa04 Auto merge of #6532 - servo/bar-feature, r=gps
   5/6 cf1c79b916bc61fa77a215acb13f00c770d2ac9e auto merge of #4690 : indygreg/servo/some-feature, r=bholley
   6/6 a7332b8424dc931df611b8feab5fa6840218bfa1 Auto merge of #5700 - Ms2ger:content, r=jdm
-  heads/master converted; original: a7332b8424dc931df611b8feab5fa6840218bfa1; rewritten: 804b27caa81d7ac94b2ad48e23f1b152c21c5490
+  6 commits from heads/master converted; original: a7332b8424dc931df611b8feab5fa6840218bfa1; rewritten: 804b27caa81d7ac94b2ad48e23f1b152c21c5490
 
   $ git log refs/convert/dest/heads/master
   commit 804b27caa81d7ac94b2ad48e23f1b152c21c5490
   Author: test <test@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       Merge #5700 (from Ms2ger:content); r=jdm
   
--- a/vcssync/tests/test-linearize-git-multiple-roots.t
+++ b/vcssync/tests/test-linearize-git-multiple-roots.t
@@ -83,17 +83,17 @@ Create a Git repo with multiple heads
   824ed6bd9a20abbdfc2f30d51697fb38aaeed77f commit	refs/heads/master
 
   $ linearize-git --summary-prefix prefix: . heads/master
   linearizing 4 commits from heads/master (a547cc07d30f025e022b27310c713705158c21b4 to 824ed6bd9a20abbdfc2f30d51697fb38aaeed77f)
   1/4 a547cc07d30f025e022b27310c713705158c21b4 initial
   2/4 14ed61bb65666fab453c2c73779776b45a82ed1c add file0 file1 file2
   3/4 bcd219215eeef8329b848347a4df596c97637c8d master c1
   4/4 824ed6bd9a20abbdfc2f30d51697fb38aaeed77f master c2
-  heads/master converted; original: 824ed6bd9a20abbdfc2f30d51697fb38aaeed77f; rewritten: a252594d0435ec401a688422fc9d5d8609411b31
+  4 commits from heads/master converted; original: 824ed6bd9a20abbdfc2f30d51697fb38aaeed77f; rewritten: a252594d0435ec401a688422fc9d5d8609411b31
 
   $ git log --graph --format=oneline convert/dest/heads/master
   * a252594d0435ec401a688422fc9d5d8609411b31 prefix: master c2
   * 43297b4d3719db354cd672eda3ccba002083fb51 prefix: master c1
   * adc692e75b22584d802c3e586719f16759126267 prefix: add file0 file1 file2
   * a8164f0194857c91f13cefc9ade0378488e89502 prefix: initial
 
   $ echo mc3 > file0
@@ -128,17 +128,17 @@ Create a Git repo with multiple heads
   * 14ed61bb65666fab453c2c73779776b45a82ed1c add file0 file1 file2
   * a547cc07d30f025e022b27310c713705158c21b4 initial
 
   $ linearize-git --summary-prefix prefix: . heads/master
   linearizing 3 commits from heads/master (9f1866ba6011fb3621d68dcaa917d8d3044d7ccd to c2aa3459b5fb3528e9808b6229a67165b4a3b565)
   1/3 9f1866ba6011fb3621d68dcaa917d8d3044d7ccd master c3
   2/3 8a64d1d9fabfd12eb7c8c2876b3a09b80a60657f Merge branch 'head1'
   3/3 c2aa3459b5fb3528e9808b6229a67165b4a3b565 Merge branch 'head2'
-  heads/master converted; original: c2aa3459b5fb3528e9808b6229a67165b4a3b565; rewritten: 5d54e9062c565acba8fe3b7dda7e7fd1c29e550c
+  3 commits from heads/master converted; original: c2aa3459b5fb3528e9808b6229a67165b4a3b565; rewritten: 5d54e9062c565acba8fe3b7dda7e7fd1c29e550c
 
   $ git log --graph --format=oneline refs/convert/dest/heads/master
   * 5d54e9062c565acba8fe3b7dda7e7fd1c29e550c prefix: Merge branch 'head2'
   * b0923b63a71946878539e5a82b2430d2ececc0f2 prefix: Merge branch 'head1'
   * 7de4a0e3a1dec279df9f62590c2be67103957b97 prefix: master c3
   * a252594d0435ec401a688422fc9d5d8609411b31 prefix: master c2
   * 43297b4d3719db354cd672eda3ccba002083fb51 prefix: master c1
   * adc692e75b22584d802c3e586719f16759126267 prefix: add file0 file1 file2
--- a/vcssync/tests/test-linearize-git-not-fast-forward.t
+++ b/vcssync/tests/test-linearize-git-not-fast-forward.t
@@ -21,17 +21,17 @@
   [master 2a57f45] commit 2
    1 file changed, 1 insertion(+), 1 deletion(-)
 
   $ linearize-git . heads/master
   linearizing 3 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 2a57f453609d9dffe0dad9a0544b792a09d4b234)
   1/3 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/3 f3dcf0ea970616078b22c97ff104fa368b61973c commit 1
   3/3 2a57f453609d9dffe0dad9a0544b792a09d4b234 commit 2
-  heads/master converted; original: 2a57f453609d9dffe0dad9a0544b792a09d4b234; rewritten: 2a57f453609d9dffe0dad9a0544b792a09d4b234
+  3 commits from heads/master converted; original: 2a57f453609d9dffe0dad9a0544b792a09d4b234; rewritten: 2a57f453609d9dffe0dad9a0544b792a09d4b234
 
 Simulate a force push by doing a hard reset + new commit
 
   $ git reset --hard f3dcf0ea970616078b22c97ff104fa368b61973c
   HEAD is now at f3dcf0e commit 1
   $ echo 2.new > foo
   $ git add foo
   $ git commit -m 'commit 3 (reset)'
@@ -64,9 +64,9 @@ Resetting back to original will recover
   $ echo 3 > foo
   $ git add foo
   $ git commit -m 'commit 3'
   [master 10b4510] commit 3
    1 file changed, 1 insertion(+), 1 deletion(-)
   $ linearize-git . heads/master
   linearizing 1 commits from heads/master (10b45106160cb14fd510875c844f38ea26b559c6 to 10b45106160cb14fd510875c844f38ea26b559c6)
   1/1 10b45106160cb14fd510875c844f38ea26b559c6 commit 3
-  heads/master converted; original: 10b45106160cb14fd510875c844f38ea26b559c6; rewritten: 10b45106160cb14fd510875c844f38ea26b559c6
+  1 commits from heads/master converted; original: 10b45106160cb14fd510875c844f38ea26b559c6; rewritten: 10b45106160cb14fd510875c844f38ea26b559c6
--- a/vcssync/tests/test-linearize-git-p2-author.t
+++ b/vcssync/tests/test-linearize-git-p2-author.t
@@ -38,17 +38,17 @@
 
 Using p2 parent for rewritten merge commit works
 
   $ linearize-git --use-p2-author . heads/master
   linearizing 3 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 1d7609530bb5efe1b11c2be19368669f9892e055)
   1/3 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/3 3859ebb89b4a8ef66d455f7f0d550a8a609154da 1
   3/3 1d7609530bb5efe1b11c2be19368669f9892e055 Merge branch 'feature-branch'
-  heads/master converted; original: 1d7609530bb5efe1b11c2be19368669f9892e055; rewritten: 534e8c7588c35783ba75712dc4549852a65ed720
+  3 commits from heads/master converted; original: 1d7609530bb5efe1b11c2be19368669f9892e055; rewritten: 534e8c7588c35783ba75712dc4549852a65ed720
 
   $ git log convert/dest/heads/master
   commit 534e8c7588c35783ba75712dc4549852a65ed720
   Author: Another Author <another@example.com>
   Date:   Thu Jan 1 00:00:00 1970 +0000
   
       Merge branch 'feature-branch'
   
--- a/vcssync/tests/test-linearize-git-record-original-commit.t
+++ b/vcssync/tests/test-linearize-git-record-original-commit.t
@@ -26,51 +26,51 @@ Create a Git repo with a simple merge
   $ git branch master4
 
 Source repo annotations work
 
   $ linearize-git --source-repo https://github.com/example/repo.git --source-repo-key Source-Repo . heads/master2
   linearizing 2 commits from heads/master2 (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 4064f3a8845ed27962b26096cfae39610ea97c8e)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 4064f3a8845ed27962b26096cfae39610ea97c8e commit 1
-  heads/master2 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: 08225afa188929f3b1b5b06d2dff1e0a6dbbd707
+  2 commits from heads/master2 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: 08225afa188929f3b1b5b06d2dff1e0a6dbbd707
 
   $ git cat-file -p 08225afa188929f3b1b5b06d2dff1e0a6dbbd707
   tree a229c158b3d5560cc44ad3dec6ff5d13a47e11cf
   parent c7a2854e7d8d1f3e6b1abc8bd7cf8a6a1a225f9f
   author test <test@example.com> 0 +0000
   committer test <test@example.com> 0 +0000
   
   commit 1
   
   Reviewable-URL: https://example.com/foo
   Source-Repo: https://github.com/example/repo.git
 
   $ linearize-git --source-revision-key Source-Revision . heads/master3
   linearizing 2 commits from heads/master3 (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 4064f3a8845ed27962b26096cfae39610ea97c8e)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 4064f3a8845ed27962b26096cfae39610ea97c8e commit 1
-  heads/master3 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: f7fabf46f67fae5f49e2776b72307a7d17cd560f
+  2 commits from heads/master3 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: f7fabf46f67fae5f49e2776b72307a7d17cd560f
 
   $ git cat-file -p f7fabf46f67fae5f49e2776b72307a7d17cd560f
   tree a229c158b3d5560cc44ad3dec6ff5d13a47e11cf
   parent 1c8e8b4b1c0c0eca6b0452241f05fe983c6f3b52
   author test <test@example.com> 0 +0000
   committer test <test@example.com> 0 +0000
   
   commit 1
   
   Reviewable-URL: https://example.com/foo
   Source-Revision: 4064f3a8845ed27962b26096cfae39610ea97c8e
 
   $ linearize-git --source-repo https://github.com/example/repo.git --source-repo-key Source-Repo --source-revision-key Source-Revision . heads/master4
   linearizing 2 commits from heads/master4 (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to 4064f3a8845ed27962b26096cfae39610ea97c8e)
   1/2 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
   2/2 4064f3a8845ed27962b26096cfae39610ea97c8e commit 1
-  heads/master4 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: e39b36eab045450d8cf25e77532aa5c062da792d
+  2 commits from heads/master4 converted; original: 4064f3a8845ed27962b26096cfae39610ea97c8e; rewritten: e39b36eab045450d8cf25e77532aa5c062da792d
 
   $ git cat-file -p e39b36eab045450d8cf25e77532aa5c062da792d
   tree a229c158b3d5560cc44ad3dec6ff5d13a47e11cf
   parent d59910e04b7469ebc5f93299632836c79c5a0aff
   author test <test@example.com> 0 +0000
   committer test <test@example.com> 0 +0000
   
   commit 1
--- a/vcssync/tests/test-linearize-git-reflog.t
+++ b/vcssync/tests/test-linearize-git-reflog.t
@@ -12,17 +12,17 @@
 
 Need to change the committer date because reflogs rely on that time
 
   $ export GIT_COMMITTER_DATE='Fri Jan 6 00:00:00 2017 +0000'
 
   $ linearize-git --summary-prefix prefix: . heads/master
   linearizing 1 commits from heads/master (dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf to dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf)
   1/1 dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf initial
-  heads/master converted; original: dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf; rewritten: 6f15a738f983e864bdfac5088fcb9c4c0e339757
+  1 commits from heads/master converted; original: dbd62b82aaf0a7a05665d9455a9b4d490d52ddaf; rewritten: 6f15a738f983e864bdfac5088fcb9c4c0e339757
 
 refs tracking converted commits have a reflog entry
 
   $ git reflog show convert/source/heads/master
   dbd62b8 convert/source/heads/master@{0}: linearize heads/master
 
   $ git reflog show convert/dest/heads/master
   6f15a73 convert/dest/heads/master@{0}: linearize heads/master
@@ -35,17 +35,17 @@ Performing an incremental conversion wil
   [master ccdbd02] initial
    1 file changed, 1 insertion(+), 1 deletion(-)
 
   $ export GIT_COMMITTER_DATE='Fri Jan 6 00:00:01 2017 +0000'
 
   $ linearize-git --summary-prefix prefix: . heads/master
   linearizing 1 commits from heads/master (ccdbd027bb70f567e4e21296450e0c991ee52d4b to ccdbd027bb70f567e4e21296450e0c991ee52d4b)
   1/1 ccdbd027bb70f567e4e21296450e0c991ee52d4b initial
-  heads/master converted; original: ccdbd027bb70f567e4e21296450e0c991ee52d4b; rewritten: e800cfd3c722caab882652b26f98a9e568582a60
+  1 commits from heads/master converted; original: ccdbd027bb70f567e4e21296450e0c991ee52d4b; rewritten: e800cfd3c722caab882652b26f98a9e568582a60
 
   $ git reflog show convert/source/heads/master
   ccdbd02 convert/source/heads/master@{0}: linearize heads/master
   dbd62b8 convert/source/heads/master@{1}: linearize heads/master
 
   $ git reflog show convert/dest/heads/master
   e800cfd convert/dest/heads/master@{0}: linearize heads/master
   6f15a73 convert/dest/heads/master@{1}: linearize heads/master
--- a/vcssync/tests/test-linearize-git-to-hg-basic.t
+++ b/vcssync/tests/test-linearize-git-to-hg-basic.t
@@ -32,17 +32,17 @@ Basic git to hg linearize works
   4/11 4d2fb4a1b4defb3cdf7abb52d9d3c91245d26194 copy file0 to file0-copy1 and file0-copy2
   5/11 9fea386651d90b505d5d1fa2e70c465562b04c7d move file0 to file0-moved
   6/11 2b77427ac0fe55e172d4174530c9bcc4b2544ff6 copy file0-moved and rename source
   7/11 ecba8e9490aa2f14345a2da0da62631928ff2968 create file1-20, file1-50 and file1-80 as copies with mods
   8/11 85fd94699e69ce4d2d55171078541c1019f111e4 dummy commit 1 on master
   9/11 7a13658c4512ce4c99800417db933f4a1d3fdcb3 dummy commit 2 on master
   10/11 fc30a4fbd1fe16d4c84ca50119e0c404c13967a3 Merge branch 'head2'
   11/11 a447b9b0ff25bf17daab1c7edae4a998eca0adac dummy commit 1 after merge
-  heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
+  11 commits from heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
   converting 11 Git commits
   scanning source...
   sorting...
   converting...
   10 initial
   9 add file0 and file1
   8 copy file0 to file0-copy0
   7 copy file0 to file0-copy1 and file0-copy2
--- a/vcssync/tests/test-linearize-git-to-hg-copy-metadata.t
+++ b/vcssync/tests/test-linearize-git-to-hg-copy-metadata.t
@@ -18,17 +18,17 @@
   4/11 4d2fb4a1b4defb3cdf7abb52d9d3c91245d26194 copy file0 to file0-copy1 and file0-copy2
   5/11 9fea386651d90b505d5d1fa2e70c465562b04c7d move file0 to file0-moved
   6/11 2b77427ac0fe55e172d4174530c9bcc4b2544ff6 copy file0-moved and rename source
   7/11 ecba8e9490aa2f14345a2da0da62631928ff2968 create file1-20, file1-50 and file1-80 as copies with mods
   8/11 85fd94699e69ce4d2d55171078541c1019f111e4 dummy commit 1 on master
   9/11 7a13658c4512ce4c99800417db933f4a1d3fdcb3 dummy commit 2 on master
   10/11 fc30a4fbd1fe16d4c84ca50119e0c404c13967a3 Merge branch 'head2'
   11/11 a447b9b0ff25bf17daab1c7edae4a998eca0adac dummy commit 1 after merge
-  heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
+  11 commits from heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
   converting 11 Git commits
   scanning source...
   sorting...
   converting...
   10 initial
   9 add file0 and file1
   8 copy file0 to file0-copy0
   7 copy file0 to file0-copy1 and file0-copy2
--- a/vcssync/tests/test-linearize-git-to-hg-push-git.t
+++ b/vcssync/tests/test-linearize-git-to-hg-push-git.t
@@ -20,17 +20,17 @@
   4/11 4d2fb4a1b4defb3cdf7abb52d9d3c91245d26194 copy file0 to file0-copy1 and file0-copy2
   5/11 9fea386651d90b505d5d1fa2e70c465562b04c7d move file0 to file0-moved
   6/11 2b77427ac0fe55e172d4174530c9bcc4b2544ff6 copy file0-moved and rename source
   7/11 ecba8e9490aa2f14345a2da0da62631928ff2968 create file1-20, file1-50 and file1-80 as copies with mods
   8/11 85fd94699e69ce4d2d55171078541c1019f111e4 dummy commit 1 on master
   9/11 7a13658c4512ce4c99800417db933f4a1d3fdcb3 dummy commit 2 on master
   10/11 fc30a4fbd1fe16d4c84ca50119e0c404c13967a3 Merge branch 'head2'
   11/11 a447b9b0ff25bf17daab1c7edae4a998eca0adac dummy commit 1 after merge
-  heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
+  11 commits from heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: aea30981234cf6848489e0ccf541fbf902b27aca
   To file://$TESTTMP/grepo-mirror
    * [new branch]      refs/convert/dest/heads/master -> refs/convert/dest/heads/master
    * [new branch]      refs/convert/source/heads/master -> refs/convert/source/heads/master
   converting 11 Git commits
   scanning source...
   sorting...
   converting...
   10 initial
@@ -71,17 +71,17 @@ Incremental conversion will keep Git rep
 
   $ linearize-git-to-hg --git-push-url file://$TESTTMP/grepo-mirror file://$TESTTMP/grepo master grepo-source hgrepo-dest
   From file://$TESTTMP/grepo
      a447b9b..4040c16  master     -> master
   To file://$TESTTMP/grepo-mirror
      a447b9b..4040c16  master -> master
   linearizing 1 commits from heads/master (4040c1631489c25dd4e0fd1606c4a065e1a24194 to 4040c1631489c25dd4e0fd1606c4a065e1a24194)
   1/1 4040c1631489c25dd4e0fd1606c4a065e1a24194 add incremental
-  heads/master converted; original: 4040c1631489c25dd4e0fd1606c4a065e1a24194; rewritten: d6ec61184bff36a58159341c2584f3cda9dd0b58
+  1 commits from heads/master converted; original: 4040c1631489c25dd4e0fd1606c4a065e1a24194; rewritten: d6ec61184bff36a58159341c2584f3cda9dd0b58
   To file://$TESTTMP/grepo-mirror
      aea3098..d6ec611  refs/convert/dest/heads/master -> refs/convert/dest/heads/master
      a447b9b..4040c16  refs/convert/source/heads/master -> refs/convert/source/heads/master
   converting 1 Git commits
   scanning source...
   sorting...
   converting...
   0 add incremental
--- a/vcssync/tests/test-linearize-git-to-hg-source-annotations.t
+++ b/vcssync/tests/test-linearize-git-to-hg-source-annotations.t
@@ -14,17 +14,17 @@ Note: since source repo is in $TESTTMP w
   4/11 4d2fb4a1b4defb3cdf7abb52d9d3c91245d26194 copy file0 to file0-copy1 and file0-copy2
   5/11 9fea386651d90b505d5d1fa2e70c465562b04c7d move file0 to file0-moved
   6/11 2b77427ac0fe55e172d4174530c9bcc4b2544ff6 copy file0-moved and rename source
   7/11 ecba8e9490aa2f14345a2da0da62631928ff2968 create file1-20, file1-50 and file1-80 as copies with mods
   8/11 85fd94699e69ce4d2d55171078541c1019f111e4 dummy commit 1 on master
   9/11 7a13658c4512ce4c99800417db933f4a1d3fdcb3 dummy commit 2 on master
   10/11 fc30a4fbd1fe16d4c84ca50119e0c404c13967a3 Merge branch 'head2'
   11/11 a447b9b0ff25bf17daab1c7edae4a998eca0adac dummy commit 1 after merge
-  heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: * (glob)
+  11 commits from heads/master converted; original: a447b9b0ff25bf17daab1c7edae4a998eca0adac; rewritten: * (glob)
   converting 11 Git commits
   scanning source...
   sorting...
   converting...
   10 initial
   9 add file0 and file1
   8 copy file0 to file0-copy0
   7 copy file0 to file0-copy1 and file0-copy2