Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1evn4e-0007eN-7E for pgadmin-hackers@arkaria.postgresql.org; Tue, 13 Mar 2018 16:46:52 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1evn4d-0006Nh-5T for pgadmin-hackers@arkaria.postgresql.org; Tue, 13 Mar 2018 16:46:51 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1evn3P-0005US-5g for pgadmin-hackers@lists.postgresql.org; Tue, 13 Mar 2018 16:45:35 +0000 Received: from mail-wr0-x230.google.com ([2a00:1450:400c:c0c::230]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1evn3L-0005Ji-Bb for pgadmin-hackers@postgresql.org; Tue, 13 Mar 2018 16:45:33 +0000 Received: by mail-wr0-x230.google.com with SMTP id m4so723258wrb.7 for ; Tue, 13 Mar 2018 09:45:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pgadmin-org.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=l66zjkpJdzGfXDQyD3W7Ti65TBeQL1Utzvo7fzLvCLI=; b=Z3In/P4mj65iQet+c3Nw9i+Lfx0sFT4IcC1Bhl0bXXpgPb/xI0nvnny1jd+KonIlnI RwubVv/gvLDhOndqNtSsrbxgXAffXfWRmvRJESRZK5tMUSUAKontIHB1i06bdqu7HG/v LmHlNPSvWekfApw4TFovqVcQOARXJVYoHWabOHOwFruKiSWMhBJ6OpNxOBB+ej/yYMna j5PYcuGztlj4yHLOX6gupVZIArcRa7oxcMLoqxfpjEbU7yAduCb1M0xq3pFIn6fLUdaK l8zmyi9Zp0TPcP3RqZAIUY0ExaOxoBFdIAiZPMGmc2ol3xf95LUm+/aPxCgFn5gbc11o hpbw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=l66zjkpJdzGfXDQyD3W7Ti65TBeQL1Utzvo7fzLvCLI=; b=M5Z6KE0SIGYB4c2l0fTUH60+ZatzXhKsct79h7X83DrkT1fSB8q6eILqgdLgm4cgOK Z0F8tdHURxr8JLXmTSaWMMfDlTxIdR/tHsPLb7pwC2dXr/2iOU8afpqmN8uWv1EWEKX2 MvkCMIlrBtg2jRiVZ1ET9PfHZXiZC6A03VLxPpkzJ0Em/1FC7NdjSQE5zwLlc1cck9Zg 7XadrGixBtPqUNkbE5Rqc4wCRZ6IecG7yx7y9Y67/tA+rpu09KNuYqJ7NXgx5bidsOBv X2eG9u9nGLIKYfgbHIzIVXDiNOqwhdHWmJ6JVh1dcjhZKdLopESTxC6aJiPyhY3PhGMY bxgw== X-Gm-Message-State: AElRT7FlvlgvG6IHMoqutSd+Ybbl+8gHyYW+phPya3DAB13/FP/tuKCy UU9uXW30eUKRcPYgn2G1uqU3iQSvtVCAdVNL5JeZ9g== X-Google-Smtp-Source: AG47ELtQquEr4ylkjPN8sr5+N7DH0WgfRe7++GW0lmopSQAJZ05gs6e+8dmigZ7VzGu2XuKXZnLXkMtj3+zxJqdryBw= X-Received: by 10.28.5.75 with SMTP id 72mr1387074wmf.154.1520959528221; Tue, 13 Mar 2018 09:45:28 -0700 (PDT) MIME-Version: 1.0 Received: by 10.28.109.7 with HTTP; Tue, 13 Mar 2018 09:45:27 -0700 (PDT) In-Reply-To: References: From: Dave Page Date: Tue, 13 Mar 2018 12:45:27 -0400 Message-ID: Subject: Re: [pgAdmin4][RM#3139] Create proper template path if Windows To: Murtuza Zabuawala Cc: pgadmin-hackers Content-Type: multipart/alternative; boundary="001a114429c865d52905674dfcf1" List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk --001a114429c865d52905674dfcf1 Content-Type: text/plain; charset="UTF-8" Thanks, applied. On Tue, Mar 13, 2018 at 9:27 AM, Murtuza Zabuawala < murtuza.zabuawala@enterprisedb.com> wrote: > Hi Dave, > > Please find updated patch which Joao sent along with RM#3139 fix. > > -- > Regards, > Murtuza Zabuawala > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > > > On Tue, Mar 13, 2018 at 6:24 PM, Murtuza Zabuawala enterprisedb.com> wrote: > >> Hi Dave, >> >> I have already replied on another thread regarding the failure of these >> tests, Joao has already sent a patch for the same. >> >> -- >> Regards, >> Murtuza Zabuawala >> EnterpriseDB: http://www.enterprisedb.com >> The Enterprise PostgreSQL Company >> >> >> On Tue, Mar 13, 2018 at 6:20 PM, Dave Page wrote: >> >>> And... reverted. It seems this makes Jenkins very unhappy. >>> >>> On Tue, Mar 13, 2018 at 7:58 AM, Dave Page wrote: >>> >>>> OK, thanks. Patch applied. >>>> >>>> On Tue, Mar 13, 2018 at 12:32 AM, Murtuza Zabuawala < >>>> murtuza.zabuawala@enterprisedb.com> wrote: >>>> >>>>> Hi Dave, >>>>> >>>>> We are not joining template path with os.path.join because we are >>>>> passing prefix paths in render_template(..) at many places, >>>>> we are passing them as below, >>>>> >>>>> Some of examples, >>>>> >>>>> render_template( >>>>> "exclusion_constraint/js/exclusion_constraint.js", >>>>> _=_ >>>>> ), >>>>> >>>>> recovery_check_sql = render_template( >>>>> "connect/sql/#{0}#/check_recovery.sql".format(postgres_versi >>>>> on)) >>>>> >>>>> sql = render_template( >>>>> "/servers/sql/#{0}#/stats.sql".format(manager.version), >>>>> conn=conn, _=gettext >>>>> ) >>>>> >>>>> sql = render_template( >>>>> "/".join([self.template_path, 'create.sql']), >>>>> data=data, conn=self.conn >>>>> ) >>>>> >>>>> def csssnippets(self): >>>>> """ >>>>> Returns a snippet of css to include in the page >>>>> """ >>>>> snippets = [render_template("css/servers.css")] >>>>> >>>>> >>>>> So again it will conflict if use os.path.join, To make it consistent >>>>> with render_template(...) and VersionedTemplateLoader(..) class we >>>>> opt'd for this mechanism. >>>>> >>>>> >>>>> -- >>>>> Regards, >>>>> Murtuza Zabuawala >>>>> EnterpriseDB: http://www.enterprisedb.com >>>>> The Enterprise PostgreSQL Company >>>>> >>>>> >>>>> On Tue, Mar 13, 2018 at 6:11 AM, Dave Page wrote: >>>>> >>>>>> Hi >>>>>> >>>>>> On Mon, Mar 12, 2018 at 10:15 AM, Murtuza Zabuawala < >>>>>> murtuza.zabuawala@enterprisedb.com> wrote: >>>>>> >>>>>>> Hi, >>>>>>> >>>>>>> PFA patch to correct the template path generation logic incase of >>>>>>> Windows system. >>>>>>> >>>>>> >>>>>> Seems like it would be better to fix it the other way round to me - >>>>>> e.g. update the template loader to use os.path.join. >>>>>> >>>>>> Any reason not to do that? >>>>>> >>>>>> -- >>>>>> Dave Page >>>>>> Blog: http://pgsnake.blogspot.com >>>>>> Twitter: @pgsnake >>>>>> >>>>>> EnterpriseDB UK: http://www.enterprisedb.com >>>>>> The Enterprise PostgreSQL Company >>>>>> >>>>> >>>>> >>>> >>>> >>>> -- >>>> Dave Page >>>> Blog: http://pgsnake.blogspot.com >>>> Twitter: @pgsnake >>>> >>>> EnterpriseDB UK: http://www.enterprisedb.com >>>> The Enterprise PostgreSQL Company >>>> >>> >>> >>> >>> -- >>> Dave Page >>> Blog: http://pgsnake.blogspot.com >>> Twitter: @pgsnake >>> >>> EnterpriseDB UK: http://www.enterprisedb.com >>> The Enterprise PostgreSQL Company >>> >> >> > -- Dave Page Blog: http://pgsnake.blogspot.com Twitter: @pgsnake EnterpriseDB UK: http://www.enterprisedb.com The Enterprise PostgreSQL Company --001a114429c865d52905674dfcf1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Thanks, applied.

On Tue, Mar 13, 2018 at 9:27 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,

Please find updated patch which= Joao sent along with=C2=A0RM#3139 fix.

--
Regards,
Murtuza Zabuawala
EnterpriseDB:= =C2=A0http://www.enterprisedb.com
The Enterprise PostgreSQL = Company

=

On Tue, Mar 13= , 2018 at 6:24 PM, Murtuza Zabuawala <murtuza.zabuawala@<= wbr>enterprisedb.com> wrote:
Hi Dave,

I hav= e already replied on another thread regarding the failure of these tests, J= oao has already sent a patch for the same.

--
Regards,
Murtuza Zabuawala
Enterp= riseDB:=C2=A0http://www.enterprisedb.com
The Enterprise Post= greSQL Company


On Tue, Mar 13, 2018 at 6:20 PM, Dave Page <= span dir=3D"ltr"><dpage@pgadmin.org> wrote:
=
And... reverted. It seems this makes Jenkins very unhappy.=

On Tue, Mar= 13, 2018 at 7:58 AM, Dave Page <dpage@pgadmin.org> wrote:
OK, thanks. Patch applied= .

On Tue, Mar 13, 2018 at 12:32 AM, Murtuza Zabuawala <murtuza.zabuawala@enterprisedb.com> wrote:
Hi Dave,

We are not joining template pat= h with os.path.join because we are passing prefix paths in render_template(= ..) at many places,
we are passing them as below,
=

Some of examples,

render_template(<= /div>
=C2=A0 =C2= =A0 "exclusion_constraint/js/exclusion_constraint.js",
=C2=A0 = =C2=A0 _=3D_
),

recovery_check_sql =3D render_template(
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 "connect/sql/#{0}#/check_recovery.sql".format(postgres_v= ersion))

sql =3D render_template(
=C2=A0 =C2=A0 "/servers/sql/#{0}#/s= tats.sql".format(manager.version),
=C2=A0 =C2=A0 conn=3Dconn, _=3Dge= ttext
)
sql =3D render_template(
=C2=A0 =C2=A0 "/".join([self.template_p= ath, 'create.sql']),
=C2=A0 =C2=A0 data=3Ddata, conn=3Dself.conn
)=

def css= snippets(self):
=C2=A0 =C2=A0 """
=C2=A0 =C2=A0 Returns a snippet = of css to include in the page
=C2=A0 =C2=A0 """
=C2=A0 =C2=A0 snip= pets =3D [render_template("css/servers.css")]

<= /div>

So again it will conflic= t if use os.path.join, To make it consistent with render_template(...) and= =C2=A0VersionedTemplateLoader(..) class we opt'd for this mechanis= m.


<= div dir=3D"ltr">--
Regards,
Murtuza Zabuawala
EnterpriseDB:=C2=A0http://ww= w.enterprisedb.com
The Enterprise PostgreSQL Company

=

On Tue, Mar 13, 2018 at 6:11 AM, Dave Page <= span dir=3D"ltr"><dpage@pgadmin.org> wrote:
=
Hi

On Mon, Mar 12, 2018 at 10:15 AM, Murtuza Zabuawala <= ;mu= rtuza.zabuawala@enterprisedb.com> wrote:
Hi,

PFA patch to correct the template path generation logic incase of= Windows system.

Seems like it = would be better to fix it the other way round to me - e.g. update the templ= ate loader to use os.path.join.

Any reason not to = do that?=C2=A0

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgs= nake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Co= mpany




--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB= UK: http://www.e= nterprisedb.com
The Enterprise PostgreSQL Company


--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake=

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Compan= y





--
Dave Page
Blog: = http://pgsnake.bl= ogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com<= br>The Enterprise PostgreSQL Company
--001a114429c865d52905674dfcf1--