You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Bhuvaneswaran Arumugam <bh...@collab.net> on 2006/07/07 10:41:15 UTC

[PATCH] svn2rss.py: Set default value for 'svn_path' based on PATH

Hello,

Please find attached the patch to set default value for 'svn_path' based
on PATH environment variable.

[[[
Set default value for 'svn_path' based on PATH environment variable

* contrib/hook-scripts/svn2rss.py
  (get_svn_path): New function to scan the PATH environment variable and
  set the 'svn_path' variable. Exit, if the command is not found
  (SVN2RSS.__init__): Donot check if 'svn_path' is not None since we 
  set this value now
  (main): If 'svn_path' is None, call get_svn_path()
]]]

-- 
Regards,
Bhuvaneswaran

Re: [PATCH] svn2rss.py: Set default value for 'svn_path' based on PATH

Posted by "C. Michael Pilato" <cm...@collab.net>.
Bhuvaneswaran Arumugam wrote:
> Hello,
> 
> Please find attached the patch to set default value for 'svn_path' based
> on PATH environment variable.
> 
> [[[
> Set default value for 'svn_path' based on PATH environment variable
> 
> * contrib/hook-scripts/svn2rss.py
>   (get_svn_path): New function to scan the PATH environment variable and
>   set the 'svn_path' variable. Exit, if the command is not found
>   (SVN2RSS.__init__): Donot check if 'svn_path' is not None since we 
>   set this value now
>   (main): If 'svn_path' is None, call get_svn_path()
> ]]]

This whole change is unnecessary.  The code already in place uses "svn_path
+ /svnlook" if the user provides svn_path, or just runs "svnlook" (which is
found automatically via a PATH search) otherwise.  There's no reason to
search through PATH to verify that the user's input is correct, and in fact,
doing so makes this script less likely to work on Windows systems (where the
program could be "svnlook.exe", "svnlook.bat", etc.).

-- 
C. Michael Pilato <cm...@collab.net>
CollabNet   <>   www.collab.net   <>   Distributed Development On Demand