equal
deleted
inserted
replaced
1164 try: |
1164 try: |
1165 ret = applydiff(ui, fp, files, strip=strip, eolmode=eolmode) |
1165 ret = applydiff(ui, fp, files, strip=strip, eolmode=eolmode) |
1166 finally: |
1166 finally: |
1167 if cwd: |
1167 if cwd: |
1168 os.chdir(curdir) |
1168 os.chdir(curdir) |
|
1169 if fp != patchobj: |
|
1170 fp.close() |
1169 if ret < 0: |
1171 if ret < 0: |
1170 raise PatchError |
1172 raise PatchError |
1171 return ret > 0 |
1173 return ret > 0 |
1172 |
1174 |
1173 def patch(patchname, ui, strip=1, cwd=None, files=None, eolmode='strict'): |
1175 def patch(patchname, ui, strip=1, cwd=None, files=None, eolmode='strict'): |