20 May 2004 async   » (Journeyer)

kaeru :

hi, i noticed your article on creating and applying patches. it looks helpful. one issue though: the output you show isn't a unified diff.

the output i get for your example is:

--- db.py       2004-05-20 05:46:43.000000000 -0400
+++ db-mod.py   2004-05-20 05:46:53.000000000 -0400
@@ -1,13 +1,13 @@
-        from pyPgSQL import PgSQL
+       from pyPgSQL import PgSQL
         ## note this code is for demo only, don't follow it :)
         def initialize():
                 db = PgSQL.connect (host='localhost',database='test',user='kaeru')
-            except connectionFailed:
-                print "This is a useless exception message and won't help you."-            return db
+                return db
+            except StandardError, detail:
+                print detail
         def getPlayers():
             db = initialize()

the unified meaning that both the added and removed sections are shown in the single listing.

unless i'm missing something.

you might consider expanding a bit on the -p option if you have time, since it gets a good amount of use.

thanks for the article; it's always good to have links to give folks on basic skills sorts of things.

Latest blog entries     Older blog entries

New Advogato Features

New HTML Parser: The long-awaited libxml2 based HTML parser code is live. It needs further work but already handles most markup better than the original parser.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!