explicitly use python2 for svn proxy functions
parent
bed6c758c3
commit
75630b01d5
|
|
@ -236,11 +236,11 @@ svn-show-proxy ()
|
||||||
about 'Shows SVN proxy settings'
|
about 'Shows SVN proxy settings'
|
||||||
group 'proxy'
|
group 'proxy'
|
||||||
|
|
||||||
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
|
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
|
||||||
echo ""
|
echo ""
|
||||||
echo "SVN Proxy Settings"
|
echo "SVN Proxy Settings"
|
||||||
echo "=================="
|
echo "=================="
|
||||||
python - <<END
|
python2 - <<END
|
||||||
import ConfigParser, os
|
import ConfigParser, os
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(os.path.expanduser('~/.subversion/servers'))
|
config.read(os.path.expanduser('~/.subversion/servers'))
|
||||||
|
|
@ -266,8 +266,8 @@ svn-disable-proxy ()
|
||||||
about 'Disables SVN proxy settings'
|
about 'Disables SVN proxy settings'
|
||||||
group 'proxy'
|
group 'proxy'
|
||||||
|
|
||||||
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
|
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
|
||||||
python - <<END
|
python2 - <<END
|
||||||
import ConfigParser, os
|
import ConfigParser, os
|
||||||
config = ConfigParser.ConfigParser()
|
config = ConfigParser.ConfigParser()
|
||||||
config.read(os.path.expanduser('~/.subversion/servers'))
|
config.read(os.path.expanduser('~/.subversion/servers'))
|
||||||
|
|
@ -295,10 +295,10 @@ svn-enable-proxy ()
|
||||||
about 'Enables SVN proxy settings'
|
about 'Enables SVN proxy settings'
|
||||||
group 'proxy'
|
group 'proxy'
|
||||||
|
|
||||||
if $(command -v svn &> /dev/null) && $(command -v python &> /dev/null) ; then
|
if $(command -v svn &> /dev/null) && $(command -v python2 &> /dev/null) ; then
|
||||||
local my_http_proxy=${1:-$BASH_IT_HTTP_PROXY}
|
local my_http_proxy=${1:-$BASH_IT_HTTP_PROXY}
|
||||||
|
|
||||||
python - "$my_http_proxy" "$BASH_IT_NO_PROXY" <<END
|
python2 - "$my_http_proxy" "$BASH_IT_NO_PROXY" <<END
|
||||||
import ConfigParser, os, sys, urlparse
|
import ConfigParser, os, sys, urlparse
|
||||||
pieces = urlparse.urlparse(sys.argv[1])
|
pieces = urlparse.urlparse(sys.argv[1])
|
||||||
host = pieces.hostname
|
host = pieces.hostname
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue