protocol: use return shortcut instead of respond function
authorDirkjan Ochtman <dirkjan@ochtman.nl>
Fri, 16 Jul 2010 19:02:30 +0200
changeset 11619 48667abddd60
parent 11618 83070a9cd526
child 11620 86b49e0083a7
protocol: use return shortcut instead of respond function
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Jul 16 19:01:34 2010 +0200
+++ b/mercurial/wireproto.py	Fri Jul 16 19:02:30 2010 +0200
@@ -229,8 +229,7 @@
 
     # fail early if possible
     if not check_heads():
-        repo.respond(_('unsynced changes'))
-        return
+        return _('unsynced changes')
 
     # write bundle data to temporary file because it can be big
     fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
@@ -244,8 +243,7 @@
             if not check_heads():
                 # someone else committed/pushed/unbundled while we
                 # were transferring data
-                proto.respond(_('unsynced changes'))
-                return
+                return _('unsynced changes')
 
             # push can proceed
             fp.seek(0)