# HG changeset patch # User Siddharth Agarwal # Date 1426034082 25200 # Node ID cf7d252d8c30bcf6df02d542f32d22e900def61e # Parent 365fdbc54f1f8b8204136e508930f143bbd834c9 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. diff -r 365fdbc54f1f -r cf7d252d8c30 hgext/record.py --- a/hgext/record.py Wed Mar 11 07:19:55 2015 -0700 +++ b/hgext/record.py Tue Mar 10 17:34:42 2015 -0700 @@ -365,7 +365,7 @@ try: ui.debug('applying patch\n') ui.debug(fp.getvalue()) - patch.internalpatch(ui, repo, fp, 1, '', eolmode=None) + patch.internalpatch(ui, repo, fp, 1, eolmode=None) except patch.PatchError, err: raise util.Abort(str(err)) del fp diff -r 365fdbc54f1f -r cf7d252d8c30 mercurial/patch.py --- a/mercurial/patch.py Wed Mar 11 07:19:55 2015 -0700 +++ b/mercurial/patch.py Tue Mar 10 17:34:42 2015 -0700 @@ -1757,7 +1757,7 @@ raise PatchError(_('patch failed to apply')) return ret > 0 -def internalpatch(ui, repo, patchobj, strip, prefix, files=None, +def internalpatch(ui, repo, patchobj, strip, prefix='', files=None, eolmode='strict', similarity=0): """use builtin patch to apply to the working directory. returns whether patch was applied with fuzz factor."""