[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: A proposed solution for svn admin directory names

From: Joseph Galbraith <galb_at_vandyke.com>
Date: 2005-06-29 18:47:00 CEST

C. Michael Pilato wrote:
> Philip Martin <philip@codematters.co.uk> writes:
>
>
>>Ben Collins-Sussman <sussman@collab.net> writes:
>>
>>
>>>On Jun 29, 2005, at 10:51 AM, Jonathan Malek wrote:
>>>
>>>>#define SVN_WC_ADM_DIR_NAME ( ( getenv( "SVN_ADM_DIR") ) ? ( getenv(
>>>>"SVN_ADM_DIR") ) : (".svn") )
>>
>>>IANTSP -- "I am not the subversion project". Do any other developers
>>>have opinions about this?
>>
>>Calling getenv() that often is horrible.
>
>
> Well ... that answers one question in my previous email. :-)

Well, maybe this is better, or perhaps more horrible (excuse
the C++ism and pseudo-hungarianisms:

char* getadmdir()
{
   static bool bHaveDir = false;
   static char* szAdmDir = 0;
   if ( ! bHaveDir )
   {
     bHaveDir = true;
     szAdmDir = ::getevn("SVN_ADM_DIR");
     if ( szAdmDir == 0 )
        szAdmDir = ".svn";
   }

   return szAdmDir;
}

#define SVN_WC_ADM_DIR_NAME getadmdir()

Thanks,

Joseph

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Jun 29 18:42:46 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.