Changeset 201
- Timestamp:
- Jun 6, 2006, 3:02:23 PM (18 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r189 r201 1 2 2006-05-31 Vincent Garonne <garonne@lal.in2p3.fr> 308 3 4 * source/cmt_cvs: Add modification to deal with non working checkout by creating the cvs files manually ,e.g. cvs entries. 5 * source/cmt_cvs: Add the "-f" option which supposes to force cvs to ignore the .cvsrc file during cvs command execution. 6 1 7 2006-05-20 Christian Arnault <arnault@lal.in2p3.fr> 307 2 8 -
CMT/HEAD/doc/CMTDoc.xml
r113 r201 22 22 version='&CMTVersion;' 23 23 author='Christian Arnault' 24 email='arnault@lal.in2p3.fr'> 24 email='arnault@lal.in2p3.fr' 25 > 26 <!-- 27 updated by='Vincent Garonne' 28 email='garonne@lal.in2p3.fr' 29 --> 30 25 31 26 32 <cmt:section title='Presentation'> … … 4625 4631 load 4626 4632 lock [&lt;p> <v> [<path>]] : lock a package 4633 relocate : generate setup and cleanup scripts (without makefiles) 4627 4634 remove &lt;package> <version> [<path>] : remove a package version 4628 4635 remove library_links : remove symbolic links towards all imported libraries -
CMT/HEAD/mgr/fragments/make_header
r198 r201 108 108 109 109 #-- end of make_header ------------------ 110 -
CMT/HEAD/source/cmt_cvs.cxx
r200 r201 929 929 if (structure_info == "project") 930 930 { 931 need_version = true; 931 need_version = true; 932 //CmtStructuringStyle style = Cmt::get_current_structuring_style (); 933 //if (style == default_structuring_style) 934 //{ 935 // Use& current_use = Use::current (); 936 // if (current_use.get_strategy ("VersionDirectory")) 937 // need_version = true; 938 //} 939 //else if (style == with_version_directory) 940 // need_version = true; 941 // cout<<"need version"<<need_version<<endl; 932 942 } 933 943 else … … 1052 1062 cout << " # get project files into " << dir << endl; 1053 1063 1064 1054 1065 cmt_string version_dir = version; 1055 1056 1066 if (!mkdir (version_dir)) return (false); 1057 1067 … … 1059 1069 dir += version_dir; 1060 1070 1061 cmt_string command = "cvs - Q co -P ";1071 cmt_string command = "cvs -f -Q co -P "; 1062 1072 if (!at_head) 1063 1073 { … … 1074 1084 command += CmtSystem::command_separator (); 1075 1085 1076 command += " cvs update -l .";1086 command += " cvs -f update -l ."; 1077 1087 1078 1088 execute_and_retry (command, "Error getting project CMT contents"); … … 1192 1202 text.write (entries_file_name); 1193 1203 } 1194 1195 1204 } 1196 1205 … … 1268 1277 if (branches == "") 1269 1278 { 1270 branches = branches_info;1279 branches = branches_info; 1271 1280 } 1272 1281 … … 1313 1322 make_management_files (module, text); 1314 1323 1324 if (need_touch_files) 1325 { 1326 1327 cout << "# --> udapte the file timestamps" << endl; 1328 for (i = 0; i < branch_vector.size (); i++) 1329 { 1330 cmt_string& branch = branch_vector[i]; 1331 CmtSystem::cmt_string_vector& list = CmtSystem::scan_dir (branch); 1332 int j; 1333 for (j = 0; j < list.size (); j++) 1334 if (CmtSystem::test_file(list[j])) 1335 CmtSystem::touch_file (list[j]); 1336 } 1337 } 1315 1338 return (true); 1316 1339 } … … 1339 1362 execute_and_retry (command, "Error getting package contents"); 1340 1363 1364 if (need_touch_files) 1365 { 1366 1367 cout << "# --> udapte the file timestamps" << endl; 1368 for (i = 0; i < branch_vector.size (); i++) 1369 { 1370 cmt_string& branch = branch_vector[i]; 1371 CmtSystem::cmt_string_vector& list = CmtSystem::scan_dir (branch); 1372 int j; 1373 for (j = 0; j < list.size (); j++) 1374 if (CmtSystem::test_file(list[j])) 1375 CmtSystem::touch_file (list[j]); 1376 } 1377 } 1341 1378 return (true); 1342 1379 } … … 2059 2096 cout << " -o offset Offset in the CVS repository" << endl; 2060 2097 cout << " -requirements <requirements file path> Check out packages referenced in this requirements file" << endl; 2098 cout << " -t Change file timestamps to the date of checkout" << endl; 2061 2099 cout << " -n simulation mode on" << endl; 2062 2100 cout << " -v verbose mode on" << endl; … … 2228 2266 cmt_string module; 2229 2267 2230 m_recursive = false; 2268 m_recursive = false; 2269 need_touch_files = false; 2231 2270 2232 2271 bool need_version_tag = false; 2233 2272 cmt_string version_tag; 2273 2234 2274 2235 2275 bool need_checkout_dir = false; … … 2297 2337 m_recursive = true; 2298 2338 } 2339 else if (option == "-t") 2340 { 2341 need_touch_files = true; 2342 } 2299 2343 else if (option == "-l") 2300 2344 { … … 2351 2395 2352 2396 bool m_recursive; 2397 bool need_touch_files; 2353 2398 bool m_head; 2354 2399 bool m_verbose; -
CMT/HEAD/source/cmt_system.cxx
r195 r201 413 413 return ((s1 == s2)); 414 414 } 415 416 //-------------------------------------------------- 417 // 418 // Function use to change file timestamps 419 // 420 //-------------------------------------------------- 421 bool CmtSystem::touch_file (const cmt_string& name) 422 { 423 if (CmtSystem::test_file(name)) 424 { 425 FILE* f = fopen (name, "a+"); 426 if (f != NULL) 427 { 428 cmt_string empty = " "; 429 empty.write(f); 430 fclose (f); 431 return true; 432 } 433 } 434 return false; 435 } 436 415 437 416 438 //-------------------------------------------------- -
CMT/HEAD/source/cmt_system.h
r197 r201 59 59 /** 60 60 * Implementation of the "test -f" equivalent 61 */ 61 */ 62 62 static bool test_file (const cmt_string& name); 63 /** 64 * Implementation of the "touch" function equivalent 65 */ 66 static bool touch_file (const cmt_string& name); 63 67 /** 64 68 * Check if the file "name1" is identical to "name2"
Note: See TracChangeset
for help on using the changeset viewer.