From: Johan Herland Date: Fri, 30 Oct 2009 08:33:35 GMT Subject: Re: [PATCH 12/19] 1/2: Add Python support library for CVS remote helper Message-ID: <200910300933.35567.johan@herland.net> In-Reply-To: <1256839287-19016-13-git-send-email-srabbelier@gmail.com> On Thursday 29 October 2009, Sverre Rabbelier wrote: > From: Johan Herland > > This patch introduces parts of a Python package called "git_remote_cvs" > containing the building blocks of the CVS remote helper. > The CVS remote helper itself is NOT part of this patch. > > This patch has been improved by the following contributions: > - David Aguilar: Lots of Python coding style fixes > > Cc: David Aguilar > Signed-off-by: Johan Herland > Signed-off-by: Sverre Rabbelier > --- > > This has my patch to util.py squashed in. Why? Or: why that one, and not the others? Also, you might want to mention your contribution in the commit message itself. > diff --git a/git_remote_cvs/util.py b/git_remote_cvs/util.py > new file mode 100644 > index 0000000..d3ca487 > --- /dev/null > +++ b/git_remote_cvs/util.py > @@ -0,0 +1,194 @@ [snip] > + > +def notify(msg, *args): > + """Print a message to stderr.""" > + print >> sys.stderr, msg % args > + > +def debug (msg, *args): > + """Print a debug message to stderr when DEBUG is enabled.""" > + if DEBUG: > + print >> sys.stderr, msg % args > + > +def error (msg, *args): > + """Print an error message to stderr.""" > + print >> sys.stderr, "ERROR:", msg % args > + > +def warn(msg, *args): > + """Print a warning message to stderr.""" > + print >> sys.stderr, "warning:", msg % args > + > +def die (msg, *args): > + """Print as error message to stderr and exit the program.""" > + error(msg, *args) > + sys.exit(1) > + > + It seems the two functions you add (notify() and warn()) have a different indentation than the existing code (which uses 4 spaces). Please fix. (When I first introduced these Python patches, there was a discussion on the differences in indentation/style between the Git C code, and Python code, and it was decided to follow the Python conventions, to make the code more inviting to the Python community.) ...Johan -- Johan Herland, www.herland.net