LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-07-2011, 12:03 PM   #1
bryanvick
LQ Newbie
 
Registered: Oct 2009
Posts: 15

Rep: Reputation: 0
concatenate multiple patches into one file


I'm trying to use diff/patch to create a changelog of a single file. I want all the changes to be listed in one file, in chronological order.

I thought that I could simply append a bunch of diff patches to a single file:

Code:
diff original new >> patch.history
..and then apply all the patches at once.

Code:
patch original patch.history
This doesn't work because each patch assumes that the previous patch has been applied so that the line numbers match up.

Is there a way to tell the patch command to "commit" after each patch in a single file, so that the next patch will see the correct version it needs to patch?

Is there another way to save a bunch of patches into a single file?
 
Old 11-07-2011, 12:36 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 354Reputation: 354Reputation: 354Reputation: 354
Here is a short thread which may give you ideas on what to search for in re tools/apps to merge several patches.
http://unix.stackexchange.com/questi...-merge-patches

The thread referenced above refers to an application named quilt. More on using quilt to merge patches here:
http://www.linuxtopia.org/online_boo...on/apas02.html
 
  


Reply

Tags
diff, patch


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to update critical patches on multiple linux servers patcheezy Linux - Newbie 5 05-13-2009 09:53 PM
How to concatenate output of two commands to a file starmonche Linux - General 3 05-01-2009 11:33 AM
Concatenate Problem - First & Last file are Overlaying donanap Linux - Newbie 5 03-04-2009 03:38 PM
LXer: Sun patches multiple flaws in Java LXer Syndicated Linux News 0 10-05-2007 12:20 PM
Concatenate binary file iftiuk Linux - General 6 05-16-2005 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 02:19 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration