Ignore:
Timestamp:
Jul 21, 2012, 11:15:52 PM (12 years ago)
Author:
sommeria
Message:

cleaning and small bug repair.
pb of histogram for filter data solved
display of uicontrol by right mouse selection improved

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r480 r497  
    33%  uvmat path to the Matlab path if needed.
    44%----------------------------------------------------------------------
    5 % function [errormsg,date_str,ver]=check_files
     5% function [checkmsg,date_str,ver]=check_files
    66%
    77% OUTPUT:
    8 % errormsg: error message listing functions whose paths are not in the directory of uvmat.m
     8% checkmsg: error message listing functions whose paths are not in the directory of uvmat.m
    99% date_str: date of the most recent modification of a file in the toolbox
    1010% ver : svn version in case this is a  svn repository
     
    2626%AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
    2727
    28 function [errormsg,date_str,svn_info]=check_files
    29 errormsg={};%default
    30 date_str='';
     28function [checkmsg,date_str,svn_info]=check_files
     29checkmsg={};%default
    3130svn_info.rep_rev=[];
    3231svn_info.cur_rev=[];
     
    5352    'editxml.fig';...%interface for editxml
    5453    '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 Param
     54    'fill_GUI';...%  fill a GUI with a set of parameters from a Matlab structure
    5655    'filter_tps';...% find the thin plate spline coefficients for interpolation-smoothing
    5756    'find_field_indices';...% group the variables of a nc-formated Matlab structure into 'fields' with common dimensions
     
    8786    'read_image';... read images or video objects
    8887    'read_get_field';... read the list of selected variables from the GUI get_field (TODO: use read_GUI)
    89     'read_GUI';... %read all parameters set by a GUI as a Matlab structure
     88    'read_GUI';... %read a GUI and provide the data as a Matlab structure
    9089    'read_image';...%read .civ files (obsolete, but can be adapted to other text documentation files)
    9190    'read_multimadoc';... %read a set of Imadoc files and compare their timing of different file series
     
    121120    };
    122121dir_fct=which('uvmat');% path to uvmat
    123 [pathuvmat,name,ext]=fileparts(dir_fct);
     122pathuvmat=fileparts(dir_fct);
    124123
    125124%% add the uvmat path to matlab if needed
     
    136135    if isempty(dir_fct)
    137136        icount=icount+1;
    138         errormsg{icount}=[list_fct{i} ' not found'];% test for function not found
     137        checkmsg{icount}=[list_fct{i} ' not found'];% test for function not found
    139138    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)
    142141            icount=icount+1;
    143             errormsg{icount}=[dir_fct ' overrides the package UVMAT'];% bad path for the function
     142            checkmsg{icount}=[dir_fct ' overrides the package UVMAT'];% bad path for the function
    144143        end
    145144        datfile=dir(dir_fct);
     
    150149end
    151150date_str=datestr(max(datnum));
     151
     152%% check svn status
    152153[status,result]=system('svn --help');
    153154if status==0
     
    158159        svn_info.cur_rev=str2double(t.rev);
    159160    end
    160     [tild,result]=system(['svn info -r ''HEAD'' '  dir_fct]);
     161    [tild,result]=system(['svn info -r ''HEAD'' '  pathuvmat]);
    161162    t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
    162163    if ~isempty(t)
    163     svn_info.rep_rev=str2double(t.rev);
     164        svn_info.rep_rev=str2double(t.rev);
    164165    end
    165     [tild,result]=system(['svn status'  dir_fct]);
     166    [tild,result]=system(['svn status '  pathuvmat]);
    166167    svn_info.status=result;
    167     errormsg =[errormsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];
     168    checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];
    168169    if svn_info.rep_rev>svn_info.cur_rev
    169         errormsg =[errormsg ...
     170        checkmsg =[checkmsg ...
    170171            {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}];
    171172    end
    172173    modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
    173174    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
    175179    end
    176180else
    177     errormsg=[errormsg {'SVN not available'}];
     181    checkmsg=[checkmsg {'SVN not available'}];
    178182end
    179 errormsg=errormsg';
     183checkmsg=checkmsg';
    180184
Note: See TracChangeset for help on using the changeset viewer.