##// END OF EJS Templates
patch.internalpatch: accept a prefix parameter
Siddharth Agarwal -
r24254:60c279ab default
parent child Browse files
Show More
@@ -604,7 +604,7 b' def dorecord(ui, repo, commitfunc, cmdsu'
604 604 try:
605 605 ui.debug('applying patch\n')
606 606 ui.debug(fp.getvalue())
607 patch.internalpatch(ui, repo, fp, 1, eolmode=None)
607 patch.internalpatch(ui, repo, fp, 1, '', eolmode=None)
608 608 except patch.PatchError, err:
609 609 raise util.Abort(str(err))
610 610 del fp
@@ -1521,12 +1521,12 b' def patchbackend(ui, backend, patchobj, '
1521 1521 raise PatchError(_('patch failed to apply'))
1522 1522 return ret > 0
1523 1523
1524 def internalpatch(ui, repo, patchobj, strip, files=None, eolmode='strict',
1525 similarity=0):
1524 def internalpatch(ui, repo, patchobj, strip, prefix, files=None,
1525 eolmode='strict', similarity=0):
1526 1526 """use builtin patch to apply <patchobj> to the working directory.
1527 1527 returns whether patch was applied with fuzz factor."""
1528 1528 backend = workingbackend(ui, repo, similarity)
1529 return patchbackend(ui, backend, patchobj, strip, '', files, eolmode)
1529 return patchbackend(ui, backend, patchobj, strip, prefix, files, eolmode)
1530 1530
1531 1531 def patchrepo(ui, repo, ctx, store, patchobj, strip, files=None,
1532 1532 eolmode='strict'):
@@ -1552,7 +1552,7 b' def patch(ui, repo, patchname, strip=1, '
1552 1552 if patcher:
1553 1553 return _externalpatch(ui, repo, patcher, patchname, strip,
1554 1554 files, similarity)
1555 return internalpatch(ui, repo, patchname, strip, files, eolmode,
1555 return internalpatch(ui, repo, patchname, strip, '', files, eolmode,
1556 1556 similarity)
1557 1557
1558 1558 def changedfiles(ui, repo, patchpath, strip=1):
General Comments 0
You need to be logged in to leave comments. Login now