##// END OF EJS Templates
sshserver: drop ancient do_{lock,unlock,addchangegroup} methods...
Augie Fackler -
r25692:9f6e0e7e default
parent child Browse files
Show More
@@ -6,7 +6,7 b''
6 # This software may be used and distributed according to the terms of the
6 # This software may be used and distributed according to the terms of the
7 # GNU General Public License version 2 or any later version.
7 # GNU General Public License version 2 or any later version.
8
8
9 import util, hook, wireproto, changegroup
9 import util, hook, wireproto
10 import os, sys
10 import os, sys
11
11
12 class sshserver(wireproto.abstractserverproto):
12 class sshserver(wireproto.abstractserverproto):
@@ -120,33 +120,6 b' class sshserver(wireproto.abstractserver'
120 else: self.sendresponse("")
120 else: self.sendresponse("")
121 return cmd != ''
121 return cmd != ''
122
122
123 def do_lock(self):
124 '''DEPRECATED - allowing remote client to lock repo is not safe'''
125
126 self.lock = self.repo.lock()
127 return ""
128
129 def do_unlock(self):
130 '''DEPRECATED'''
131
132 if self.lock:
133 self.lock.release()
134 self.lock = None
135 return ""
136
137 def do_addchangegroup(self):
138 '''DEPRECATED'''
139
140 if not self.lock:
141 self.sendresponse("not locked")
142 return
143
144 self.sendresponse("")
145 cg = changegroup.cg1unpacker(self.fin, "UN")
146 r = changegroup.addchangegroup(self.repo, cg, 'serve', self._client())
147 self.lock.release()
148 return str(r)
149
150 def _client(self):
123 def _client(self):
151 client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0]
124 client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0]
152 return 'remote:ssh:' + client
125 return 'remote:ssh:' + client
1 NO CONTENT: file was removed
NO CONTENT: file was removed
General Comments 0
You need to be logged in to leave comments. Login now