comparison mercurial/patch.py @ 24268:cf7d252d8c30

patch.internalpatch: add a default value for prefix Rev 60c279ab7bd3 adding a parameter here. This breaks third-party extensions like crecord and also makes the issue fairly hard to fix on the extension's side if it wants to retain compatibility across Mercurial versions -- in old versions, the positional argument will be passed into the next unknown argument, which is 'files'. The patch also undoes a change to the record extension that is no longer necessary.
author Siddharth Agarwal <sid0@fb.com>
date Tue, 10 Mar 2015 17:34:42 -0700
parents dc655360bccb
children 9a745ced79a9
comparison
equal deleted inserted replaced
24267:365fdbc54f1f 24268:cf7d252d8c30
1755 store.close() 1755 store.close()
1756 if ret < 0: 1756 if ret < 0:
1757 raise PatchError(_('patch failed to apply')) 1757 raise PatchError(_('patch failed to apply'))
1758 return ret > 0 1758 return ret > 0
1759 1759
1760 def internalpatch(ui, repo, patchobj, strip, prefix, files=None, 1760 def internalpatch(ui, repo, patchobj, strip, prefix='', files=None,
1761 eolmode='strict', similarity=0): 1761 eolmode='strict', similarity=0):
1762 """use builtin patch to apply <patchobj> to the working directory. 1762 """use builtin patch to apply <patchobj> to the working directory.
1763 returns whether patch was applied with fuzz factor.""" 1763 returns whether patch was applied with fuzz factor."""
1764 backend = workingbackend(ui, repo, similarity) 1764 backend = workingbackend(ui, repo, similarity)
1765 return patchbackend(ui, backend, patchobj, strip, prefix, files, eolmode) 1765 return patchbackend(ui, backend, patchobj, strip, prefix, files, eolmode)