You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Dominique Leuenberger <do...@leuenberger.net> on 2010/09/27 11:05:44 UTC

[PATCH] Use neon's system proxy detection if not explicitly specified

Hi All,

[[[
Use Neon's system_proxy autodetection if no proxy has been explicitly
specified.
]]]

As a notebook user I'm of course using it on different
locations/networks and one thing rather annoying is that subversion only
cares for it's own configuration file when it comes to proxy
connections.

Since version 0.29.0 of libneon, it features a ne_session_system_proxy
API, which allows to transparently have the proxy settings filled, based
on what you have configured in your gnome/kde session (it uses libproxy
in the background for this). Should you happen to run subversion on any
different kind of session, is is falling back to using envvar.

I've been working with subversion the last few days with this
modification and it served me a lot, as I do only have to change my
gnome session's proxy settings now. svn is inheriting them, avoiding the
need to configure this file in plus (one location to rule them all!).

I'd be really glad if you would consider merging this patch (I wrote it
initially for 1.6.12, then later ported to svn trunk, which is slightly
different... I only tested the 1.6.12 version of the patch!).

Both patches are attached here for reference.

Best regards,
Dominique



Re: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Gavin Beau Baumanis <ga...@thespidernet.com>.
I have sent this patch to the issue tracker; #3740.
http://subversion.tigris.org/issues/show_bug.cgi?id=3740

Gavin "Beau" Baumanis



On 27/09/2010, at 9:05 PM, Dominique Leuenberger wrote:

> Hi All,
> 
> [[[
> Use Neon's system_proxy autodetection if no proxy has been explicitly
> specified.
> ]]]
> 
> As a notebook user I'm of course using it on different
> locations/networks and one thing rather annoying is that subversion only
> cares for it's own configuration file when it comes to proxy
> connections.
> 
> Since version 0.29.0 of libneon, it features a ne_session_system_proxy
> API, which allows to transparently have the proxy settings filled, based
> on what you have configured in your gnome/kde session (it uses libproxy
> in the background for this). Should you happen to run subversion on any
> different kind of session, is is falling back to using envvar.
> 
> I've been working with subversion the last few days with this
> modification and it served me a lot, as I do only have to change my
> gnome session's proxy settings now. svn is inheriting them, avoiding the
> need to configure this file in plus (one location to rule them all!).
> 
> I'd be really glad if you would consider merging this patch (I wrote it
> initially for 1.6.12, then later ported to svn trunk, which is slightly
> different... I only tested the 1.6.12 version of the patch!).
> 
> Both patches are attached here for reference.
> 
> Best regards,
> Dominique
> 
> 
> <subversion-neon-systemproxy.patch><subversion-1.6.12-neon-systemproxy.patch>

RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Dominique Leuenberger <do...@leuenberger.net>.
On Mon, 2010-09-27 at 12:33 +0100, Jon Foster wrote:
> Hi,
> 
> + if test -n ["`echo "$NEON_VERSION" | grep '^0\.29\.'`"] ; then
> +   AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1],
> +            [Define to 1 if you have Neon 0.29 or later.])
> + fi
> 
> The comment says "0.29 or later" (which I think is right), but
> the test looks like it's checking for Neon 0.29 exactly.  Will
> this go wrong with Neon 0.30 or 1.00?

Hi,

That's the patch for 1.6.12 as I remember. It is rather unclear if neon
0.30 is going to change API or not to me. I would assume not.

This is also the reason why the trunk based patch contains:

+      if test -n ["`echo "$NEON_VERSION" | $EGREP '^0\.(29|
3[0-9])\.'`"] ; then
+        AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1],
+                           [Define to 1 if you have Neon 0.29 or
later.])
+      fi
+


This should trigger at least 0.3x as valid as well. (the 1.6.12 patch is
more for reference, as that is the tested one).

Dominique


RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Jon Foster <Jo...@cabot.co.uk>.
Dominique wrote:
> On Mon, 2010-09-27 at 13:19 +0100, Jon Foster wrote:
> > Better, but it'll still go wrong with Neon 0.40 or 1.00.  I guess it
> > needs to be something like:
> > 
> > if test -n ["`echo "$NEON_VERSION" | $EGREP
> >     '^(([1-9][0-9]*)|(0\.(29|[3-9][0-9])))\.'`"] ; then
> > 
> > ?  That should match 0.29-0.99 and 1.0 or later.  I'm assuming there
> > won't ever be a 0.100 release.
> 
> As my last mail did remain unanswered and I don't want to have the
> whole thread go lost; here re-replied:
> 
> The current check for 0.29/0.3x is copied from the other checks for
> NEON_0_2(<9). I think it would not be wrong to keep the checks in sync
> (or optionally even restructure this test with nested ifs).
> 
> For me either way is fine: I can update the patch to also detect newer
> versions as suggest by you. Which in turn will still break all the
other
> detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
> together and fix them all together at a later stage.

This is something that the committers need to decide on.
As I'm not a committer, I won't express an opinion.

Kind regards,

Jon


**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Dominique Leuenberger <do...@leuenberger.net>.
On Mon, 2010-09-27 at 13:19 +0100, Jon Foster wrote:
> Better, but it'll still go wrong with Neon 0.40 or 1.00.  I guess it
> needs to be something like:
> 
> if test -n ["`echo "$NEON_VERSION" | $EGREP
>     '^(([1-9][0-9]*)|(0\.(29|[3-9][0-9])))\.'`"] ; then
> 
> ?  That should match 0.29-0.99 and 1.0 or later.  I'm assuming there
> won't ever be a 0.100 release.

As my last mail did remain unanswered and I don't want to have the whole
thread go lost; here re-replied:

The current check for 0.29/0.3x is copied from the other checks for
NEON_0_2(<9). I think it would not be wrong to keep the checks in sync
(or optionally even restructure this test with nested ifs).

For me either way is fine: I can update the patch to also detect newer
versions as suggest by you. Which in turn will still break all the other
detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
together and fix them all together at a later stage.

Best regards,
Dominique

Re: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Gavin Beau Baumanis <ga...@thespidernet.com>.
Ping. This patch has received no further comments.


Gavin "Beau" Baumanis


On 29/09/2010, at 8:48 PM, Dominique Leuenberger wrote:

> On Wed, 2010-09-29 at 12:42 +0200, Daniel Shahaf wrote:
>>> 
>>> For me either way is fine: I can update the patch to also detect newer
>>> versions as suggest by you. Which in turn will still break all the other
>>> detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
>>> together and fix them all together at a later stage.
>> 
>> The latter please; when Neon 0.39 comes around we'll fix all checks at
>> the same time.
> 
> In this case I would consider my patch complete, as this is already what
> has been submitted.
> 
> Thanks for your confirmation; Is there any further action to be taken by
> myself for this to happen?
> 
> Dominique
> 
> 

Re: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Dominique Leuenberger <do...@leuenberger.net>.
On Wed, 2010-09-29 at 12:42 +0200, Daniel Shahaf wrote:
> > 
> > For me either way is fine: I can update the patch to also detect newer
> > versions as suggest by you. Which in turn will still break all the other
> > detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
> > together and fix them all together at a later stage.
> 
> The latter please; when Neon 0.39 comes around we'll fix all checks at
> the same time.

In this case I would consider my patch complete, as this is already what
has been submitted.

Thanks for your confirmation; Is there any further action to be taken by
myself for this to happen?

Dominique


Re: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Dominique Leuenberger wrote on Mon, Sep 27, 2010 at 14:48:20 +0200:
> On Mon, 2010-09-27 at 13:19 +0100, Jon Foster wrote:
> 
> > Better, but it'll still go wrong with Neon 0.40 or 1.00.  I guess it
> > needs to be something like:
> > 
> > if test -n ["`echo "$NEON_VERSION" | $EGREP
> >     '^(([1-9][0-9]*)|(0\.(29|[3-9][0-9])))\.'`"] ; then
> > 
> > ?  That should match 0.29-0.99 and 1.0 or later.  I'm assuming there
> > won't ever be a 0.100 release.
> > 
> 
> Right; the up to 0.39 check is a lazy copy paste from all the other
> check in neon.m4 :)
> 
> The check which exists already for 0.28 is like this:
>       if test -n ["`echo "$NEON_VERSION" | $EGREP '^0\.(2[8-9]|
> 3[0-9])\.'`"] ; then
>         AC_DEFINE_UNQUOTED([SVN_NEON_0_28], [1],
>                            [Define to 1 if you have Neon 0.28 or
> later.])
>       fi
> 
> 
> For me either way is fine: I can update the patch to also detect newer
> versions as suggest by you. Which in turn will still break all the other
> detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
> together and fix them all together at a later stage.

The latter please; when Neon 0.39 comes around we'll fix all checks at
the same time.

RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Dominique Leuenberger <do...@leuenberger.net>.
On Mon, 2010-09-27 at 13:19 +0100, Jon Foster wrote:

> Better, but it'll still go wrong with Neon 0.40 or 1.00.  I guess it
> needs to be something like:
> 
> if test -n ["`echo "$NEON_VERSION" | $EGREP
>     '^(([1-9][0-9]*)|(0\.(29|[3-9][0-9])))\.'`"] ; then
> 
> ?  That should match 0.29-0.99 and 1.0 or later.  I'm assuming there
> won't ever be a 0.100 release.
> 

Right; the up to 0.39 check is a lazy copy paste from all the other
check in neon.m4 :)

The check which exists already for 0.28 is like this:
      if test -n ["`echo "$NEON_VERSION" | $EGREP '^0\.(2[8-9]|
3[0-9])\.'`"] ; then
        AC_DEFINE_UNQUOTED([SVN_NEON_0_28], [1],
                           [Define to 1 if you have Neon 0.28 or
later.])
      fi


For me either way is fine: I can update the patch to also detect newer
versions as suggest by you. Which in turn will still break all the other
detections of SVN_NEON_0_28 and older. Or we keep them 'in sync'
together and fix them all together at a later stage.

> (Aside: This would be much easier if neon #defined a macro like
> NE_VERSION_NUMBER, which we could just test in an #ifdef.
> Unfortunately, it doesn't seem to have one).

Indeed. This was actually what took me most of the time to find out how
the heck do you guys know what version neon has :) until I found
neon.m4.

Dominique

RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Jon Foster <Jo...@cabot.co.uk>.
Dominique Leuenberger wrote:
> On Mon, 2010-09-27 at 12:33 +0100, Jon Foster wrote:
> > Hi,
> > 
> > + if test -n ["`echo "$NEON_VERSION" | grep '^0\.29\.'`"] ; then
> > +   AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1],
> > +            [Define to 1 if you have Neon 0.29 or later.])
> > + fi
> > 
> > The comment says "0.29 or later" (which I think is right), but
> > the test looks like it's checking for Neon 0.29 exactly.  Will
> > this go wrong with Neon 0.30 or 1.00?
> 
> Hi,
> 
> That's the patch for 1.6.12 as I remember.

Yes.  I hadn't realised they did this test differently, sorry.

> It is rather unclear if neon 0.30 is going to change API or
> not to me. I would assume not.

If it changes the API, the build might break whatever you do.
So it's probably best to assume that it doesn't change API.
(Also: API changes usually cause the build to explode; this
test failing will just quietly disable a feature).

> This is also the reason why the trunk based patch contains:
> 
> +      if test -n ["`echo "$NEON_VERSION" | $EGREP '^0\.(29|
> 3[0-9])\.'`"] ; then
> +        AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1],
> +                           [Define to 1 if you have Neon 0.29 or
> later.])
> +      fi
> +
> 
> This should trigger at least 0.3x as valid as well. (the 1.6.12 patch
is
> more for reference, as that is the tested one).

Better, but it'll still go wrong with Neon 0.40 or 1.00.  I guess it
needs to be something like:

if test -n ["`echo "$NEON_VERSION" | $EGREP
    '^(([1-9][0-9]*)|(0\.(29|[3-9][0-9])))\.'`"] ; then

?  That should match 0.29-0.99 and 1.0 or later.  I'm assuming there
won't ever be a 0.100 release.

(Aside: This would be much easier if neon #defined a macro like
NE_VERSION_NUMBER, which we could just test in an #ifdef.
Unfortunately, it doesn't seem to have one).

Kind regards,

Jon



**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________

RE: [PATCH] Use neon's system proxy detection if not explicitly specified

Posted by Jon Foster <Jo...@cabot.co.uk>.
Hi,

+ if test -n ["`echo "$NEON_VERSION" | grep '^0\.29\.'`"] ; then
+   AC_DEFINE_UNQUOTED([SVN_NEON_0_29], [1],
+            [Define to 1 if you have Neon 0.29 or later.])
+ fi

The comment says "0.29 or later" (which I think is right), but
the test looks like it's checking for Neon 0.29 exactly.  Will
this go wrong with Neon 0.30 or 1.00?

Kind regards,

Jon

-----Original Message-----
From: Dominique Leuenberger [mailto:dominique@leuenberger.net] 
Sent: 27 September 2010 12:06
To: dev@subversion.apache.org
Subject: [PATCH] Use neon's system proxy detection if not explicitly
specified

Hi All,

[[[
Use Neon's system_proxy autodetection if no proxy has been explicitly
specified.
]]]

As a notebook user I'm of course using it on different
locations/networks and one thing rather annoying is that subversion only
cares for it's own configuration file when it comes to proxy
connections.

Since version 0.29.0 of libneon, it features a ne_session_system_proxy
API, which allows to transparently have the proxy settings filled, based
on what you have configured in your gnome/kde session (it uses libproxy
in the background for this). Should you happen to run subversion on any
different kind of session, is is falling back to using envvar.

I've been working with subversion the last few days with this
modification and it served me a lot, as I do only have to change my
gnome session's proxy settings now. svn is inheriting them, avoiding the
need to configure this file in plus (one location to rule them all!).

I'd be really glad if you would consider merging this patch (I wrote it
initially for 1.6.12, then later ported to svn trunk, which is slightly
different... I only tested the 1.6.12 version of the patch!).

Both patches are attached here for reference.

Best regards,
Dominique




______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________


**********************************************************************
This email and its attachments may be confidential and are intended solely for the use of the individual to whom it is addressed. Any views or opinions expressed are solely those of the author and do not necessarily represent those of Cabot Communications Ltd.

If you are not the intended recipient of this email and its attachments, you must take no action based upon them, nor must you copy or show them to anyone.

Cabot Communications Limited
Verona House, Filwood Road, Bristol BS16 3RY, UK
+44 (0) 1179584232

Co. Registered in England number 02817269

Please contact the sender if you believe you have received this email in error.

**********************************************************************


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email 
______________________________________________________________________