Return-Path: X-Original-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-bloodhound-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id E7AC9E6D7 for ; Fri, 11 Jan 2013 15:47:15 +0000 (UTC) Received: (qmail 67524 invoked by uid 500); 11 Jan 2013 15:47:15 -0000 Delivered-To: apmail-incubator-bloodhound-dev-archive@incubator.apache.org Received: (qmail 67501 invoked by uid 500); 11 Jan 2013 15:47:15 -0000 Mailing-List: contact bloodhound-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: bloodhound-dev@incubator.apache.org Delivered-To: mailing list bloodhound-dev@incubator.apache.org Received: (qmail 67485 invoked by uid 99); 11 Jan 2013 15:47:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 15:47:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [209.85.215.49] (HELO mail-la0-f49.google.com) (209.85.215.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 11 Jan 2013 15:47:05 +0000 Received: by mail-la0-f49.google.com with SMTP id fk20so1921516lab.36 for ; Fri, 11 Jan 2013 07:46:45 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:message-id:date:from:user-agent:mime-version:to:subject :references:in-reply-to:content-type:content-transfer-encoding :x-gm-message-state; bh=4lnXYxWt0b+4J8cK4miNou8kQHPnk6K8AfRYxsB4TsQ=; b=MEjbZ/5GBAzXCURD+kD/35fW59TaeA2XxFiNOqIJReHG7fVIOWYgSiHg8sNqYGWodc f7tTrCunVx49cxbzG4PcC5yZZuNRhDSl/+GjmOu3/juuPw7fXZ8av5JFJHp6PfOb8KPd RZwr/AeRhdfYr1dnU7NRwwios1mT8hFeq9HJs+46FPVA+mh53v+TW9maIMQuB+OvM+bg +4xNi7fADsZ2sY/v12VoQCoRTsf48jUsAejmsR/vpZlPX6du/NIxbAEH63Zsmbw2+9ZR kiWvbXshN2GcLUBc+ArsRuepaXe5mbxzWnsnk510ON32y9mqkIQb7sW3pDLaEs47Oog3 WmMA== X-Received: by 10.112.17.129 with SMTP id o1mr31226357lbd.54.1357919205233; Fri, 11 Jan 2013 07:46:45 -0800 (PST) Received: from masinca2.zitnik.net (BSN-77-221-105.dsl.siol.net. [193.77.221.105]) by mx.google.com with ESMTPS id v7sm2274382lbj.13.2013.01.11.07.46.43 (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 11 Jan 2013 07:46:44 -0800 (PST) Message-ID: <50F033E2.4050509@digiverse.si> Date: Fri, 11 Jan 2013 16:46:42 +0100 From: Jure Zitnik User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: bloodhound-dev@incubator.apache.org Subject: Re: [Apache Bloodhound] #115: Product-specific settings References: <055.55b84508f6fcc1a8cc545a03456faa21@incubator.apache.org> <070.15b8ebe71bafa7ae651d57d105b756d7@incubator.apache.org> <50D42A23.20005@digiverse.si> <50ED4B83.7050208@digiverse.si> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Gm-Message-State: ALoCoQnBVCttrLq5BXhOtzpv4vFEpQmvunW0zmfp++BcSlGOPXs75w7oROpBV1zFX+a5SYyI4r90 X-Virus-Checked: Checked by ClamAV on apache.org On 1/10/13 4:15 AM, Olemis Lang wrote: >> I commited patches in r1430768. > I see . I'll try to explain something we've being doing since long > time ago (based on Gary's suggestions) and I think is very helpful . > > Commits should be focused considering their intent . The more focused > the better . That's exactly why I developed three patches for > (related) features : 1. product environments , 2. product config , 3. > test code . Therefore each patch should be applied in a separate > changeset (e.g. like in #146 [1]_ ) > > You might say �that's insane� ... but take as example #341 [2]_ which > is a regression after #146 . As I've also followed the same approach > to build the patches I submit , it's possible to identify the exact > point [3]_ where this very same issue was fixed once upon a time (... > so let's all hail Gary ! ) Ok, thanks for the explanation, sounds reasonable, will follow these guidelines in the future ;) >> I started integrating ProductEnvironment with the database proxy (#288), > good . > >> environment factory (#322) > I'll take a look to see what's been done about this ... is there > anything already in svn repos ? > >> and global hooks (#323). >> > :) All the work done in integrating #115 with #288 and work done on #322 and #323 is in the svn repo on bep_0003_multiproduct branch. >> A question re ProductEnvironment class - is there a specific reason for >> that class not being derived directly from trac.env.Environment? > We've been talking about this via #bloodhound @ freenode . Could you > please post a summary ? Short summary would be that even though trac.env.Environment and ProductEnvironment share the same interface they are semantically different. That and because the intent is to keep the product environments transient (lightweight) they're implemented as a separate class (and not derived from trac.env.Environment). Only methods/props that require special handling are implemented/overriden in ProductEnvironment, the rest is forwarded to the global trac.env.Environment. >> I'm >> asking this as I was planning on replacing (monkey patching) >> trac.env.Environment with our implementation of the environment. This >> way we have control over database connection in all environments (global >> and per product). > I've mentioned this before and mentioned that the way to go should be > to install product-specific DB proxies in each instance of > ProductEnvironment class . In order to do that (and in general) > there's no need to extend Environment class at all . ProductEnvs are > wrappers . > >> Making that (our env) a base class for >> ProductEnvironment would make things more consistent. >> > I don't think so . Agree now that some more light has been shed on the ProductEnvironments :) Cheers, Jure