mercurial/patch.py
branchstable
changeset 10203 6e26e3c2083f
parent 10135 9a4034b630c4
child 10204 3ca8f2ae5fee
child 10263 25e572394f5c
equal deleted inserted replaced
10201:d2847c4523e8 10203:6e26e3c2083f
  1124     try:
  1124     try:
  1125         ret = applydiff(ui, fp, files, strip=strip, eol=eol)
  1125         ret = applydiff(ui, fp, files, strip=strip, eol=eol)
  1126     finally:
  1126     finally:
  1127         if cwd:
  1127         if cwd:
  1128             os.chdir(curdir)
  1128             os.chdir(curdir)
       
  1129         if fp != patchobj:
       
  1130             fp.close()
  1129     if ret < 0:
  1131     if ret < 0:
  1130         raise PatchError
  1132         raise PatchError
  1131     return ret > 0
  1133     return ret > 0
  1132 
  1134 
  1133 def patch(patchname, ui, strip=1, cwd=None, files=None, eolmode='strict'):
  1135 def patch(patchname, ui, strip=1, cwd=None, files=None, eolmode='strict'):