Changeset 475


Ignore:
Timestamp:
Jun 25, 2012, 12:42:26 AM (8 years ago)
Author:
sommeria
Message:

check_files: 'try ' introduced to skip in case of error with svn check

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r460 r475  
    4949    'dataview.fig';...% GUI corresponding to dataview
    5050    'delete_object';...%delete a projection object, defined by its index in the Uvmat list or by its graphic handle
     51    'displ_uvmat';...
    5152    'editxml';...%display and edit xml files using a xls schema
    5253    'editxml.fig';...%interface for editxml
     
    148149end
    149150date_str=datestr(max(datnum));
    150 [status,result]=system('svn --help');
    151 if status==0
    152     [tild,result]=system(['svn info ' dir_fct]);
    153     t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
    154     svn_info.cur_rev=str2double(t.rev);
    155     [tild,result]=system(['svn info -r ''HEAD'' '  dir_fct]);
    156     t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
    157     svn_info.rep_rev=str2double(t.rev);
    158     [tild,result]=system(['svn status'  dir_fct]);
    159     svn_info.status=result;
    160     if svn_info.rep_rev>svn_info.cur_rev
    161         errormsg {length(errormsg)+1}=['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder'];
    162     end
    163     modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
    164     if ~isempty(modifications)
    165         for k=1:length(modifications)
    166             errormsg {length(errormsg)+1}=modifications{k};
     151try
     152    [status,result]=system('svn --help');
     153    if status==0
     154        [tild,result]=system(['svn info ' dir_fct]);
     155        t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     156        svn_info.cur_rev=str2double(t.rev);
     157        [tild,result]=system(['svn info -r ''HEAD'' '  dir_fct]);
     158        t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     159        svn_info.rep_rev=str2double(t.rev);
     160        [tild,result]=system(['svn status'  dir_fct]);
     161        svn_info.status=result;
     162        if svn_info.rep_rev>svn_info.cur_rev
     163            errormsg {length(errormsg)+1}=['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder'];
     164        end
     165        modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
     166        if ~isempty(modifications)
     167            for k=1:length(modifications)
     168                errormsg {length(errormsg)+1}=modifications{k};
     169            end
    167170        end
    168171    end
     172catch ME
     173    errormsg=ME.message;
    169174end
    170175errormsg=errormsg';
Note: See TracChangeset for help on using the changeset viewer.