function info = get_svn_info(opt)

% get_svn_info - get current SVN info
% -----------------------------------
%
% info = get_svn_info
%
% info = get_svn_info('refresh')
% 
% NOTE: 'refresh' forces information to be collected, this is slow

%--------------------------------
% Author: Harold Figueroa
%--------------------------------
% $Revision: 1180 $
% $Date: 2005-07-15 17:22:21 -0400 (Fri, 15 Jul 2005) $
%--------------------------------

%--
% set default option
%--

if (nargin < 1)
	opt = '';
end

%--
% check for info file
%--

flag = isempty(which('svn_info.m'));
	
if (flag && isempty(svn_root)) || (strcmp(opt, 'refresh') && isempty(svn_root))
	info = []; return;
end

%--
% create current 'svn_info' if needed or requested
%--

if flag || strcmp(opt, 'refresh')
	svn_replace(xbat_root, 'svn_info.in', 'svn_info.m');
end

%--
% get svn info
%--

info = svn_info;
