changeset 11619:48667abddd60

protocol: use return shortcut instead of respond function
author Dirkjan Ochtman <dirkjan@ochtman.nl>
date Fri, 16 Jul 2010 19:02:30 +0200
parents 83070a9cd526
children 86b49e0083a7
files mercurial/wireproto.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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)