<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.theeggeadventure.com/wikimedia/index.php?action=history&amp;feed=atom&amp;title=Ruby_Patch_to_Zip</id>
	<title>Ruby Patch to Zip - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.theeggeadventure.com/wikimedia/index.php?action=history&amp;feed=atom&amp;title=Ruby_Patch_to_Zip"/>
	<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Ruby_Patch_to_Zip&amp;action=history"/>
	<updated>2026-05-12T21:10:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.46.0-beta</generator>
	<entry>
		<id>https://www.theeggeadventure.com/wikimedia/index.php?title=Ruby_Patch_to_Zip&amp;diff=1994&amp;oldid=prev</id>
		<title>Egge at 00:40, 31 July 2008</title>
		<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Ruby_Patch_to_Zip&amp;diff=1994&amp;oldid=prev"/>
		<updated>2008-07-31T00:40:48Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw-interface=&quot;&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 00:40, 31 July 2008&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l50&quot;&gt;Line 50:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 50:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;./patchToFiles.rb patches/mypatch.patch | xargs zip mypatch.zip&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;./patchToFiles.rb patches/mypatch.patch | xargs zip mypatch.zip&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/geshi&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Ruby|Patch to Zip]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key egge_wikimedia-mw_:diff:1.41:old-1676:rev-1994:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Egge</name></author>
	</entry>
	<entry>
		<id>https://www.theeggeadventure.com/wikimedia/index.php?title=Ruby_Patch_to_Zip&amp;diff=1676&amp;oldid=prev</id>
		<title>Brianegge: New page: I needed to take a patch file, which contained patches from more than one Eclipse project, and create a zip file with each file contained within.    The Eclipse patch file basically looks ...</title>
		<link rel="alternate" type="text/html" href="https://www.theeggeadventure.com/wikimedia/index.php?title=Ruby_Patch_to_Zip&amp;diff=1676&amp;oldid=prev"/>
		<updated>2007-09-05T02:56:06Z</updated>

		<summary type="html">&lt;p&gt;New page: I needed to take a patch file, which contained patches from more than one Eclipse project, and create a zip file with each file contained within.    The Eclipse patch file basically looks ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;I needed to take a patch file, which contained patches from more than one Eclipse project, and create a zip file with each file contained within.  &lt;br /&gt;
&lt;br /&gt;
The Eclipse patch file basically looks like:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;patch&amp;quot;&amp;gt;&lt;br /&gt;
### Eclipse Workspace Patch 1.0&lt;br /&gt;
#P My Little Project&lt;br /&gt;
Index: src/com/MyClass.java&lt;br /&gt;
===================================================================&lt;br /&gt;
RCS file: /usr/dev/cvs/cvsroot/My Little Project/src/com/MyClass.java,v&lt;br /&gt;
retrieving revision 1.11.2.2.8.3&lt;br /&gt;
diff -u -r1.11.2.2.8.3 MyClass.java&lt;br /&gt;
--- src/com/MyClass.java 24 May 2007 01:20:56 -0000      1.11.2.2.8.3&lt;br /&gt;
+++ src/com/MyClass.java 5 Sep 2007 01:00:23 -0000&lt;br /&gt;
@@ -338,8 +338,6 @@&lt;br /&gt;
 &lt;br /&gt;
 private void setupCustomers( StringBuffer errorBuf_ )&lt;br /&gt;
 {&lt;br /&gt;
-    // a comment I removed&lt;br /&gt;
-&lt;br /&gt;
     System.out.println(&amp;quot;Hello customer&amp;quot;);&lt;br /&gt;
 &lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You have a project definition, followed by files in that project.  You can have multiple project definitions.  I created a Ruby script to parse the file and keep track of the project name.  The script then outputs the qualified path to each file it encounters.  Sure, I could have done this with awk, but Ruby is more enjoyable and readable.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;ruby&amp;quot;&amp;gt;&lt;br /&gt;
#!/bin/env ruby&lt;br /&gt;
&lt;br /&gt;
ARGV.each do |arg|&lt;br /&gt;
  if !File.exists?(arg) then&lt;br /&gt;
    raise(RuntimeError,&amp;quot;#{arg} does not exist!&amp;quot;)&lt;br /&gt;
  end&lt;br /&gt;
  File.open(arg, &amp;#039;r&amp;#039;) do |infile|&lt;br /&gt;
    while(line = infile.gets)&lt;br /&gt;
      if line =~ /^#P ([^\r]*)/ then # ignore any new line characters&lt;br /&gt;
	      project = $1&lt;br /&gt;
      end&lt;br /&gt;
      if line =~ /^Index: ([^\r]*)/ then&lt;br /&gt;
	      puts &amp;#039;&amp;quot;&amp;#039; + project + &amp;#039;/&amp;#039; + $1 + &amp;#039;&amp;quot;&amp;#039;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Lastly, to zip up these files, I used bash/Cygwin.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;geshi lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
./patchToFiles.rb patches/mypatch.patch | xargs zip mypatch.zip&lt;br /&gt;
&amp;lt;/geshi&amp;gt;&lt;/div&gt;</summary>
		<author><name>Brianegge</name></author>
	</entry>
</feed>