push: add "remote" to 'repository changed while pushing' messages (issue5971)
authorTaapas Agrawal <taapas2897@gmail.com>
Thu, 11 Oct 2018 03:38:23 +0530
changeset 40147 58ebf5083843
parent 40146 adfe4bb53a47
child 40148 74558635dad5
push: add "remote" to 'repository changed while pushing' messages (issue5971) Differential Revision: https://phab.mercurial-scm.org/D4933
mercurial/bundle2.py
tests/test-bundle2-exchange.t
tests/test-bundle2-format.t
tests/test-push-race.t
--- a/mercurial/bundle2.py	Thu Oct 11 07:27:24 2018 -0400
+++ b/mercurial/bundle2.py	Thu Oct 11 03:38:23 2018 +0530
@@ -1900,11 +1900,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)
@@ -1934,7 +1934,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')
@@ -1963,7 +1963,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')
@@ -1976,7 +1976,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:
--- a/tests/test-bundle2-exchange.t	Thu Oct 11 07:27:24 2018 -0400
+++ b/tests/test-bundle2-exchange.t	Thu Oct 11 03:38:23 2018 +0530
@@ -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
--- a/tests/test-bundle2-format.t	Thu Oct 11 07:27:24 2018 -0400
+++ b/tests/test-bundle2-format.t	Thu Oct 11 03:38:23 2018 +0530
@@ -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
--- a/tests/test-push-race.t	Thu Oct 11 07:27:24 2018 -0400
+++ b/tests/test-push-race.t	Thu Oct 11 03:38:23 2018 +0530
@@ -214,7 +214,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  98217d5a1659 C-A (default)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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)
@@ -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
@@ -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'}