hghooks: update logging output in hooks tests (Bug 1721228) r=zeid
authorConnor Sheehan <sheehan@mozilla.com>
Tue, 24 Aug 2021 16:03:46 +0000
changeset 7719 5cd6a3a054e34335131be9408a937696a6e70298
parent 7718 7ba5ce469e076e900780e4fa4f8a5b6ba829922f
child 7720 7de4cb0e90382f4940c5e665c32c3b5d9eace725
push id3863
push usercosheehan@mozilla.com
push dateTue, 24 Aug 2021 16:05:52 +0000
treeherderversion-control-tools@177006efefb3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerszeid
bugs1721228
hghooks: update logging output in hooks tests (Bug 1721228) r=zeid Some logging output has changed since Mercurial 5.5.1 in the hooks framework. Depends on D123474 Differential Revision: https://phabricator.services.mozilla.com/D123475
hghooks/tests/test-blackbox-logging.t
hghooks/tests/test-populate-caches.t
hghooks/tests/test-prevent-string-changes.t
--- a/hghooks/tests/test-blackbox-logging.t
+++ b/hghooks/tests/test-blackbox-logging.t
@@ -18,10 +18,11 @@
 
 Blackbox log should contain times for each of our hooks
 
   $ grep mozhooks $TESTTMP/server/.hg/blackbox.log
   *> mozhooks.pretxnchangegroup.prevent_subrepos took * seconds (glob)
   *> mozhooks.pretxnchangegroup.prevent_symlinks took * seconds (glob)
   *> mozhooks.pretxnchangegroup.single_root took * seconds (glob)
   *> pythonhook-pretxnchangegroup: hgext_mozhooks.pretxnchangegroup finished in * seconds (glob)
+  *> pythonhook-pretxnclose: hgext_mozhooks.pretxnclose finished in 0.00 seconds (glob)
   *> mozhooks.changegroup.advertise_upgrade took * seconds (glob)
   *> pythonhook-changegroup: hgext_mozhooks.changegroup finished in * seconds (glob)
--- a/hghooks/tests/test-populate-caches.t
+++ b/hghooks/tests/test-populate-caches.t
@@ -28,46 +28,38 @@ Pushing a tag should not populate the ta
 
   $ hg tag initial
   $ hg -q push
 
   $ [ -f ../server/.hg/cache/hgtagsfnodes1 ]
   [1]
 
   $ cat ../server/.hg/blackbox.log
-  *> reposetup for blackbox took * (glob)
-  *> all reposetup took * (glob)
-  *> reposetup for blackbox took * (glob)
-  *> all reposetup took * (glob)
-  *> updated base branch cache in * seconds (glob)
-  *> wrote base branch cache with 1 labels and 1 nodes (glob)
+  *> updated branch cache (base) in * seconds (glob)
+  *> wrote branch cache (base) with 1 labels and 1 nodes (glob)
   *> 1 incoming changes - new heads: 96ee1d7354c4 (glob)
-  *> reposetup for blackbox took * (glob)
-  *> all reposetup took * (glob)
-  *> updated base branch cache in * seconds (glob)
-  *> wrote base branch cache with 1 labels and 1 nodes (glob)
+  *> updated branch cache (served) in * seconds (glob)
+  *> wrote branch cache (served) with 1 labels and 1 nodes (glob)
   *> 1 incoming changes - new heads: 5e849d85a748 (glob)
 
 Activating the hook causes tags cache to get populated
 
   $ cat >> ../server/.hg/hgrc << EOF
   > [hooks]
   > pretxnclose.populate_caches = python:mozhghooks.populate_caches.hook
   > EOF
 
   $ hg tag newtag
   $ hg -q push
 
   $ [ -f ../server/.hg/cache/hgtagsfnodes1 ]
 
-  $ tail -12 ../server/.hg/blackbox.log
+  $ tail -10 ../server/.hg/blackbox.log
   *> 1 incoming changes - new heads: 5e849d85a748 (glob)
-  *> reposetup for blackbox took * (glob)
-  *> all reposetup took * (glob)
   *> writing 72 bytes to cache/hgtagsfnodes1 (glob)
-  *> 0/1 cache hits/lookups in * seconds (glob)
+  *> 0/2 cache hits/lookups in * seconds (glob)
   *> writing .hg/cache/tags2-served with 2 tags (glob)
   *> 1/1 cache hits/lookups in * seconds (glob)
   *> writing .hg/cache/tags2 with 2 tags (glob)
   *> pythonhook-pretxnclose: mozhghooks.populate_caches.hook finished in * seconds (glob)
-  *> updated base branch cache in * seconds (glob)
-  *> wrote base branch cache with 1 labels and 1 nodes (glob)
+  *> updated branch cache (served) in * seconds (glob)
+  *> wrote branch cache (served) with 1 labels and 1 nodes (glob)
   *> 1 incoming changes - new heads: cf120f74c0ec (glob)
--- a/hghooks/tests/test-prevent-string-changes.t
+++ b/hghooks/tests/test-prevent-string-changes.t
@@ -79,17 +79,17 @@ Add DTD files (tracked extension, inside
   adding browser/locales/en-US/test.dtd
   adding browser/locales/en-US/test2.dtd
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 2 changes to 2 files
+  added 1 changesets with 2 changes to 2 files (no-hg59 !)
   
   ************************** ERROR ****************************
   
   * File used for localization (browser/locales/en-US/test.dtd) altered in this changeset *
   * File used for localization (browser/locales/en-US/test2.dtd) altered in this changeset *
   
   This repository is string frozen. Please request explicit permission from
   release managers to break string freeze in your bug.
@@ -106,32 +106,33 @@ Amend commit message to use correct keyw
 
   $ hg -q commit --amend -m "Commit .dtd files inside l10n path, l10n=foo"
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks. (hg59 !)
   added 1 changesets with 2 changes to 2 files
-  You've signaled approval for changes to strings in your push, thanks.
+  You've signaled approval for changes to strings in your push, thanks. (no-hg59 !)
 
 Add Fluent file (tracked extension, inside expected path), wrong commit message, should fail
 
   $ mkdir -p browser/locales/en-US
   $ echo "FTL file" >> browser/locales/en-US/test.ftl
   $ hg commit -A -m "Commit .ftl files inside l10n path, a=l10n"
   adding browser/locales/en-US/test.ftl
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 1 changes to 1 files
+  added 1 changesets with 2 changes to 2 files (no-hg59 !)
   
   ************************** ERROR ****************************
   
   * File used for localization (browser/locales/en-US/test.ftl) altered in this changeset *
   
   This repository is string frozen. Please request explicit permission from
   release managers to break string freeze in your bug.
   If you have that explicit permission, denote that by including in
@@ -147,43 +148,44 @@ Amend commit message to use correct keyw
 
   $ hg -q commit --amend -m "Commit .ftl files inside l10n path, l10n=foo"
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks. (hg59 !)
   added 1 changesets with 1 changes to 1 files
-  You've signaled approval for changes to strings in your push, thanks.
+  You've signaled approval for changes to strings in your push, thanks. (no-hg59 !)
 
 Edit existing file and commit with correct keyword, should work
 
   $ echo "Updated DTD content" >> browser/locales/en-US/test.dtd
   $ hg commit -A -m "Update .dtd file inside l10n path, l10n=foo"
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks. (hg59 !)
   added 1 changesets with 1 changes to 1 files
-  You've signaled approval for changes to strings in your push, thanks.
+  You've signaled approval for changes to strings in your push, thanks. (no-hg59 !)
 
 Delete a file and commit without the correct keyword, should fail
 
   $ hg rm browser/locales/en-US/test.dtd
   $ hg commit -A -m "Remove .dtd file inside l10n path"
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 1 changesets with 0 changes to 0 files
   
   ************************** ERROR ****************************
   
   * File used for localization (browser/locales/en-US/test.dtd) altered in this changeset *
   
   This repository is string frozen. Please request explicit permission from
   release managers to break string freeze in your bug.
   If you have that explicit permission, denote that by including in
@@ -197,18 +199,19 @@ Delete a file and commit without the cor
 
   $ hg -q commit --amend -m "Remove .dtd file inside l10n path, l10n=foo"
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks. (hg59 !)
   added 1 changesets with 0 changes to 0 files
-  You've signaled approval for changes to strings in your push, thanks.
+  You've signaled approval for changes to strings in your push, thanks. (no-hg59 !)
 
 Edit a file (tracked extension, inside expected path), as part of code uplift, should work
 
   $ echo "DTD file #1" >> browser/locales/en-US/test.dtd
   $ hg commit -A -m 'Change DTD file on trunk, no need of approval'
   adding browser/locales/en-US/test.dtd
   $ echo "uplift1" > dummy
   $ hg commit -A -m 'Doing code upload; a=release'
@@ -228,17 +231,17 @@ Same edit of a tracked file after releas
   $ echo "DTD file #1" >> browser/locales/en-US/test.dtd
   $ hg commit -m 'Change DTD file'
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
-  added 2 changesets with 2 changes to 2 files
+  added 2 changesets with 2 changes to 2 files (no-hg59 !)
   
   ************************** ERROR ****************************
   
   * File used for localization (browser/locales/en-US/test.dtd) altered in this changeset *
   
   This repository is string frozen. Please request explicit permission from
   release managers to break string freeze in your bug.
   If you have that explicit permission, denote that by including in
@@ -256,31 +259,33 @@ Message check should be case insensitive
   $ echo "DTD file #1" >> browser/locales/en-US/test.dtd
   $ hg commit -m 'Change DTD file, l10N='
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks. (hg59 !)
   added 3 changesets with 3 changes to 2 files
-  You've signaled approval for changes to strings in your push, thanks.
+  You've signaled approval for changes to strings in your push, thanks. (no-hg59 !)
 
 Hook lets approval for non-tip commits pass
 
   $ echo "DTD file in uplift3" >> browser/locales/en-US/test.dtd
   $ hg commit -m 'Change DTD file for uplift3. l10n='
   $ echo "uplift4" > dummy
   $ hg commit -m 'Doing uplift4 without localization change and approval'
   $ hg push ../server
   pushing to ../server
   searching for changes
   adding changesets
   adding manifests
   adding file changes
+  You've signaled approval for changes to strings in your push, thanks.
   added 2 changesets with 2 changes to 2 files
 
   $ cd ..
 
 Hook should not run when stripping
 
   $ hg init striptest
   $ cd striptest