# HG changeset patch # User Benoit Boissinot # Date 1286819073 18000 # Node ID f747c085b789311a5141c9628ca7d16a654f12c1 # Parent cb9e1d1c34ea2f6f0dd48504fe436937182717c2 wireproto: redirect the output earlier diff -r cb9e1d1c34ea -r f747c085b789 mercurial/wireproto.py --- 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()