Show More
@@ -181,11 +181,9 b' class sshserver(object):' | |||||
181 | self.respond('') |
|
181 | self.respond('') | |
182 |
|
182 | |||
183 | # write bundle data to temporary file because it can be big |
|
183 | # write bundle data to temporary file because it can be big | |
184 | tempname = fp = None |
|
184 | fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') | |
|
185 | fp = os.fdopen(fd, 'wb+') | |||
185 | try: |
|
186 | try: | |
186 | fd, tempname = tempfile.mkstemp(prefix='hg-unbundle-') |
|
|||
187 | fp = os.fdopen(fd, 'wb+') |
|
|||
188 |
|
||||
189 | count = int(self.fin.readline()) |
|
187 | count = int(self.fin.readline()) | |
190 | while count: |
|
188 | while count: | |
191 | fp.write(self.fin.read(count)) |
|
189 | fp.write(self.fin.read(count)) | |
@@ -212,10 +210,8 b' class sshserver(object):' | |||||
212 | self.lock.release() |
|
210 | self.lock.release() | |
213 | self.lock = None |
|
211 | self.lock = None | |
214 | finally: |
|
212 | finally: | |
215 |
|
|
213 | fp.close() | |
216 | fp.close() |
|
214 | os.unlink(tempname) | |
217 | if tempname is not None: |
|
|||
218 | os.unlink(tempname) |
|
|||
219 |
|
215 | |||
220 | def do_stream_out(self): |
|
216 | def do_stream_out(self): | |
221 | try: |
|
217 | try: |
General Comments 0
You need to be logged in to leave comments.
Login now