English 中文(简体)
How to specify different --strip (-p) levels for patch?
原标题:
  • 时间:2009-11-09 16:23:31
  •  标签:
  • diff
  • patch

If I have a diff that has paths like these:

--- a/b/foo/bar/baz.pl
+++ c/foo/bar/baz.pl

Is there a way to tell the patch utility that the diff roots are at different levels? i.e. -p2 for one, yet -p1 for the other. Or is there any alternative utility that will patch in such a case?

问题回答

Have you tried it with just the right -p for one or the other? I think patch will try both and apply to whichever file actually exists.





相关问题
XML Diff: How to generate XML diff using XSLT?

I would like to compute the diff between two XML files or nodes using XSL/XSLT. Is there any stylesheet readily available or any simple way of doing it?

diff/merge tool for TortoiseSVN within Visual Studio

We ve recently "upgraded" from Visual SourceSafe to SVN based on recommendations on this site. Our current source control set-up is: TortoiseSVN with VisualSVN. We re very happy with it so far, but I ...

How do I get each comp result?

I would like to check diffs and when files are not same,stop compare files. Compare any files C:/UML/reports/* and C:/UML/Test/*. In this two directory has same file names and also aim is to want to ...

Find differences between 2 HTML files

Is there a way to display differences between two HTML documents? There is a PHP class called daisdiff, but it has no documentation. Can anyone show how to use it, or any alternative?

How to specify different --strip (-p) levels for patch?

If I have a diff that has paths like these: --- a/b/foo/bar/baz.pl +++ c/foo/bar/baz.pl Is there a way to tell the patch utility that the diff roots are at different levels? i.e. -p2 for one, yet -...

热门标签