Patchwork discovery: replace "heads" by "changesets" in a output note (BC)

login
register
mail settings
Submitter Pierre-Yves David
Date Sept. 7, 2019, 11:44 a.m.
Message ID <74dad98f3309bf86e699.1567856678@nodosa.octopoid.net>
Download mbox | patch
Permalink /patch/41530/
State Accepted
Headers show

Comments

Pierre-Yves David - Sept. 7, 2019, 11:44 a.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@octobus.net>
# Date 1556323445 -7200
#      Sat Apr 27 02:04:05 2019 +0200
# Node ID 74dad98f3309bf86e6993c23a5cff0ebb42dc511
# Parent  69195b6f8f974ba56aec9b9bd4cd0a259a646f72
# EXP-Topic discovery-more
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 74dad98f3309
discovery: replace "heads" by "changesets" in a output note (BC)

When using `hg push --rev X`, the subset considered by discovery is only `::X`.
In addition, `X` can be any local revisions not just local heads. As a result
the message "all local heads known locally" can be misleading. We replace it
with the more accurate "all local changesets known remotely".

The message appears when in verbose not, so this is stricly speaking a BC
breakage. I am not sure this would be a real issue in practice...
Yuya Nishihara - Sept. 8, 2019, 1:24 a.m.
On Sat, 07 Sep 2019 13:44:38 +0200, Pierre-Yves David wrote:
> # HG changeset patch
> # User Pierre-Yves David <pierre-yves.david@octobus.net>
> # Date 1556323445 -7200
> #      Sat Apr 27 02:04:05 2019 +0200
> # Node ID 74dad98f3309bf86e6993c23a5cff0ebb42dc511
> # Parent  69195b6f8f974ba56aec9b9bd4cd0a259a646f72
> # EXP-Topic discovery-more
> # Available At https://bitbucket.org/octobus/mercurial-devel/
> #              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 74dad98f3309
> discovery: replace "heads" by "changesets" in a output note (BC)

Queued, thanks.

Patch

diff --git a/mercurial/setdiscovery.py b/mercurial/setdiscovery.py
--- a/mercurial/setdiscovery.py
+++ b/mercurial/setdiscovery.py
@@ -389,7 +389,7 @@  def findcommonheads(ui, local, remote,
         return srvheadhashes, False, srvheadhashes
 
     if len(sample) == len(ownheads) and all(yesno):
-        ui.note(_("all local heads known remotely\n"))
+        ui.note(_("all local changesets known remotely\n"))
         ownheadhashes = [clnode(r) for r in ownheads]
         return ownheadhashes, True, srvheadhashes
 
diff --git a/tests/test-blackbox.t b/tests/test-blackbox.t
--- a/tests/test-blackbox.t
+++ b/tests/test-blackbox.t
@@ -140,7 +140,7 @@  we must not cause a failure if we cannot
   comparing with $TESTTMP/blackboxtest
   query 1; heads
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   changeset:   2:d02f48003e62c24e2659d97d30f2a83abe5d5d51
   tag:         tip
   phase:       draft
diff --git a/tests/test-largefiles.t b/tests/test-largefiles.t
--- a/tests/test-largefiles.t
+++ b/tests/test-largefiles.t
@@ -1115,7 +1115,7 @@  redo pull with --lfrev and check it pull
   $ hg pull -v --lfrev 'heads(pulled())+min(pulled())'
   pulling from $TESTTMP/a
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   6 changesets found
   uncompressed size of bundle content:
       1389 (changelog)
diff --git a/tests/test-narrow-widen-no-ellipsis.t b/tests/test-narrow-widen-no-ellipsis.t
--- a/tests/test-narrow-widen-no-ellipsis.t
+++ b/tests/test-narrow-widen-no-ellipsis.t
@@ -116,7 +116,7 @@  added upstream revisions.
   query 1; heads
   sending batch command
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   sending narrow_widen command
   bundle2-input-bundle: with-transaction
   bundle2-input-part: "changegroup" (params: * mandatory) supported (glob)
diff --git a/tests/test-setdiscovery.t b/tests/test-setdiscovery.t
--- a/tests/test-setdiscovery.t
+++ b/tests/test-setdiscovery.t
@@ -64,7 +64,7 @@  Small superset:
   comparing with b
   query 1; heads
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   elapsed time:  * seconds (glob)
   heads summary:
     total common heads:          2
@@ -86,7 +86,7 @@  Small superset:
   comparing with b
   query 1; heads
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   elapsed time:  * seconds (glob)
   heads summary:
     total common heads:          1
diff --git a/tests/test-wireproto-exchangev2-shallow.t b/tests/test-wireproto-exchangev2-shallow.t
--- a/tests/test-wireproto-exchangev2-shallow.t
+++ b/tests/test-wireproto-exchangev2-shallow.t
@@ -490,7 +490,7 @@  Incremental pull of shallow clone fetche
   received frame(size=2; request=3; stream=2; streamflags=encoded; type=command-response; flags=continuation)
   received frame(size=0; request=3; stream=2; streamflags=; type=command-response; flags=eos)
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   sending 1 commands
   sending command changesetdata: {
     'fields': set([
diff --git a/tests/test-wireproto-exchangev2.t b/tests/test-wireproto-exchangev2.t
--- a/tests/test-wireproto-exchangev2.t
+++ b/tests/test-wireproto-exchangev2.t
@@ -299,7 +299,7 @@  Output is flaky, save it in a file and c
     ]
   }
   searching for changes
-  all local heads known remotely
+  all local changesets known remotely
   sending 1 commands
   sending command changesetdata: {
     'fields': set([