Patchwork [7,of,9,remotefilelog-ext,getfile-http] fileserverclient: refuse to operate on a non-sshpeer

mail settings
Submitter Augie Fackler
Date July 1, 2015, 8:05 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/9858/
State Not Applicable
Headers show


Augie Fackler - July 1, 2015, 8:05 p.m.
# HG changeset patch
# User Augie Fackler <>
# Date 1435609544 14400
#      Mon Jun 29 16:25:44 2015 -0400
# Node ID d95d09694be01c8423372350ac9bffa876383e0e
# Parent  5e58703e43ff3ce67f212de4c4cbc4231b0cf526
fileserverclient: refuse to operate on a non-sshpeer

The way the protocol is defined for getfiles interleaves reading
filenames and sending file contents, which works fine over ssh but is
incompatible with http.

This change is probably not neccessary now that remotefilelog
correctly checks for its own capability first, but it helped me debug
so I left it in for completeness.


diff --git a/remotefilelog/ b/remotefilelog/
--- a/remotefilelog/
+++ b/remotefilelog/
@@ -177,6 +177,8 @@  class fileserverclient(object):
                     if not remote.capable("remotefilelog"):
                         raise util.Abort("configured remotefilelog server"
                                          " does not support remotefilelog")
+                    if not isinstance(remote, sshpeer.sshpeer):
+                        raise util.Abort('remotefilelog requires ssh servers')
                     self.ui.verbose = verbose