Mercurial > hg
comparison mercurial/sshserver.py @ 11493:cc4e2a7ca23f
Merge with stable
author | Martin Geisler <mg@aragost.com> |
---|---|
date | Fri, 02 Jul 2010 11:30:57 +0200 |
parents | ee1ed6afac21 |
children | c19d7e91cc46 |
comparison
equal
deleted
inserted
replaced
11428:8b452fe4bf50 | 11493:cc4e2a7ca23f |
---|---|
159 if not self.lock: | 159 if not self.lock: |
160 self.respond("not locked") | 160 self.respond("not locked") |
161 return | 161 return |
162 | 162 |
163 self.respond("") | 163 self.respond("") |
164 r = self.repo.addchangegroup(self.fin, 'serve', self.client_url()) | 164 r = self.repo.addchangegroup(self.fin, 'serve', self.client_url(), |
165 lock=self.lock) | |
165 self.respond(str(r)) | 166 self.respond(str(r)) |
166 | 167 |
167 def client_url(self): | 168 def client_url(self): |
168 client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0] | 169 client = os.environ.get('SSH_CLIENT', '').split(' ', 1)[0] |
169 return 'remote:ssh:' + client | 170 return 'remote:ssh:' + client |
203 self.respond('') | 204 self.respond('') |
204 | 205 |
205 # push can proceed | 206 # push can proceed |
206 | 207 |
207 fp.seek(0) | 208 fp.seek(0) |
208 r = self.repo.addchangegroup(fp, 'serve', self.client_url()) | 209 r = self.repo.addchangegroup(fp, 'serve', self.client_url(), |
210 lock=self.lock) | |
209 self.respond(str(r)) | 211 self.respond(str(r)) |
210 finally: | 212 finally: |
211 if not was_locked: | 213 if not was_locked: |
212 self.lock.release() | 214 self.lock.release() |
213 self.lock = None | 215 self.lock = None |