Mercurial > hg-stable
changeset 24254:60c279ab7bd3
patch.internalpatch: accept a prefix parameter
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Fri, 06 Mar 2015 22:43:47 -0800 |
parents | 26fa5ff9e660 |
children | 4bfe9f2d9761 |
files | hgext/record.py mercurial/patch.py |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/hgext/record.py Fri Mar 06 22:27:41 2015 -0800 +++ b/hgext/record.py Fri Mar 06 22:43:47 2015 -0800 @@ -604,7 +604,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
--- a/mercurial/patch.py Fri Mar 06 22:27:41 2015 -0800 +++ b/mercurial/patch.py Fri Mar 06 22:43:47 2015 -0800 @@ -1521,12 +1521,12 @@ raise PatchError(_('patch failed to apply')) return ret > 0 -def internalpatch(ui, repo, patchobj, strip, files=None, eolmode='strict', - similarity=0): +def internalpatch(ui, repo, patchobj, strip, prefix, files=None, + eolmode='strict', similarity=0): """use builtin patch to apply <patchobj> to the working directory. returns whether patch was applied with fuzz factor.""" backend = workingbackend(ui, repo, similarity) - return patchbackend(ui, backend, patchobj, strip, '', files, eolmode) + return patchbackend(ui, backend, patchobj, strip, prefix, files, eolmode) def patchrepo(ui, repo, ctx, store, patchobj, strip, files=None, eolmode='strict'): @@ -1552,7 +1552,7 @@ if patcher: return _externalpatch(ui, repo, patcher, patchname, strip, files, similarity) - return internalpatch(ui, repo, patchname, strip, files, eolmode, + return internalpatch(ui, repo, patchname, strip, '', files, eolmode, similarity) def changedfiles(ui, repo, patchpath, strip=1):