Re: Review of git multimail

2013-07-04 Thread Matthieu Moy
Jed Brown j...@59a2.org writes: Note that RHEL5 has only python2.4 and will be supported through March, 2017. Since it is not feasible to have code that works in both python3 and any versions prior to python2.6, any chosen dialect will be broken by default on some major distributions that

Re: Review of git multimail

2013-07-03 Thread Michael Haggerty
On 07/03/2013 12:21 AM, Junio C Hamano wrote: Ramkumar Ramachandra artag...@gmail.com writes: def get(self, name, default=''): try: values = self._split(read_git_output( ['config', '--get', '--null', '%s.%s' % (self.section, name)],

Re: Review of git multimail

2013-07-03 Thread Junio C Hamano
Michael Haggerty mhag...@alum.mit.edu writes: I would be happy to add the checking that you described, but I didn't have the impression that it is the usual convention. Does code that wants a single value from the config usually verify that there is one-and-only-one value, or does it

Re: Review of git multimail

2013-07-03 Thread John Keeping
On Wed, Jul 03, 2013 at 10:02:34AM +0200, Michael Haggerty wrote: On 07/03/2013 12:21 AM, Junio C Hamano wrote: Ramkumar Ramachandra artag...@gmail.com writes: def get(self, name, default=''): try: values = self._split(read_git_output(

Re: Review of git multimail

2013-07-03 Thread John Keeping
On Wed, Jul 03, 2013 at 09:29:02AM +0100, John Keeping wrote: Doesn't git config --get return an error if there are multiple values? The answer is apparently no - I wrote the text below from git-config(1) and then checked the behaviour. This seems to be a regression in git-config (bisect

Re: Review of git multimail

2013-07-03 Thread Ramkumar Ramachandra
Michael Haggerty wrote: On 07/02/2013 09:23 PM, Ramkumar Ramachandra wrote: git_multimail.py wrote: #! /usr/bin/env python2 Do all distributions ship it as python2 now? No, but nor is python always Python version 2.x (I believe that Arch Linux now installs Python 3 as python). This topic

Re: Review of git multimail

2013-07-03 Thread Ramkumar Ramachandra
Ramkumar Ramachandra wrote: New-style class. I wonder why you suddenly switched. ? All of the classes are new-style classes. When you say class Foo:, aren't you declaring an old-style class by default in python2? New-style classes are those that explicitly inherit from object (implicit

Re: Review of git multimail

2013-07-03 Thread Michael Haggerty
On 07/03/2013 12:23 PM, Ramkumar Ramachandra wrote: Michael Haggerty wrote: On 07/02/2013 09:23 PM, Ramkumar Ramachandra wrote: git_multimail.py wrote: #! /usr/bin/env python2 Do all distributions ship it as python2 now? No, but nor is python always Python version 2.x (I believe that Arch

Re: Review of git multimail

2013-07-03 Thread Jed Brown
Ramkumar Ramachandra artag...@gmail.com writes: Yeah, this is good reasoning. And yes, I'm on Arch: python points to python3, and python2 points to python2. I'm also on Arch and it has been this way since October 2010 [1]. Ubuntu plans to remove python2 from the desktop CD images in 14.04

Re: Review of git multimail

2013-07-02 Thread John Keeping
On Wed, Jul 03, 2013 at 12:53:39AM +0530, Ramkumar Ramachandra wrote: class CommandError(Exception): def __init__(self, cmd, retcode): self.cmd = cmd self.retcode = retcode Exception.__init__( self, 'Command %s failed with retcode

Re: Review of git multimail

2013-07-02 Thread Ramkumar Ramachandra
John Keeping wrote: I have to say that I don't think this is a particularly useful review, you seem to have skipped huge portions of the code and spent a lot of time making us read your thought process rather than providing constructive feedback. What feedback there is mostly seems to be

Re: Review of git multimail

2013-07-02 Thread Junio C Hamano
Ramkumar Ramachandra artag...@gmail.com writes: def get(self, name, default=''): try: values = self._split(read_git_output( ['config', '--get', '--null', '%s.%s' % (self.section, name)], env=self.env, keepends=True,