Changeset 479 for trunk


Ignore:
Timestamp:
Jun 26, 2012, 11:52:18 AM (12 years ago)
Author:
gostiaux
Message:

svn command works with windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/check_files.m

    r477 r479  
    150150end
    151151date_str=datestr(max(datnum));
    152 try
    153     [status,result]=system('svn --help');
    154     if status==0
    155         [tild,result]=system(['svn info ' dir_fct]);
    156         t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     152[status,result]=system('svn --help');
     153if status==0
     154    svn_info.rep_rev=0;svn_info.cur_rev=0;
     155    [tild,result]=system(['svn info ' dir_fct]);
     156    t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     157    if ~isempty(t)
    157158        svn_info.cur_rev=str2double(t.rev);
    158         [tild,result]=system(['svn info -r ''HEAD'' '  dir_fct]);
    159         t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
    160         svn_info.rep_rev=str2double(t.rev);
    161         [tild,result]=system(['svn status'  dir_fct]);
    162         svn_info.status=result;
    163         errormsg =[errormsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];
    164         if svn_info.rep_rev>svn_info.cur_rev
    165             errormsg =[errormsg ...
    166                 {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}];
    167         end
    168         modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
    169         if ~isempty(modifications)
    170             errormsg=[errormsg modifications];
    171         end
    172     else
    173         errormsg=[errormsg {'SVN not available'}];
    174159    end
     160    [tild,result]=system(['svn info -r ''HEAD'' '  dir_fct]);
     161    t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');
     162    if ~isempty(t)
     163    svn_info.rep_rev=str2double(t.rev);
     164    end
     165    [tild,result]=system(['svn status'  dir_fct]);
     166    svn_info.status=result;
     167    errormsg =[errormsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];
     168    if svn_info.rep_rev>svn_info.cur_rev
     169        errormsg =[errormsg ...
     170            {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}];
     171    end
     172    modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');
     173    if ~isempty(modifications)
     174        errormsg=[errormsg modifications];
     175    end
     176else
     177    errormsg=[errormsg {'SVN not available'}];
     178end
    175179catch ME
    176180    errormsg=[errormsg {'SVN not available'}];
    177 end
    178 errormsg=errormsg';
     181    errormsg=errormsg';
    179182
Note: See TracChangeset for help on using the changeset viewer.