Mercurial > public > mercurial-scm > hg-stable
comparison mercurial/patch.py @ 10204:3ca8f2ae5fee
Merge with crew-stable
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Sun, 03 Jan 2010 20:36:30 +0100 |
parents | e451e599fbcf 6e26e3c2083f |
children | d6512b3e9ac0 |
comparison
equal
deleted
inserted
replaced
10202:dcaa80294c79 | 10204:3ca8f2ae5fee |
---|---|
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'): |