Bug 3231 - push gives "updating to public failed!" message
Summary: push gives "updating to public failed!" message
Status: RESOLVED FIXED
Alias: None
Product: Mercurial
Classification: Unclassified
Component: Mercurial (show other bugs)
Version: unspecified
Hardware: All All
: normal bug
Assignee: Bugzilla
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-30 14:36 UTC by Matt Mackall
Modified: 2012-05-13 05:10 UTC (History)
3 users (show)

See Also:
Python Version: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Mackall 2012-01-30 14:36 UTC
$ hg push
pushing to ssh://xxx/repo/hg
searching for changes
updating e6e12e60a45f to public failed!
remote: adding changesets
remote: adding manifests
remote: adding file changes
remote: added 17 changesets with 32 changes to 19 files

At the time of push, e6e12 is a draft cset at the repository tip.

Both sides report no non-public changesets after the push.
Comment 1 Pierre-Yves David 2012-01-31 12:04 UTC
I did not managed to reproduce it yet
Comment 2 Matt Mackall 2012-01-31 18:06 UTC
Do you need any info? I can reproduce it at will.
Comment 3 Pierre-Yves David 2012-02-01 04:27 UTC
I was not able to reproduce it with playing with the mercurial repo (around
 e6e12e60a45f)
I can not reproduce it with a testcase with either http or ssh

Can you build on for me or make a tarbal with you exact situation ?

--- a/tests/test-phases-exchange.t
@@ -1014,5 +1015,45 @@ 2. cloning publishing repository
   o  1 public a-B - 548a3d25dbf0
   |
   o  0 public a-A - 054250a37db4
   
 
+  $ cd Upsilon
+  $ hg up -q tip
+  $ mkcommit 'Issue3230'
+  $ mkcommit 'Issue3230-bis'
+  $ cat >> ../alpha/.hg/hgrc << EOF
+  > [phases]
+  > publish=true
+  > [web]
+  > push_ssl=false
+  > allow_push=*
+  > EOF
+  $ hg -R ../alpha serve -p $HGPORT2 -d --pid-file=../alpha.pid -E
../alpha-error.log
+  $ cat ../alpha.pid >> $DAEMON_PIDS
+
+  $ hg push  http://localhost:$HGPORT2/
+  pushing to http://localhost:$HGPORT2/
+  searching for changes
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 2 changesets with 2 changes to 2 files
+  $ hg phase --draft --force -- -2
+  $ hg -R ../alpha phase --draft --force -- -2
+  $ hg push  http://localhost:$HGPORT2/
+  pushing to http://localhost:$HGPORT2/
+  searching for changes
+  no changes found
+
+  $ hg --config extensions.hgext.mq= -R ../alpha strip -- -2
+  saved backup bundle to $TESTTMP/alpha/.hg/strip-backup/fe05c6d4d718-backup.hg
+  $ hg phase --draft --force -- -2
+  $ hg push ssh://crater2//$PWD/../alpha
+  pushing to ssh://crater2//$TESTTMP/Upsilon/../alpha
+  searching for changes
+  remote: Warning: No xauth data; using fake authentication data for X11
forwarding.\r (esc)
+  remote: adding changesets
+  remote: adding manifests
+  remote: adding file changes
+  remote: added 2 changesets with 2 changes to 2 files
Comment 4 Matt Mackall 2012-02-01 14:11 UTC
Ok, I have a theory. The repo in question has the following hook:

[hooks]
changegroup = hg push -qr stable hg-stable

..which is moving the phases to public before the client gets a chance to.
Comment 5 HG Bot 2012-02-01 15:00 UTC
Fixed by http://selenic.com/repo/hg/rev/2aa5b51f310f
Matt Mackall <mpm@selenic.com>
phases: don't complain if cset is already public on pushkey (issue3230)

(please test the fix)
Comment 6 Bugzilla 2012-05-12 09:27 UTC

--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:27 EDT  ---

This bug was previously known as _bug_ 3230 at http://mercurial.selenic.com/bts/issue3230