Changeset 705 for trunk/src/check_files.m
- Timestamp:
- Feb 12, 2014, 12:02:04 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/check_files.m
r679 r705 160 160 %% check svn status 161 161 [status,result]=system('svn --help'); 162 if status==0 162 if status==0 % if a svn line command is available 163 163 svn_info.rep_rev=0;svn_info.cur_rev=0; 164 [tild,result]=system(['svn info ' dir_fct]); 165 t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names'); 164 [tild,result]=system(['svn info ' dir_fct]); %get info fromn the svn server 165 t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names');%detect 'révision' or 'Revision' in the text 166 166 if ~isempty(t) 167 svn_info.cur_rev=str2double(t.rev); 167 svn_info.cur_rev=str2double(t.rev); %version nbre of the current package 168 168 end 169 169 [tild,result]=system(['svn info -r ''HEAD'' ' pathuvmat]); 170 170 t=regexp(result,'R.vision\s*:\s*(?<rev>\d+)','names'); 171 171 if ~isempty(t) 172 svn_info.rep_rev=str2double(t.rev); 172 svn_info.rep_rev=str2double(t.rev); % version nbre available on the svn repository 173 173 end 174 174 [tild,result]=system(['svn status ' pathuvmat]); 175 175 svn_info.status=result; 176 checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}]; 177 if svn_info.rep_rev>svn_info.cur_rev 176 checkmsg =[checkmsg {['SVN revision : ' num2str(svn_info.cur_rev)]}];%display version nbre of the current uvmat package 177 if svn_info.rep_rev>svn_info.cur_rev %if the repository has a more advanced version than the uvmat package, warning msge 178 178 checkmsg =[checkmsg ... 179 179 {['Repository now at revision ' num2str(svn_info.rep_rev) '. Please type svn update in uvmat folder']}]; 180 180 end 181 modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match'); 181 modifications=regexp(svn_info.status,'M\s[^(\n|\>)]+','match');% detect the files modified compared to the repository 182 182 if ~isempty(modifications) 183 183 for ilist=1:numel(modifications) … … 186 186 end 187 187 end 188 else 188 else % no svn line command available 189 189 checkmsg=[checkmsg {'SVN not available'}]; 190 190 end
Note: See TracChangeset
for help on using the changeset viewer.