[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] Allow custom default when mapping (hook script mailer.py)

From: Karl Fogel <kfogel_at_red-bean.com>
Date: Mon, 02 Jun 2008 21:46:49 -0400

Olav Vitters <olav_at_bkor.dhs.org> writes:
> I'd really appreciate thing being committed, or even just looked at. Out
> of the 5 patches I've mailed, only 1 patch seems to have gotten a
> response. Two haven't even arrived (although I was subscribed). Attached
> patch for instance did not get a response.

Sorry about that. We moderate pretty carefully; I don't know why your
posts wouldn't get through...

> I'd really like to enhance mailer.py (fix TODOs), but please.. review
> these patches.

Did your original postings include log messages, as described in
http://subversion.tigris.org/hacking.html#patches ? Having a log
message dramatically increases the chances of a patch being reviewed.

The version you included in this most recent post does not seem to have
a log message. I tweaked the patch (so the code would not exceed the 80
column limit), and wrote a log message. However, I am not sure the
change is correct: for one thing, the string "_default_" does not appeal
in the example conf file, although "[default]" does. But I'm not very
familiar with mailer.py, so perhaps you can explain this.

In the meantime, below is a suggested log message and new patch, please


* tools/hook-scripts/mailer/mailer.py
  (Config._prep_maps): Have the mapping lambda look for the default
    value if nothing more specific is available.

Patch by: Olav Vitters <olav_at_bkor.dhs.org>
(Formatting and comment wording tweaked by me.)

Index: tools/hook-scripts/mailer/mailer.py
--- tools/hook-scripts/mailer/mailer.py (revision 31497)
+++ tools/hook-scripts/mailer/mailer.py (working copy)
@@ -1219,12 +1219,13 @@
           raise UnknownMappingSection(sectname)
         # construct a lambda to look up the given value as an option name,
         # and return the option's value. if the option is not present,
- # then just return the value unchanged.
+ # then return the _default_ option (or if that fails, return
+ # the value unchanged).
         setattr(self.maps, optname,
                 lambda value,
- sect=getattr(self, sectname): getattr(sect,
- From dev-return-107177-daniel=haxx.se_at_subversion.tigris.org Tue Jun 3 03:47:54 2008
Return-Path: <dev-return-107177-daniel=haxx.se_at_subversion.tigris.org>
Received: from giant.haxx.se (root_at_giant.haxx.se [])
        by kluster1.contactor.se (8.13.8/8.13.8/Debian-3) with ESMTP id m531lWdR004987
        for <daniel.stenberg_at_contactor.se>; Tue, 3 Jun 2008 03:47:42 +0200
Received: from tigris.org (sc157.sjc.collab.net [])
        by giant.haxx.se (8.14.2/8.14.2/Debian-3) with SMTP id m531lYhJ021134
        for <daniel_at_haxx.se>; Tue, 3 Jun 2008 03:47:34 +0200
Received: (qmail 26866 invoked by uid 5000); 3 Jun 2008 01:47:26 -0000
Mailing-List: contact dev-help_at_subversion.tigris.org; run by ezmlm
Precedence: bulk
list-help: <mailto:dev-help_at_subversion.tigris.org>
list-unsubscribe: <mailto:dev-unsubscribe_at_subversion.tigris.org>
list-post: <mailto:dev_at_subversion.tigris.org>
Delivered-To: mailing list dev_at_subversion.tigris.org
Received: (qmail 26856 invoked from network); 3 Jun 2008 01:47:26 -0000
X-IronPort-Anti-Spam-Filtered: true
X-IronPort-Anti-Spam-Result: AokEAOs/REhCksE9VGdsb2JhbACReQEWBQYInQ0D
X-IronPort-AV: E=Sophos;i="4.27,580,1204531200";
From: Karl Fogel <kfogel_at_red-bean.com>
To: dev_at_subversion.tigris.org
References: <483EC94C.4020705_at_btopenworld.com>
Reply-To: Karl Fogel <kfogel_at_red-bean.com>
Mail-followup-to: dev_at_subversion.tigris.org
Date: Mon, 02 Jun 2008 21:47:18 -0400
In-Reply-To: <483ED5A8.5010907_at_btopenworld.com> (Julian Foad's message of
        "Thu, 29 May 2008 17:11:20 +0100")
Message-ID: <87d4mznvbt.fsf_at_red-bean.com>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
         Re: [PATCH] Fix a depth bug in deprecated APIs svn_wc_resolved_conflict*()

Julian Foad <julianfoad_at_btopenworld.com> writes:
> Committed revision 31514.
> Being deprecated APIs, they're not covered by any of our tests, so at
> least one review would be appreciated.

FWIW, I reviewed the change (looked good to me, nice catch).

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

- value))
+ sect=getattr(self, sectname):
+ getattr(sect, value.lower(),
+ getattr(sect, '_default_', value)))
         # mark for removal when all optnames are done
         if sectname not in mapsections:

To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-03 03:47:51 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.