Changeset 497 for trunk/src/check_files.m
- Timestamp:
- Jul 21, 2012, 11:15:52 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r480 r497 3 3 % uvmat path to the Matlab path if needed. 4 4 %---------------------------------------------------------------------- 5 % function [ errormsg,date_str,ver]=check_files5 % function [checkmsg,date_str,ver]=check_files 6 6 % 7 7 % OUTPUT: 8 % errormsg: error message listing functions whose paths are not in the directory of uvmat.m8 % checkmsg: error message listing functions whose paths are not in the directory of uvmat.m 9 9 % date_str: date of the most recent modification of a file in the toolbox 10 10 % ver : svn version in case this is a svn repository … … 26 26 %AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 27 27 28 function [errormsg,date_str,svn_info]=check_files 29 errormsg={};%default 30 date_str=''; 28 function [checkmsg,date_str,svn_info]=check_files 29 checkmsg={};%default 31 30 svn_info.rep_rev=[]; 32 31 svn_info.cur_rev=[]; … … 53 52 'editxml.fig';...%interface for editxml 54 53 'fileparts_uvmat';...% extracts the root name,field indexes and nomenclature type from an input filename 55 'fill_GUI';...% fill a GUI with handles 'handles' from input data Param54 'fill_GUI';...% fill a GUI with a set of parameters from a Matlab structure 56 55 'filter_tps';...% find the thin plate spline coefficients for interpolation-smoothing 57 56 'find_field_indices';...% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions … … 87 86 'read_image';... read images or video objects 88 87 'read_get_field';... read the list of selected variables from the GUI get_field (TODO: use read_GUI) 89 'read_GUI';... %read a ll parameters set by a GUIas a Matlab structure88 'read_GUI';... %read a GUI and provide the data as a Matlab structure 90 89 'read_image';...%read .civ files (obsolete, but can be adapted to other text documentation files) 91 90 'read_multimadoc';... %read a set of Imadoc files and compare their timing of different file series … … 121 120 }; 122 121 dir_fct=which('uvmat');% path to uvmat 123 [pathuvmat,name,ext]=fileparts(dir_fct);122 pathuvmat=fileparts(dir_fct); 124 123 125 124 %% add the uvmat path to matlab if needed … … 136 135 if isempty(dir_fct) 137 136 icount=icount+1; 138 errormsg{icount}=[list_fct{i} ' not found'];% test for function not found137 checkmsg{icount}=[list_fct{i} ' not found'];% test for function not found 139 138 else 140 [pth,name,ext]=fileparts(dir_fct);141 if ~isequal(pathuvmat,pth) &~isequal(fullfile(pathuvmat,'private'),pth)139 pth=fileparts(dir_fct); 140 if ~isequal(pathuvmat,pth) && ~isequal(fullfile(pathuvmat,'private'),pth) 142 141 icount=icount+1; 143 errormsg{icount}=[dir_fct ' overrides the package UVMAT'];% bad path for the function142 checkmsg{icount}=[dir_fct ' overrides the package UVMAT'];% bad path for the function 144 143 end 145 144 datfile=dir(dir_fct); … … 150 149 end 151 150 date_str=datestr(max(datnum)); 151 152 %% check svn status 152 153 [status,result]=system('svn --help'); 153 154 if status==0 … … 158 159 svn_info.cur_rev=str2double(t.rev); 159 160 end 160 [tild,result]=system(['svn info -r ''HEAD'' ' dir_fct]);161 [tild,result]=system(['svn info -r ''HEAD'' ' pathuvmat]); 161 162 t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names'); 162 163 if ~isempty(t) 163 svn_info.rep_rev=str2double(t.rev);164 svn_info.rep_rev=str2double(t.rev); 164 165 end 165 [tild,result]=system(['svn status ' dir_fct]);166 [tild,result]=system(['svn status ' pathuvmat]); 166 167 svn_info.status=result; 167 errormsg =[errormsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];168 checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}]; 168 169 if svn_info.rep_rev>svn_info.cur_rev 169 errormsg =[errormsg ...170 checkmsg =[checkmsg ... 170 171 {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}]; 171 172 end 172 173 modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match'); 173 174 if ~isempty(modifications) 174 errormsg=[errormsg modifications]; 175 for ilist=1:numel(modifications) 176 [tild,FileName,FileExt]=fileparts(modifications{ilist}); 177 checkmsg=[checkmsg {[FileName FileExt ' modified']}]; 178 end 175 179 end 176 180 else 177 errormsg=[errormsg {'SVN not available'}];181 checkmsg=[checkmsg {'SVN not available'}]; 178 182 end 179 errormsg=errormsg';183 checkmsg=checkmsg'; 180 184
Note: See TracChangeset
for help on using the changeset viewer.