Show More
@@ -124,8 +124,7 def unbundle(repo, req): | |||
|
124 | 124 | # response when run outside cgi script |
|
125 | 125 | pass |
|
126 | 126 | req.respond(HTTP_OK, HGTYPE) |
|
127 |
|
|
|
128 | return | |
|
127 | return errorfmt % 'unsynced changes', | |
|
129 | 128 | |
|
130 | 129 | req.respond(HTTP_OK, HGTYPE) |
|
131 | 130 | |
@@ -143,8 +142,7 def unbundle(repo, req): | |||
|
143 | 142 | lock = repo.lock() |
|
144 | 143 | try: |
|
145 | 144 | if not check_heads(): |
|
146 |
|
|
|
147 | return | |
|
145 | return errorfmt % 'unsynced changes', | |
|
148 | 146 | |
|
149 | 147 | fp.seek(0) |
|
150 | 148 | header = fp.read(6) |
@@ -170,11 +168,11 def unbundle(repo, req): | |||
|
170 | 168 | finally: |
|
171 | 169 | val = sys.stdout.getvalue() |
|
172 | 170 | sys.stdout, sys.stderr = oldio |
|
173 |
|
|
|
171 | return '%d\n%s' % (ret, val), | |
|
174 | 172 | finally: |
|
175 | 173 | del lock |
|
176 | 174 | except ValueError, inst: |
|
177 |
|
|
|
175 | return errorfmt % inst, | |
|
178 | 176 | except (OSError, IOError), inst: |
|
179 | 177 | filename = getattr(inst, 'filename', '') |
|
180 | 178 | # Don't send our filesystem layout to the client |
@@ -188,7 +186,7 def unbundle(repo, req): | |||
|
188 | 186 | else: |
|
189 | 187 | code = HTTP_SERVER_ERROR |
|
190 | 188 | req.respond(code) |
|
191 |
|
|
|
189 | return '0\n%s: %s\n' % (error, filename), | |
|
192 | 190 | finally: |
|
193 | 191 | fp.close() |
|
194 | 192 | os.unlink(tempname) |
General Comments 0
You need to be logged in to leave comments.
Login now