473,408 Members | 2,839 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

Diff file trouble applying?

I've got a diff file that I think is a patch for a bunch of file in a
directory. How do I apply this file?

I thought it was

#patch myfile.diff
But that does nothing. I must be missing something. The diff file
contains diff's for a nuch of files, not just a single file. Do I need a
copy of the original file as was or does the diff file contain everything
it needs to make the patch(s)?

J

Jul 17 '05 #1
2 2501
On Sat, 11 Oct 2003 20:13:27 GMT, Charley <jo*****@jhilb.com> wrote:
I've got a diff file that I think is a patch for a bunch of file in a
directory. How do I apply this file?

I thought it was

#patch myfile.diff

But that does nothing. I must be missing something. The diff file
contains diff's for a nuch of files, not just a single file. Do I need a
copy of the original file as was or does the diff file contain everything
it needs to make the patch(s)?


Usually it's:

patch -p0 < myfile.diff

Or possibly -p1 depending on what directory you're in and whether the patch
included a top-level directory or not.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)
Jul 17 '05 #2
Andy Hassall <an**@andyh.co.uk> wrote in
news:eb********************************@4ax.com:

OK, thanks, I'll give that a try.

On Sat, 11 Oct 2003 20:13:27 GMT, Charley <jo*****@jhilb.com> wrote:
I've got a diff file that I think is a patch for a bunch of file in a
directory. How do I apply this file?

I thought it was

#patch myfile.diff

But that does nothing. I must be missing something. The diff file
contains diff's for a nuch of files, not just a single file. Do I
need a copy of the original file as was or does the diff file contain
everything it needs to make the patch(s)?


Usually it's:

patch -p0 < myfile.diff

Or possibly -p1 depending on what directory you're in and whether the
patch
included a top-level directory or not.

--
Andy Hassall (an**@andyh.co.uk) icq(5747695) (http://www.andyh.co.uk)
Space: disk usage analysis tool (http://www.andyhsoftware.co.uk/space)


Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Nick Allen | last post by:
After using ndiff from difflib, the function restore would return the sequence that generated the delta. Unfortunately, restore does not do the same for unified_diff. I do not see any similar...
19
by: Svennglenn | last post by:
I'm working on a program that is supposed to save different information to text files. Because the program is in swedish i have to use unicode text for ÅÄÖ letters. When I run the following...
4
by: Eric Boutin | last post by:
Hi all ! I'm currently writing a function that evaluate if there is a diffence beetween 2 streams (istringstream and ifstream). The problem is, it doesn't work. It *always* finds a difference...
9
by: Ching-Lung | last post by:
Hi all, I try to create a tool to check the delta (diff) of 2 binaries and create the delta binary. I use binary formatter (serialization) to create the delta binary. It works fine but the...
6
by: Igor Shevchenko | last post by:
Hi! Suppose I have "pg_dump -s" of two pg installs, one is "dev", another is "production". Their schemas don't differ too much, and I want to get a "diff -u"-like schema diff so I can quickly...
4
by: Andreas Kasparek | last post by:
Hola! I'm preparing my master thesis about a XML Merge Tool implementation and was wondering if there is any open standard for XML diff regarding topics like: - is a diff result computed on...
7
by: Steve Hershoff | last post by:
Thanks to this newsgroup I've been pointed to Microsoft's XML Diff & Patch utilities. I've been reading about how I can use the tools to generate a diffgram between two XML documents, and how the...
3
by: AirYT | last post by:
Hello, I'm looking for an implementation for diffing 2 (text) files and spitting out the output using php only. i would like to extend this to use ftp to diff two files on two ftp servers, or...
6
by: Aaron Gray | last post by:
Hi, I am working on an HTML WYSISYG Wiki and need to display a diff page like WikiPedia does if two people edit a file at the same time to give the second user the diff. Basically with additions...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.