D4932: push:Added keyword remote to 'repository changed while pushing' error(Issue5971)

taapas1128 (Taapas Agrawal) phabricator at mercurial-scm.org
Wed Oct 10 15:14:30 UTC 2018


taapas1128 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

REVISION DETAIL
  https://phab.mercurial-scm.org/D4932

AFFECTED FILES
  mercurial/bundle2.py
  tests/test-bundle2-exchange.t
  tests/test-bundle2-format.t
  tests/test-push-race.t

CHANGE DETAILS

diff --git a/tests/test-push-race.t b/tests/test-push-race.t
--- a/tests/test-push-race.t
+++ b/tests/test-push-race.t
@@ -11,30 +11,30 @@
 
   $ cat >> delaypush.py << EOF
   > """small extension orchestrate push race
-  > 
+  >
   > Client with the extensions will create a file when ready and get stuck until
   > a file is created."""
-  > 
+  >
   > import errno
   > import os
   > import time
-  > 
+  >
   > from mercurial import (
   >     exchange,
   >     extensions,
   >     registrar,
   > )
-  > 
+  >
   > configtable = {}
   > configitem = registrar.configitem(configtable)
-  > 
+  >
   > configitem('delaypush', 'ready-path',
   >     default=None,
   > )
   > configitem('delaypush', 'release-path',
   >     default=None,
   > )
-  > 
+  >
   > def delaypush(orig, pushop):
   >     # notify we are done preparing
   >     ui = pushop.repo.ui
@@ -63,7 +63,7 @@
   >                         raise
   >             ui.atexit(delete)
   >     return orig(pushop)
-  > 
+  >
   > def uisetup(ui):
   >     extensions.wrapfunction(exchange, '_pushbundle2', delaypush)
   > EOF
@@ -214,13 +214,13 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  98217d5a1659 C-A (default)
   |
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Pushing on two different heads
 ------------------------------
@@ -269,7 +269,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -303,7 +303,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  51c544a58128 C-C (default)
@@ -339,7 +339,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 #endif
 
 Pushing while someone creates a new head
@@ -406,7 +406,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -451,7 +451,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  d603e2c0cdd7 C-E (default)
@@ -465,7 +465,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 #endif
 
@@ -497,7 +497,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 #endif
 
 Pushing touching different named branch (same topo): new branch raced
@@ -568,7 +568,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -614,7 +614,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  75d69cba5402 C-G (default)
@@ -632,7 +632,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 #endif
 #if unrelated
 
@@ -666,7 +666,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 #endif
 
 The racing new head do not affect existing heads, push should go through
@@ -743,7 +743,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -789,7 +789,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  b35ed749f288 C-I (my-second-test-branch)
@@ -811,7 +811,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 #endif
 
@@ -851,7 +851,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 #endif
 
@@ -933,7 +933,7 @@
   | o  a9149a1428e2 C-B (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -977,7 +977,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o    be705100c623 C-K (default)
@@ -1003,7 +1003,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 pushing raced push touch multiple heads
 ---------------------------------------
@@ -1073,7 +1073,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -1113,7 +1113,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  6fd3090135df C-M (default)
@@ -1143,7 +1143,7 @@
   | o  98217d5a1659 C-A (default)
   |/
   @  842e2fac6304 C-ROOT (default)
-  
+
 
 racing commit push a new head behind another named branch
 ---------------------------------------------------------
@@ -1235,7 +1235,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -1285,7 +1285,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  1b58ee3f79e5 C-P (default)
@@ -1323,7 +1323,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 raced commit push a new head behind another named branch
 ---------------------------------------------------------
@@ -1408,7 +1408,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets
 
@@ -1458,7 +1458,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server graph
   o  de7b9e2ba3f6 C-R (other)
@@ -1500,7 +1500,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 raced commit push a new head obsoleting the one touched by the racing push
 --------------------------------------------------------------------------
@@ -1585,7 +1585,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets and markers
 
@@ -1634,7 +1634,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server debugobsolete
   $ hg -R server graph
@@ -1683,7 +1683,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 racing commit push a new head obsoleting the one touched by the raced push
 --------------------------------------------------------------------------
@@ -1783,7 +1783,7 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
+
 
 Creating changesets and markers
 
@@ -1834,7 +1834,7 @@
   wrote ready: $TESTTMP/readyfile
   waiting on: $TESTTMP/watchfile
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
 
   $ hg -R server debugobsolete
   b0ee3d6f51bc4c0ca6d4f2907708027a6c376233 720c5163ecf64dcc6216bee2d62bf3edb1882499 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -1889,4 +1889,3 @@
   o |  98217d5a1659 C-A (default)
   |/
   o  842e2fac6304 C-ROOT (default)
-  
diff --git a/tests/test-bundle2-format.t b/tests/test-bundle2-format.t
--- a/tests/test-bundle2-format.t
+++ b/tests/test-bundle2-format.t
@@ -8,7 +8,7 @@
 
   $ cat > bundle2.py << EOF
   > """A small extension to test bundle2 implementation
-  > 
+  >
   > This extension allows detailed testing of the various bundle2 API and
   > behaviors.
   > """
@@ -24,24 +24,24 @@
   > from mercurial import obsolete
   > from mercurial import pycompat
   > from mercurial import registrar
-  > 
-  > 
+  >
+  >
   > try:
   >     import msvcrt
   >     msvcrt.setmode(sys.stdin.fileno(), os.O_BINARY)
   >     msvcrt.setmode(sys.stdout.fileno(), os.O_BINARY)
   >     msvcrt.setmode(sys.stderr.fileno(), os.O_BINARY)
   > except ImportError:
   >     pass
-  > 
+  >
   > cmdtable = {}
   > command = registrar.command(cmdtable)
-  > 
+  >
   > ELEPHANTSSONG = b"""Patali Dirapata, Cromda Cromda Ripalo, Pata Pata, Ko Ko Ko
   > Bokoro Dipoulito, Rondi Rondi Pepino, Pata Pata, Ko Ko Ko
   > Emana Karassoli, Loucra Loucra Ponponto, Pata Pata, Ko Ko Ko."""
   > assert len(ELEPHANTSSONG) == 178 # future test say 178 bytes, trust it.
-  > 
+  >
   > @bundle2.parthandler(b'test:song')
   > def songhandler(op, part):
   >     """handle a "test:song" bundle2 part, printing the lyrics on stdin"""
@@ -51,15 +51,15 @@
   >         op.ui.write(b'    %s\n' % line)
   >         verses += 1
   >     op.records.add(b'song', {b'verses': verses})
-  > 
+  >
   > @bundle2.parthandler(b'test:ping')
   > def pinghandler(op, part):
   >     op.ui.write(b'received ping request (id %i)\n' % part.id)
   >     if op.reply is not None and b'ping-pong' in op.reply.capabilities:
   >         op.ui.write_err(b'replying to ping request (id %i)\n' % part.id)
   >         op.reply.newpart(b'test:pong', [(b'in-reply-to', b'%d' % part.id)],
   >                          mandatory=False)
-  > 
+  >
   > @bundle2.parthandler(b'test:debugreply')
   > def debugreply(op, part):
   >     """print data about the capacity of the bundle reply"""
@@ -71,7 +71,7 @@
   >             op.ui.write(b"debugreply:     '%s'\n" % cap)
   >             for val in op.reply.capabilities[cap]:
   >                 op.ui.write(b"debugreply:         '%s'\n" % val)
-  > 
+  >
   > @command(b'bundle2',
   >          [(b'', b'param', [], b'stream level parameter'),
   >           (b'', b'unknown', False, b'include an unknown mandatory part in the bundle'),
@@ -93,19 +93,19 @@
   >             bundler.addparam(*p)
   >         except error.ProgrammingError as exc:
   >             raise error.Abort(b'%s' % exc)
-  > 
+  >
   >     if opts['compress']:
   >         bundler.setcompression(opts['compress'])
-  > 
+  >
   >     if opts['reply']:
   >         capsstring = b'ping-pong\nelephants=babar,celeste\ncity%3D%21=celeste%2Cville'
   >         bundler.newpart(b'replycaps', data=capsstring)
-  > 
+  >
   >     if opts['pushrace']:
   >         # also serve to test the assignement of data outside of init
   >         part = bundler.newpart(b'check:heads')
   >         part.data = b'01234567890123456789'
-  > 
+  >
   >     revs = opts['rev']
   >     if 'rev' in opts:
   >         revs = scmutil.revrange(repo, opts['rev'])
@@ -119,7 +119,7 @@
   >                                              b'test:bundle2')
   >             bundler.newpart(b'changegroup', data=cg.getchunks(),
   >                             mandatory=False)
-  > 
+  >
   >     if opts['parts']:
   >        bundler.newpart(b'test:empty', mandatory=False)
   >        # add a second one to make sure we handle multiple parts
@@ -145,12 +145,12 @@
   >            yield b'first line\n'
   >            raise RuntimeError('Someone set up us the bomb!')
   >        bundler.newpart(b'output', data=genraise(), mandatory=False)
-  > 
+  >
   >     if path is None:
   >        file = pycompat.stdout
   >     else:
   >         file = open(path, 'wb')
-  > 
+  >
   >     if opts['timeout']:
   >         bundler.newpart(b'test:song', data=ELEPHANTSSONG, mandatory=False)
   >         for idx, junk in enumerate(bundler.getchunks()):
@@ -171,7 +171,7 @@
   >         raise error.Abort(exc)
   >     finally:
   >         file.flush()
-  > 
+  >
   > @command(b'unbundle2', [], b'')
   > def cmdunbundle2(ui, repo, replypath=None):
   >     """process a bundle2 stream from stdin on the current repo"""
@@ -202,7 +202,7 @@
   >         with open(replypath, 'wb') as file:
   >             for chunk in op.reply.getchunks():
   >                 file.write(chunk)
-  > 
+  >
   > @command(b'statbundle2', [], b'')
   > def cmdstatbundle2(ui, repo):
   >     """print statistic on the bundle2 container read from stdin"""
@@ -259,15 +259,15 @@
 Test bundling
 
   $ hg bundle2 | f --hexdump
-  
+
   0000: 48 47 32 30 00 00 00 00 00 00 00 00             |HG20........|
 
 Test timeouts during bundling
   $ hg bundle2 --timeout --debug --config devel.bundle2.debug=yes
   bundle2-output-bundle: "HG20", 1 parts total
   bundle2-output: start emission of HG20 stream
   0 chunk
-  bundle2-output: bundle parameter: 
+  bundle2-output: bundle parameter:
   1 chunk
   bundle2-output: start of parts
   bundle2-output: bundle part: "test:song"
@@ -310,7 +310,7 @@
 Test generation simple option
 
   $ hg bundle2 --param 'caution' | f --hexdump
-  
+
   0000: 48 47 32 30 00 00 00 07 63 61 75 74 69 6f 6e 00 |HG20....caution.|
   0010: 00 00 00                                        |...|
 
@@ -324,7 +324,7 @@
 Test generation multiple option
 
   $ hg bundle2 --param 'caution' --param 'meal' | f --hexdump
-  
+
   0000: 48 47 32 30 00 00 00 0c 63 61 75 74 69 6f 6e 20 |HG20....caution |
   0010: 6d 65 61 6c 00 00 00 00                         |meal....|
 
@@ -342,7 +342,7 @@
 Test generation
 
   $ hg bundle2 --param 'caution' --param 'meal=vegan' --param 'elephants' | f --hexdump
-  
+
   0000: 48 47 32 30 00 00 00 1c 63 61 75 74 69 6f 6e 20 |HG20....caution |
   0010: 6d 65 61 6c 3d 76 65 67 61 6e 20 65 6c 65 70 68 |meal=vegan eleph|
   0020: 61 6e 74 73 00 00 00 00                         |ants....|
@@ -363,7 +363,7 @@
 Test generation
 
   $ hg bundle2 --param 'e|! 7/=babar%#==tutu' --param simple | f --hexdump
-  
+
   0000: 48 47 32 30 00 00 00 29 65 25 37 43 25 32 31 25 |HG20...)e%7C%21%|
   0010: 32 30 37 2f 3d 62 61 62 61 72 25 32 35 25 32 33 |207/=babar%25%23|
   0020: 25 33 44 25 33 44 74 75 74 75 20 73 69 6d 70 6c |%3D%3Dtutu simpl|
@@ -445,7 +445,7 @@
   $ hg bundle2 --parts ../parts.hg2 --debug --config progress.debug=true --config devel.bundle2.debug=true
   bundle2-output-bundle: "HG20", 7 parts total
   bundle2-output: start emission of HG20 stream
-  bundle2-output: bundle parameter: 
+  bundle2-output: bundle parameter:
   bundle2-output: start of parts
   bundle2-output: bundle part: "test:empty"
   bundle2-output-part: "test:empty" (advisory) empty payload
@@ -824,7 +824,7 @@
 
   $ hg unbundle2 < ../part-race.hg2
   0 unread bytes
-  abort: push race: repository changed while pushing - please try again
+  abort: push race: remote repository changed while pushing - please try again
   [255]
 
 Support for changegroup
@@ -854,9 +854,9 @@
   | o  2:42ccdea3bb16 draft Nicolas Dumazet <nicdumz.commits at gmail.com>  B
   |/
   o  1:cd010b8cd998 draft Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   @  0:3903775176ed draft test  a
-  
+
 
   $ hg bundle2 --debug --config progress.debug=true --config devel.bundle2.debug=true --rev '8+7+5+4' ../rev.hg2
   4 changesets found
@@ -867,7 +867,7 @@
   02de42196ebee42ef284b6780a87cdc96e8eaab6
   bundle2-output-bundle: "HG20", 1 parts total
   bundle2-output: start emission of HG20 stream
-  bundle2-output: bundle parameter: 
+  bundle2-output: bundle parameter:
   bundle2-output: start of parts
   bundle2-output: bundle part: "changegroup"
   bundle2-output-part: "changegroup" (advisory) streamed payload
diff --git a/tests/test-bundle2-exchange.t b/tests/test-bundle2-exchange.t
--- a/tests/test-bundle2-exchange.t
+++ b/tests/test-bundle2-exchange.t
@@ -50,18 +50,18 @@
   $ touch a
   $ hg add a
   $ hg commit -m 'a'
-  pre-close-tip:3903775176ed draft 
-  postclose-tip:3903775176ed draft 
+  pre-close-tip:3903775176ed draft
+  postclose-tip:3903775176ed draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
 
   $ hg unbundle $TESTDIR/bundles/rebase.hg
   adding changesets
   adding manifests
   adding file changes
   added 8 changesets with 7 changes to 7 files (+3 heads)
-  pre-close-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
   new changesets cd010b8cd998:02de42196ebe
-  postclose-tip:02de42196ebe draft 
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=02de42196ebee42ef284b6780a87cdc96e8eaab6 HG_PHASES_MOVED=1 HG_SOURCE=unbundle HG_TXNID=TXN:$ID$ HG_TXNNAME=unbundle
   bundle:*/tests/bundles/rebase.hg HG_URL=bundle:*/tests/bundles/rebase.hg (glob)
   (run 'hg heads' to see heads, 'hg merge' to merge)
@@ -74,46 +74,46 @@
 Add more obsolescence information
 
   $ hg -R main debugobsolete -d '0 0' 1111111111111111111111111111111111111111 `getmainid 9520eea781bc`
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
   $ hg -R main debugobsolete -d '0 0' 2222222222222222222222222222222222222222 `getmainid 24b6387c8c8c`
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
 
 clone --pull
 
   $ hg -R main phase --public cd010b8cd998
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
   $ hg clone main other --pull --rev 9520eea781bc
   adding changesets
   adding manifests
   adding file changes
   added 2 changesets with 2 changes to 2 files
   1 new obsolescence markers
-  pre-close-tip:9520eea781bc draft 
+  pre-close-tip:9520eea781bc draft
   new changesets cd010b8cd998:9520eea781bc
-  postclose-tip:9520eea781bc draft 
+  postclose-tip:9520eea781bc draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=cd010b8cd998f3981a5a8115f94f8da4ab506089 HG_NODE_LAST=9520eea781bcca16c1e15acc0ba14335a0e8e5ba HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   updating to branch default
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
   $ hg -R other log -G
   @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
 pull
 
   $ hg -R main phase --public 9520eea781bc
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
   $ hg -R other pull -r 24b6387c8c8c
   pulling from $TESTTMP/main
@@ -123,9 +123,9 @@
   adding file changes
   added 1 changesets with 1 changes to 1 files (+1 heads)
   1 new obsolescence markers
-  pre-close-tip:24b6387c8c8c draft 
+  pre-close-tip:24b6387c8c8c draft
   new changesets 24b6387c8c8c
-  postclose-tip:24b6387c8c8c draft 
+  postclose-tip:24b6387c8c8c draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_NODE=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_NODE_LAST=24b6387c8c8cae37178880f3fa95ded3cb1cf785 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   (run 'hg heads' to see heads, 'hg merge' to merge)
@@ -135,32 +135,32 @@
   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
 pull empty (with phase movement)
 
   $ hg -R main phase --public 24b6387c8c8c
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_PHASES_MOVED=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=phase
   $ hg -R other pull -r 24b6387c8c8c
   pulling from $TESTTMP/main
   no changes found
-  pre-close-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
   1 local changesets published
-  postclose-tip:24b6387c8c8c public 
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_PHASES_MOVED=1 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   $ hg -R other log -G
   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits at gmail.com>  F
   |
   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -170,30 +170,30 @@
   $ hg -R other pull -r 24b6387c8c8c
   pulling from $TESTTMP/main
   no changes found
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=0 HG_SOURCE=pull HG_TXNID=TXN:$ID$ HG_TXNNAME=pull
   file:/*/$TESTTMP/main HG_URL=file:$TESTTMP/main (glob)
   $ hg -R other log -G
   o  2:24b6387c8c8c public Nicolas Dumazet <nicdumz.commits at gmail.com>  F
   |
   | @  1:9520eea781bc draft Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
 
 add extra data to test their exchange during push
 
   $ hg -R main bookmark --rev eea13746799a book_eea1
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
   $ hg -R main debugobsolete -d '0 0' 3333333333333333333333333333333333333333 `getmainid eea13746799a`
-  pre-close-tip:02de42196ebe draft 
-  postclose-tip:02de42196ebe draft 
+  pre-close-tip:02de42196ebe draft
+  postclose-tip:02de42196ebe draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
   $ hg -R main bookmark --rev 02de42196ebe book_02de
   pre-close-tip:02de42196ebe draft book_02de
@@ -229,24 +229,24 @@
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_NEW_OBSMARKERS=1 HG_TXNID=TXN:$ID$ HG_TXNNAME=debugobsolete
 
   $ hg -R other bookmark --rev cd010b8cd998 book_eea1
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
   $ hg -R other bookmark --rev cd010b8cd998 book_02de
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
   $ hg -R other bookmark --rev cd010b8cd998 book_42cc
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
   $ hg -R other bookmark --rev cd010b8cd998 book_5fdd
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
   $ hg -R other bookmark --rev cd010b8cd998 book_32af
-  pre-close-tip:24b6387c8c8c public 
-  postclose-tip:24b6387c8c8c public 
+  pre-close-tip:24b6387c8c8c public
+  postclose-tip:24b6387c8c8c public
   txnclose hook: HG_BOOKMARK_MOVED=1 HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=bookmark
 
   $ hg -R main phase --public eea13746799a
@@ -282,7 +282,7 @@
   @ |  1:9520eea781bc public Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com> book_02de book_32af book_42cc book_5fdd A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -374,7 +374,7 @@
   | @  1:9520eea781bc public Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com> book_32af A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -431,7 +431,7 @@
   | @  1:9520eea781bc public Nicolas Dumazet <nicdumz.commits at gmail.com>  E
   |/
   o  0:cd010b8cd998 public Nicolas Dumazet <nicdumz.commits at gmail.com>  A
-  
+
   $ hg -R other debugobsolete
   1111111111111111111111111111111111111111 9520eea781bcca16c1e15acc0ba14335a0e8e5ba 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
   2222222222222222222222222222222222222222 24b6387c8c8cae37178880f3fa95ded3cb1cf785 0 (Thu Jan 01 00:00:00 1970 +0000) {'user': 'test'}
@@ -459,24 +459,24 @@
 
   $ cat > failpush.py << EOF
   > """A small extension that makes push fails when using bundle2
-  > 
+  >
   > used to test error handling in bundle2
   > """
-  > 
+  >
   > from mercurial import error
   > from mercurial import bundle2
   > from mercurial import exchange
   > from mercurial import extensions
   > from mercurial import registrar
   > cmdtable = {}
   > command = registrar.command(cmdtable)
-  > 
+  >
   > configtable = {}
   > configitem = registrar.configitem(configtable)
   > configitem(b'failpush', b'reason',
   >     default=None,
   > )
-  > 
+  >
   > def _pushbundle2failpart(pushop, bundler):
   >     reason = pushop.ui.config(b'failpush', b'reason')
   >     part = None
@@ -487,25 +487,25 @@
   >     if reason == b'race':
   >         # 20 Bytes of crap
   >         bundler.newpart(b'check:heads', data=b'01234567890123456789')
-  > 
+  >
   > @bundle2.parthandler(b"test:abort")
   > def handleabort(op, part):
   >     raise error.Abort(b'Abandon ship!', hint=b"don't panic")
-  > 
+  >
   > def uisetup(ui):
   >     exchange.b2partsgenmapping[b'failpart'] = _pushbundle2failpart
   >     exchange.b2partsgenorder.insert(0, b'failpart')
-  > 
+  >
   > EOF
 
   $ cd main
   $ hg up tip
   3 files updated, 0 files merged, 1 files removed, 0 files unresolved
   $ echo 'I' > I
   $ hg add I
   $ hg ci -m 'I'
-  pre-close-tip:e7ec4e813ba6 draft 
-  postclose-tip:e7ec4e813ba6 draft 
+  pre-close-tip:e7ec4e813ba6 draft
+  postclose-tip:e7ec4e813ba6 draft
   txnclose hook: HG_HOOKNAME=txnclose.env HG_HOOKTYPE=txnclose HG_TXNID=TXN:$ID$ HG_TXNNAME=commit
   $ hg id
   e7ec4e813ba6 tip
@@ -587,21 +587,21 @@
   pushing to other
   searching for changes
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
   [255]
 
   $ hg -R main push ssh://user@dummy/other -r e7ec4e813ba6
   pushing to ssh://user@dummy/other
   searching for changes
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
   [255]
 
   $ hg -R main push http://localhost:$HGPORT2/ -r e7ec4e813ba6
   pushing to http://localhost:$HGPORT2/
   searching for changes
   abort: push failed:
-  'repository changed while pushing - please try again'
+  'remote repository changed while pushing - please try again'
   [255]
 
 Doing the actual push: hook abort
@@ -625,7 +625,7 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files
-  remote: pre-close-tip:e7ec4e813ba6 draft 
+  remote: pre-close-tip:e7ec4e813ba6 draft
   remote: You shall not pass!
   remote: transaction abort!
   remote: Cleaning up the mess...
@@ -640,7 +640,7 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files
-  remote: pre-close-tip:e7ec4e813ba6 draft 
+  remote: pre-close-tip:e7ec4e813ba6 draft
   remote: You shall not pass!
   remote: transaction abort!
   remote: Cleaning up the mess...
@@ -656,7 +656,7 @@
   remote: adding manifests
   remote: adding file changes
   remote: added 1 changesets with 1 changes to 1 files
-  remote: pre-close-tip:e7ec4e813ba6 draft 
+  remote: pre-close-tip:e7ec4e813ba6 draft
   remote: You shall not pass!
   remote: transaction abort!
   remote: Cleaning up the mess...
diff --git a/mercurial/bundle2.py b/mercurial/bundle2.py
--- a/mercurial/bundle2.py
+++ b/mercurial/bundle2.py
@@ -1897,11 +1897,11 @@
     """
     bookdata = bookmarks.binarydecode(inpart)
 
-    msgstandard = ('repository changed while pushing - please try again '
+    msgstandard = ('remote repository changed while pushing - please try again '
                    '(bookmark "%s" move from %s to %s)')
-    msgmissing = ('repository changed while pushing - please try again '
+    msgmissing = ('remote repository changed while pushing - please try again '
                   '(bookmark "%s" is missing, expected %s)')
-    msgexist = ('repository changed while pushing - please try again '
+    msgexist = ('remote repository changed while pushing - please try again '
                 '(bookmark "%s" set on %s, expected missing)')
     for book, node in bookdata:
         currentnode = op.repo._bookmarks.get(book)
@@ -1931,7 +1931,7 @@
     if op.ui.configbool('experimental', 'bundle2lazylocking'):
         op.gettransaction()
     if sorted(heads) != sorted(op.repo.heads()):
-        raise error.PushRaced('repository changed while pushing - '
+        raise error.PushRaced('remote repository changed while pushing - '
                               'please try again')
 
 @parthandler('check:updated-heads')
@@ -1960,7 +1960,7 @@
 
     for h in heads:
         if h not in currentheads:
-            raise error.PushRaced('repository changed while pushing - '
+            raise error.PushRaced('remote repository changed while pushing - '
                                   'please try again')
 
 @parthandler('check:phases')
@@ -1973,7 +1973,7 @@
     unfi = op.repo.unfiltered()
     cl = unfi.changelog
     phasecache = unfi._phasecache
-    msg = ('repository changed while pushing - please try again '
+    msg = ('remote repository changed while pushing - please try again '
            '(%s is %s expected %s)')
     for expectedphase, nodes in enumerate(phasetonodes):
         for n in nodes:



To: taapas1128, #hg-reviewers
Cc: mercurial-devel


More information about the Mercurial-devel mailing list