Patchwork [STABLE] push: fix "No changes found" when pushing a phase change (issue4232)

login
register
mail settings
Submitter Laurent Charignon
Date Jan. 21, 2016, 6:05 p.m.
Message ID <77a884362c9f15e6a96a.1453399534@dev5073.prn1.facebook.com>
Download mbox | patch
Permalink /patch/12860/
State Accepted
Headers show

Comments

Laurent Charignon - Jan. 21, 2016, 6:05 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1453398185 28800
#      Thu Jan 21 09:43:05 2016 -0800
# Branch stable
# Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4
# Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7
push: fix "No changes found" when pushing a phase change (issue4232)

Before this patch when pushing a change that was only affecting phases, we were
printing "no changes found" which was inaccurate. This patch adds a new warning
when only phases change but no changesets are exchanges: "no new changesets,
only pushing phase changes".
Matt Mackall - Jan. 21, 2016, 6:21 p.m.
On Thu, 2016-01-21 at 10:05 -0800, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1453398185 28800
> #      Thu Jan 21 09:43:05 2016 -0800
> # Branch stable
> # Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4
> # Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7
> push: fix "No changes found" when pushing a phase change (issue4232)
> 
> Before this patch when pushing a change that was only affecting phases, we
> were
> printing "no changes found" which was inaccurate. This patch adds a new
> warning
> when only phases change but no changesets are exchanges: "no new changesets,
> only pushing phase changes".

What about pull?

I think the message should be "adjusting phases" (full stop). On push, sometimes
we simply local draft changes public (so nothing is actually pushed). 

(We're also eerily silent for 20 seconds while synchronizing obsmarkers.)

-- 
Mathematics is the supreme nostalgia of our time.
Laurent Charignon - Jan. 21, 2016, 6:24 p.m.
On 1/21/16, 10:21 AM, "Matt Mackall" <mpm@selenic.com> wrote:

>On Thu, 2016-01-21 at 10:05 -0800, Laurent Charignon wrote:

>> # HG changeset patch

>> # User Laurent Charignon <lcharignon@fb.com>

>> # Date 1453398185 28800

>> #      Thu Jan 21 09:43:05 2016 -0800

>> # Branch stable

>> # Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4

>> # Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7

>> push: fix "No changes found" when pushing a phase change (issue4232)

>> 

>> Before this patch when pushing a change that was only affecting phases, we

>> were

>> printing "no changes found" which was inaccurate. This patch adds a new

>> warning

>> when only phases change but no changesets are exchanges: "no new changesets,

>> only pushing phase changes".

>

>What about pull?

>

>I think the message should be "adjusting phases" (full stop). On push, sometimes

>we simply local draft changes public (so nothing is actually pushed). 

>

>(We're also eerily silent for 20 seconds while synchronizing obsmarkers.)


What do you mean by "full stop"?

I will send a V2 with:
- The message adjusted for this patch
- Another patch with a warning for pull

The obsmarkers warnings should probably go in another series.


>

>-- 

>Mathematics is the supreme nostalgia of our time.

>
timeless - Jan. 21, 2016, 7:11 p.m.
Matt Mackall wrote:
> I think the message should be "adjusting phases" (full stop). On push, sometimes
> we simply local draft changes public (so nothing is actually pushed).

> (We're also eerily silent for 20 seconds while synchronizing obsmarkers.)

fwiw, if you talk to bitbucket, you don't get that.

I got things like:
obsmarkers exchange [=====================================> ]
8861194/14391223 6m37s

(where the number climbed for a really long time.
2016/01/21 19:07:14 timeless (126481)> push bitbucket -r tip exited 0
after 1554.39 seconds

Laurent Charignon wrote:
> What do you mean by "full stop"?

You have:
no new changesets, only pushing phase changes
mpm is suggesting:
adjusting phases

nothing else, no mention of `no new changesets` or `pushing` or `changes`.
Laurent Charignon - Jan. 21, 2016, 7:12 p.m.
Adding the message for pull whenever phases change breaks 83 tests, I will hold off on that until after the freeze.

Laurent

> On Jan 21, 2016, at 10:24 AM, Laurent Charignon <lcharignon@fb.com> wrote:
> 
> 
> 
> 
> 
> 
> On 1/21/16, 10:21 AM, "Matt Mackall" <mpm@selenic.com> wrote:
> 
>> On Thu, 2016-01-21 at 10:05 -0800, Laurent Charignon wrote:
>>> # HG changeset patch
>>> # User Laurent Charignon <lcharignon@fb.com>
>>> # Date 1453398185 28800
>>> #      Thu Jan 21 09:43:05 2016 -0800
>>> # Branch stable
>>> # Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4
>>> # Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7
>>> push: fix "No changes found" when pushing a phase change (issue4232)
>>> 
>>> Before this patch when pushing a change that was only affecting phases, we
>>> were
>>> printing "no changes found" which was inaccurate. This patch adds a new
>>> warning
>>> when only phases change but no changesets are exchanges: "no new changesets,
>>> only pushing phase changes".
>> 
>> What about pull?
>> 
>> I think the message should be "adjusting phases" (full stop). On push, sometimes
>> we simply local draft changes public (so nothing is actually pushed). 
>> 
>> (We're also eerily silent for 20 seconds while synchronizing obsmarkers.)
> 
> What do you mean by "full stop"?
> 
> I will send a V2 with:
> - The message adjusted for this patch
> - Another patch with a warning for pull
> 
> The obsmarkers warnings should probably go in another series.
> 
> 
>> 
>> -- 
>> Mathematics is the supreme nostalgia of our time.
>> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> https://selenic.com/mailman/listinfo/mercurial-devel
Matt Mackall - Jan. 21, 2016, 7:16 p.m.
On Thu, 2016-01-21 at 18:24 +0000, Laurent Charignon wrote:
> 
> 
> 
> 
> On 1/21/16, 10:21 AM, "Matt Mackall" <mpm@selenic.com> wrote:
> 
> > On Thu, 2016-01-21 at 10:05 -0800, Laurent Charignon wrote:
> > > # HG changeset patch
> > > # User Laurent Charignon <lcharignon@fb.com>
> > > # Date 1453398185 28800
> > > #      Thu Jan 21 09:43:05 2016 -0800
> > > # Branch stable
> > > # Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4
> > > # Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7
> > > push: fix "No changes found" when pushing a phase change (issue4232)
> > > 
> > > Before this patch when pushing a change that was only affecting phases, we
> > > were
> > > printing "no changes found" which was inaccurate. This patch adds a new
> > > warning
> > > when only phases change but no changesets are exchanges: "no new
> > > changesets,
> > > only pushing phase changes".
> > 
> > What about pull?
> > 
> > I think the message should be "adjusting phases" (full stop). On push,
> > sometimes
> > we simply local draft changes public (so nothing is actually pushed). 
> > 
> > (We're also eerily silent for 20 seconds while synchronizing obsmarkers.)
> 
> What do you mean by "full stop"?

"Full stop" means "that's all, nothing else." Here it means "not only do I want
to change the phases part of the message, I want this to be the entire message":

$ hg push
...
searching for changes
adjusting phases

-- 
Mathematics is the supreme nostalgia of our time.
Laurent Charignon - Jan. 21, 2016, 7:17 p.m.
> On Jan 21, 2016, at 11:11 AM, timeless <timeless@gmail.com> wrote:
> 
> Matt Mackall wrote:
>> I think the message should be "adjusting phases" (full stop). On push, sometimes
>> we simply local draft changes public (so nothing is actually pushed).
> 
>> (We're also eerily silent for 20 seconds while synchronizing obsmarkers.)
> 
> fwiw, if you talk to bitbucket, you don't get that.
> 
> I got things like:
> obsmarkers exchange [=====================================> ]
> 8861194/14391223 6m37s
> 
> (where the number climbed for a really long time.
> 2016/01/21 19:07:14 timeless (126481)> push bitbucket -r tip exited 0
> after 1554.39 seconds
> 
> Laurent Charignon wrote:
>> What do you mean by "full stop"?
> 
> You have:
> no new changesets, only pushing phase changes
> mpm is suggesting:
> adjusting phases
> 
> nothing else, no mention of `no new changesets` or `pushing` or `changes`.

Ok that's what I understood.
Pierre-Yves David - Jan. 21, 2016, 7:58 p.m.
On 01/21/2016 10:21 AM, Matt Mackall wrote:
> On Thu, 2016-01-21 at 10:05 -0800, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon@fb.com>
>> # Date 1453398185 28800
>> #      Thu Jan 21 09:43:05 2016 -0800
>> # Branch stable
>> # Node ID 77a884362c9f15e6a96a5eebf484ee9a2e085fe4
>> # Parent  f62dea3f36975b3daac82e9dcd0ec964cf30c2a7
>> push: fix "No changes found" when pushing a phase change (issue4232)
>>
>> Before this patch when pushing a change that was only affecting phases, we
>> were
>> printing "no changes found" which was inaccurate. This patch adds a new
>> warning
>> when only phases change but no changesets are exchanges: "no new changesets,
>> only pushing phase changes".
>
> What about pull?
>
> I think the message should be "adjusting phases" (full stop). On push, sometimes
> we simply local draft changes public (so nothing is actually pushed).
>
> (We're also eerily silent for 20 seconds while synchronizing obsmarkers.)

There is output about obsmarker echange somewhere behind an experimental 
flag (because I've some), we should probably apply minimal polish and 
push this out of the wood.

Patch

diff --git a/mercurial/exchange.py b/mercurial/exchange.py
--- a/mercurial/exchange.py
+++ b/mercurial/exchange.py
@@ -620,7 +620,10 @@ 
     unfi = pushop.repo.unfiltered()
     if not outgoing.missing:
         # nothing to push
-        scmutil.nochangesfound(unfi.ui, unfi, outgoing.excluded)
+        if pushop.outdatedphases:
+            unfi.ui.warn(_("no new changesets, only pushing phase changes\n"))
+        else:
+            scmutil.nochangesfound(unfi.ui, unfi, outgoing.excluded)
         return False
     # something to push
     if not pushop.force:
diff --git a/tests/test-phases-exchange.t b/tests/test-phases-exchange.t
--- a/tests/test-phases-exchange.t
+++ b/tests/test-phases-exchange.t
@@ -391,7 +391,7 @@ 
   $ hg push ../alpha # from nu
   pushing to ../alpha
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
   $ cd ..
   $ cd alpha
@@ -607,7 +607,7 @@ 
   $ hg push ../alpha
   pushing to ../alpha
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
   $ hgph
   o  6 public a-F - b740e3e5c05d
@@ -712,7 +712,7 @@ 
   $ hg push ../alpha
   pushing to ../alpha
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
   $ hgph
   o  9 public a-H - 967b449fbc94
diff --git a/tests/test-push-warn.t b/tests/test-push-warn.t
--- a/tests/test-push-warn.t
+++ b/tests/test-push-warn.t
@@ -131,7 +131,7 @@ 
   $ hg push -r 2 ../c
   pushing to ../c
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
 
   $ hg push -r 3 ../c
diff --git a/tests/test-subrepo.t b/tests/test-subrepo.t
--- a/tests/test-subrepo.t
+++ b/tests/test-subrepo.t
@@ -1516,7 +1516,7 @@ 
   searching for changes
   no changes found
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
 # clean the push cache
   $ rm s/.hg/cache/storehash/*
diff --git a/tests/test-treediscovery-legacy.t b/tests/test-treediscovery-legacy.t
--- a/tests/test-treediscovery-legacy.t
+++ b/tests/test-treediscovery-legacy.t
@@ -115,7 +115,7 @@ 
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
   $ cd ..
 
diff --git a/tests/test-treediscovery.t b/tests/test-treediscovery.t
--- a/tests/test-treediscovery.t
+++ b/tests/test-treediscovery.t
@@ -104,7 +104,7 @@ 
   $ hg push $remote
   pushing to http://localhost:$HGPORT/
   searching for changes
-  no changes found
+  no new changesets, only pushing phase changes
   [1]
   $ cd ..