Changeset 138
- Timestamp:
- Jan 31, 2006, 2:27:50 PM (18 years ago)
- Location:
- CMT/HEAD/source
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_awk.cxx
r79 r138 611 611 if (level > 10) 612 612 { 613 //cout << "#PathScanner::scan_path> too deep search path=" << path << endl;613 cout << "#PathScanner::scan_path> too deep search path=" << path << endl; 614 614 return; 615 615 } … … 618 618 // Only do something if it is a directory. 619 619 // 620 621 620 if (!CmtSystem::test_directory (path)) return; 621 622 622 623 623 CmtSystem::cmt_string_vector list; … … 645 645 if (!CmtSystem::test_directory (here)) continue; 646 646 647 name = "";647 name = ""; 648 648 version = ""; 649 649 … … 663 663 req += CmtSystem::file_separator (); 664 664 req += "requirements"; 665 665 666 666 if (CmtSystem::test_file (req)) 667 667 { … … 673 673 CmtSystem::basename (path, name); 674 674 675 // 675 //cout << "#1" << endl; 676 676 677 677 a.run (name, version, where); … … 718 718 //cout << "#2" << endl; 719 719 720 a.run (entry, version, path );720 a.run (entry, version, path, true); 721 721 has_package = true; 722 722 … … 764 764 // The structure is with the version directory. 765 765 766 // cout << "#4" << endl;766 // cout << "#4" << endl; 767 767 768 768 a.run (name, version, where); … … 788 788 if (CmtSystem::is_version_directory (version)) 789 789 { 790 // 790 //cout << "#5" << endl; 791 791 792 792 a.run (entry, version, where); … … 801 801 where += entry; 802 802 803 // 803 //cout << "#6" << endl; 804 804 805 805 a.run (name, "v1", where); … … 828 828 p += e; 829 829 830 /*831 for ( j = 1; j < _level; j++) cout << " ";830 831 for (int j = 1; j < _level; j++) cout << " "; 832 832 cout << "Restarting scan_path on p=" << p << endl; 833 */833 834 834 835 835 cout << "#PathScanner::scan_path> Restarting scan_path on p=" << p << endl; -
CMT/HEAD/source/cmt_awk.h
r11 r138 111 111 virtual void run (const cmt_string& package, 112 112 const cmt_string& version, 113 const cmt_string& path) 113 const cmt_string& path, 114 const bool without_version_directory=false) 114 115 { 115 116 } -
CMT/HEAD/source/cmt_parser.cxx
r137 r138 111 111 void run (const cmt_string& package, 112 112 const cmt_string& version, 113 const cmt_string& path); 113 const cmt_string& path, 114 const bool without_version_directory=false); 114 115 }; 115 116 … … 125 126 void run (const cmt_string& package, 126 127 const cmt_string& version, 127 const cmt_string& path); 128 const cmt_string& path, 129 const bool without_version_directory=false); 128 130 private: 129 131 CmtSystem::cmt_string_vector& m_uses; … … 143 145 void run (const cmt_string& package, 144 146 const cmt_string& version, 145 const cmt_string& path); 147 const cmt_string& path, 148 const bool without_version_directory=false); 146 149 int count (); 147 150 … … 155 158 void PackageViewer::run (const cmt_string& package, 156 159 const cmt_string& version, 157 const cmt_string& path) 160 const cmt_string& path, 161 const bool without_version_directory) 158 162 { 159 163 cout << package << " " << version << " " << path << endl; … … 168 172 void PackageSelector::run (const cmt_string& package, 169 173 const cmt_string& version, 170 const cmt_string& path) 174 const cmt_string& path, 175 const bool without_version_directory) 171 176 { 172 177 // … … 235 240 void ClientCollector::run (const cmt_string& package, 236 241 const cmt_string& version, 237 const cmt_string& path) 242 const cmt_string& path, 243 const bool without_version_directory) 238 244 { 239 245 cmt_string dir = path; 240 246 dir += CmtSystem::file_separator (); 241 247 dir += package; 242 dir += CmtSystem::file_separator (); 243 if (version != "" )248 dir += CmtSystem::file_separator (); 249 if (version != "" && ! without_version_directory) 244 250 { 245 251 dir += version; … … 248 254 249 255 cmt_string req; 250 251 req = dir;256 257 req = dir; 252 258 req += "cmt"; 253 259 req += CmtSystem::file_separator (); … … 318 324 CmtSystem::split (line, " \t", words); 319 325 320 if ((words.size () > 2) && (words[0] == "use"))326 if ((words.size () >= 2) && (words[0] == "use")) 321 327 { 322 328 if ((words[1] == m_package) && 323 ( (words[2] == m_version) || (m_version == "")))329 ( (m_version == "") || (words[2] == m_version))) 324 330 { 325 331 cout << "# " << package << " " << version << " " << path; 326 if (m_version == "" )332 if (m_version == "" && words.size () > 2) 327 333 { 328 334 cout << " (use version " << words[2] << ")"; … … 3288 3294 void Cmt::do_show_clients (const ArgParser& ap) 3289 3295 { 3290 cmt_string package ;3291 cmt_string version ;3292 cmt_string path_name ;3293 3294 if (ap.arguments.size () >= 1) package = ap.arguments[0];3295 if (ap.arguments.size () >= 2) version = ap.arguments[1];3296 cmt_string package = ""; 3297 cmt_string version = ""; 3298 cmt_string path_name = ""; 3299 3300 if (ap.arguments.size () >= 1) package = ap.arguments[0]; 3301 if (ap.arguments.size () >= 2) version = ap.arguments[1]; 3296 3302 if (ap.arguments.size () >= 3) path_name = ap.arguments[2]; 3297 3303 … … 3299 3305 ClientCollector collector (package, version); 3300 3306 3301 clear ();3307 clear (); 3302 3308 configure (); 3303 3309 … … 3554 3560 if (ap.arguments.size () > 0) path_name = ap.arguments[0]; 3555 3561 3556 PathScanner scanner;3562 PathScanner scanner; 3557 3563 PackageViewer viewer; 3558 3564 -
CMT/HEAD/source/cmt_project.cxx
r136 r138 204 204 sep = CmtSystem::path_separator (); 205 205 206 cmt_string cmtprojectpath = Symbol::get_env_value ("CMTPROJECTPATH"); 206 cmt_string cmtprojectpath = Symbol::get_env_value ("CMTPROJECTPATH"); 207 207 CmtSystem::cmt_string_vector items; 208 208 CmtSystem::split (cmtprojectpath, sep, items); … … 978 978 for (i = 0; i < Projects.size (); i++) 979 979 { 980 Project& p = Projects[i];980 Project& p = Projects[i]; 981 981 p.m_visited = false; 982 982 } … … 985 985 { 986 986 const Project& project = Projects[i]; 987 987 988 988 const cmt_string& p = project.m_cmtpath; 989 989 scanner.scan_path (p, a);
Note: See TracChangeset
for help on using the changeset viewer.