diff mercurial/streamclone.py @ 10377:04e1e6743809

streamclone: allow uncompressed clones by default
author Matt Mackall <mpm@selenic.com>
date Sun, 07 Feb 2010 15:31:53 +0100
parents 25e572394f5c
children 1a8df80dfdde
line wrap: on
line diff
--- a/mercurial/streamclone.py	Sun Feb 07 15:08:26 2010 +0100
+++ b/mercurial/streamclone.py	Sun Feb 07 15:31:53 2010 +0100
@@ -33,11 +33,14 @@
 #
 #   server writes out raw file data.
 
-def stream_out(repo, untrusted=False):
+def allowed(ui):
+    return ui.configbool('server', 'uncompressed', untrusted=True)
+
+def stream_out(repo):
     '''stream out all metadata files in repository.
     writes to file-like object, must support write() and optional flush().'''
 
-    if not repo.ui.configbool('server', 'uncompressed', untrusted=untrusted):
+    if not allowed(repo.ui):
         raise StreamException(1)
 
     entries = []