diff mercurial/wireproto.py @ 18957:6b618aa08b6e

wireproto: clarify cryptic 'remote: unsynced changes' error message on push The message was not very much to the point and did not in any way help an ordinary user. 'repository changed while preparing/uploading bundle - please try again' is more correct, gives the user some understanding of what is going on, and tells how to 'recover' from the situation. The 'bundle' aspect could be seen as an implementation detail that shouldn't be mentioned, but I think it helps giving an exact error message. The message could still leave the user wondering why Mercurial doesn't lock the repo and how unsafe it thus is. Explaining that is however too much detail.
author Mads Kiilerich <madski@unity3d.com>
date Thu, 11 Apr 2013 14:54:18 +0200
parents f3b21beb9802
children aae14b3d0a9c
line wrap: on
line diff
--- a/mercurial/wireproto.py	Mon Feb 11 00:43:12 2013 +0100
+++ b/mercurial/wireproto.py	Thu Apr 11 14:54:18 2013 +0200
@@ -602,7 +602,8 @@
 
     # fail early if possible
     if not check_heads():
-        return pusherr('unsynced changes')
+        return pusherr('repository changed while preparing changes - '
+                       'please try again')
 
     # write bundle data to temporary file because it can be big
     fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
@@ -615,7 +616,8 @@
             if not check_heads():
                 # someone else committed/pushed/unbundled while we
                 # were transferring data
-                return pusherr('unsynced changes')
+                return pusherr('repository changed while uploading changes - '
+                               'please try again')
 
             # push can proceed
             fp.seek(0)