- Timestamp:
- Apr 24, 2007, 11:44:34 PM (17 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r401 r411 1 2007-04-24 <arnault@lal.in2p3.fr> 329 2 3 * source/cmt_cvs.cxx (class CvsImplementation): Don't consider CVS branches when tag is not specified 4 5 * source/cmt_project.cxx: Protect warning messages with -quiet 6 7 * source/cmt_system.cxx: idem 8 * source/cmt_system.h: Improvement of the FilePath class definition 9 10 * source/cmt_parser.cxx: Prepare using FilePath objet for current dir 11 Better management of the -quiet option 12 13 * source/cmt.h: Prepare using FilePath objet for current dir 14 1 15 2007-04-23 <arnault@lal.in2p3.fr> 328 2 16 -
CMT/HEAD/source/cmt.h
r323 r411 35 35 36 36 cmt_string m_current_dir; 37 FilePath m_current_file_path; 37 38 cmt_string m_current_package; 38 39 cmt_string m_current_config; -
CMT/HEAD/source/cmt_cvs.cxx
r400 r411 1952 1952 const cmt_string& version_tag) 1953 1953 { 1954 if (m_verbose) 1955 { 1956 cerr << "#CMT> checkout phase1 module=" << module 1957 << " version_dir=" << version_dir << " version_tag=" << version_tag << endl; 1958 } 1959 1954 1960 add_cmtpath (m_home_dir); 1955 1961 … … 1988 1994 if (version_tag == "") 1989 1995 { 1990 Cut cut (0); 1991 1992 if (tags_top_info != "") tag = tags_top_info; 1993 else tag = tags_info; 1994 1995 cut.run (tag); 1996 1997 tag = cut.result (); 1996 // No version tag is specified 1997 // we need to discard all CVS branches 1998 // 1999 cmt_string versions = ""; 2000 2001 if (cvsversions_top_info != "") 2002 { 2003 versions = cvsversions_top_info; 2004 versions += " "; 2005 } 2006 2007 versions += cvsversions_info; 2008 2009 static CmtSystem::cmt_string_vector words; 2010 2011 // Get all <tag>:<version> items 2012 2013 CmtSystem::split (versions, " \t", words); 2014 2015 for (int i = 0; i < words.size (); i++) 2016 { 2017 // split to get <tag> and <version> separately 2018 2019 static CmtSystem::cmt_string_vector vts; 2020 CmtSystem::split (words[i], ":", vts); 2021 2022 cmt_string t = vts[0]; 2023 cmt_string v = vts[1]; 2024 2025 // Split to count the number of items for the CVS version 2026 2027 static CmtSystem::cmt_string_vector ds; 2028 CmtSystem::split (v, ".", ds); 2029 2030 if (ds.size () == 2) 2031 { 2032 tag = t; 2033 break; 2034 } 2035 } 1998 2036 } 1999 2037 else -
CMT/HEAD/source/cmt_parser.cxx
r400 r411 64 64 m_cmt_version = ""; 65 65 m_current_dir = ""; 66 m_current_file_path = ""; 66 67 m_current_package = ""; 67 68 m_current_config = ""; … … 77 78 m_current_version = ""; 78 79 m_default_path = ""; 79 m_quiet = false; 80 81 //m_quiet = false; 82 80 83 m_disable_warnings = false; 81 84 m_warnings = false; … … 492 495 void Cmt::clear () 493 496 { 497 Me.m_quiet = false; 494 498 Me.clear (); 495 499 … … 528 532 529 533 534 bool save_quiet = Me.m_quiet; 535 Me.m_quiet = true; 536 530 537 Me.m_autoconfigure_cmtpath = true; 531 538 configure_cmt_path (0); 532 539 Me.m_autoconfigure_cmtpath = false; 533 540 541 Me.m_quiet = save_quiet; 534 542 535 543 configure_current_dir (); … … 573 581 bool q = Me.m_quiet; 574 582 Me.m_quiet = true; 583 575 584 Symbol::filter_path_value ("CMTPATH", s); 585 576 586 Me.m_quiet = q; 577 587 } … … 765 775 766 776 Me.m_current_dir = mount_filter.get_current_dir (); 777 Me.m_current_file_path = mount_filter.get_current_dir (); 778 779 cmt_string t = Me.m_current_file_path; 767 780 } 768 781 … … 2274 2287 2275 2288 Me.m_quiet = true; 2276 2289 2277 2290 if (!reach_current_package ()) 2278 2291 { … … 4116 4129 //cerr << "buffer = " << buffer << endl; 4117 4130 Use& use = Use::current(); 4131 4118 4132 bool save_quiet = Me.m_quiet; 4119 4133 Me.m_quiet = true; 4134 4120 4135 SyntaxParser::parse_requirements_text (buffer, "", &use); 4136 4121 4137 Me.m_quiet = save_quiet; 4122 4138 … … 4918 4934 } 4919 4935 4920 4921 4936 clear (); 4937 4922 4938 configure (); 4923 4939 -
CMT/HEAD/source/cmt_project.cxx
r400 r411 232 232 if (r != p.get_release ()) 233 233 { 234 cerr << "#CMT> Project " << p.get_name () 235 << " requested with conflicting releases " << p.get_release () << " and " << r << endl; 234 if (!Cmt::get_quiet ()) 235 { 236 cerr << "#CMT> Project " << p.get_name () 237 << " requested with conflicting releases " << p.get_release () << " and " << r << endl; 238 } 236 239 CmtError::set (CmtError::project_release_conflict, p.get_name ()); 237 240 } -
CMT/HEAD/source/cmt_system.cxx
r400 r411 2467 2467 if (l_name == "") 2468 2468 { 2469 // the logical name was not set => set it 2469 2470 l_name = other; 2470 2471 } 2471 2472 else 2472 2473 { 2474 // add a new logical name 2473 2475 cmt_string& n = alternates.add (); 2474 2476 n = other; … … 2492 2494 } 2493 2495 2496 //---------------------------------------------------------- 2497 const cmt_string& FilePath::name () const 2498 { 2499 if (l_name != "") return (l_name); 2500 else return (p_name); 2501 } 2502 2503 //---------------------------------------------------------- 2504 FilePath::operator const cmt_string& () const 2505 { 2506 if (l_name != "") return (l_name); 2507 else return (p_name); 2508 } 2509 2510 //---------------------------------------------------------- 2511 bool FilePath::in (const FilePath& other) const 2512 { 2513 const cmt_string& o = other.name (); 2514 2515 return (in (o)); 2516 2517 return (false); 2518 } 2519 2520 //---------------------------------------------------------- 2521 bool FilePath::in (const cmt_string& other) const 2522 { 2523 if (p_name.find (other) == 0) return (true); 2524 if (l_name.find (other) == 0) return (true); 2525 2526 for (int i = 0; i < alternates.size (); i++) 2527 { 2528 const cmt_string& a = alternates[i]; 2529 if (a.find (other) == 0) return (true); 2530 } 2531 2532 return (false); 2533 } 2534 2535 //---------------------------------------------------------- 2536 bool FilePath::in (const char* other) const 2537 { 2538 const cmt_string o = other; 2539 2540 return (in (o)); 2541 } 2542 2543 -
CMT/HEAD/source/cmt_system.h
r400 r411 167 167 bool operator != (const char* other) const; 168 168 169 const cmt_string& name () const; 170 operator const cmt_string& () const; 171 172 bool in (const FilePath& other) const; 173 bool in (const cmt_string& other) const; 174 bool in (const char* other) const; 175 169 176 bool cd () const; 170 177
Note: See TracChangeset
for help on using the changeset viewer.