changeset 12702:f747c085b789

wireproto: redirect the output earlier
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Mon, 11 Oct 2010 12:44:33 -0500
parents cb9e1d1c34ea
children 40bb5853fc4b
files mercurial/wireproto.py
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/wireproto.py	Mon Oct 11 12:44:11 2010 -0500
+++ b/mercurial/wireproto.py	Mon Oct 11 12:44:33 2010 -0500
@@ -281,6 +281,8 @@
         heads = repo.heads()
         return their_heads == ['force'] or their_heads == heads
 
+    proto.redirect()
+
     # fail early if possible
     if not check_heads():
         return 'unsynced changes'
@@ -289,7 +291,6 @@
     fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-')
     fp = os.fdopen(fd, 'wb+')
     r = 0
-    proto.redirect()
     try:
         proto.getfile(fp)
         lock = repo.lock()