- Timestamp:
- Apr 20, 2011, 4:28:57 PM (13 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r567 r568 1 2011-04-20 <rybkin@lal.in2p3.fr> 451 2 3 * source/cmt_tag.h: In class Tag, in function mark, introduce mandatory 4 argument (to pass context), introduce member m_act_context to hold context 5 of tag activation, use package name, if available 6 * source/cmt_tag.cxx: In function mark, implement use of introduced 7 argument, make use of it in all function mark invocations, in functions 8 unmark_all, restore_tree, mark, add, introduce or enhance debug messages. 9 In function show_definition, print m_act_context with prefix "activated", 10 if does not duplicate already printed information, to provide tag 11 activation context in "cmt show tags" command output 12 * source/cmt_syntax.cxx: In class SyntaxParser, in function 13 parse_requirements, pass tag activation context to class Tag function mark 14 via argument 15 * source/cmt_commands.cxx: In class ArgParser, in functions do_do, 16 option_tag, option_tag_add, option_tag_remove, idem 17 * source/cmt_project.cxx: In class Project function order_all, in class 18 Strategy function update, idem 19 * source/cmt_parser.cxx: In class Cmt, in functions configure_config_tag, 20 configure_hosttype_tag, configure_site_tag, restore_all_tags, 21 configure_tags, configure_uname_tag, configure_devenv_tag, 22 configure_version_tag, load, reach_current_package, use_extra_file, idem. 23 In class Cmt, in function do_check_configuration, for standalone package, 24 if current use is outside CMTPATH (and action is not action_setup) do not 25 issue warning or set error 26 1 27 2011-04-18 <rybkin@lal.in2p3.fr> 450 2 28 -
CMT/HEAD/source/cmt_commands.cxx
r565 r568 1054 1054 Tag* tag; 1055 1055 tag = Tag::add (tag_name, PriorityUserTag, "action", 0); 1056 tag->mark ( );1056 tag->mark ("action"); 1057 1057 } 1058 1058 … … 2041 2041 2042 2042 tag = Tag::add (a, PriorityArgument, "arguments", 0); 2043 tag->mark ( );2043 tag->mark ("arguments"); 2044 2044 cmt.m_extra_tags += a; 2045 2045 cmt.m_extra_tags += ","; … … 2079 2079 tag = Tag::add (a, PriorityUserTag, "arguments", 0); 2080 2080 2081 tag->mark ( );2081 tag->mark ("arguments"); 2082 2082 2083 2083 cmt.m_extra_tags += a; … … 2171 2171 //<< cmt.m_current_tag << endl; 2172 2172 2173 tag = Tag::add (a, PriorityTag, " restore configuration", 0);2173 tag = Tag::add (a, PriorityTag, "arguments", 0); 2174 2174 } 2175 2175 else 2176 2176 { 2177 tag = Tag::add (a, PriorityUserTag, " restore configuration", 0);2177 tag = Tag::add (a, PriorityUserTag, "arguments", 0); 2178 2178 } 2179 2179 2180 tag->mark ( );2180 tag->mark ("arguments"); 2181 2181 } 2182 2182 } -
CMT/HEAD/source/cmt_parser.cxx
r567 r568 613 613 614 614 tag = Tag::add (Me.m_cmt_config, PriorityConfig, "CMTCONFIG", 0); 615 tag->mark ( );615 tag->mark ("CMTCONFIG"); 616 616 } 617 617 } … … 1230 1230 1231 1231 tag = Tag::add (hosttype, PriorityUname, "HOSTTYPE", 0); 1232 tag->mark ( );1232 tag->mark ("HOSTTYPE"); 1233 1233 } 1234 1234 } … … 1251 1251 { 1252 1252 cmt_string s = "CMTSITE"; 1253 cmt_string t = s; 1253 1254 1254 1255 if (use != 0) 1255 1256 { 1256 s += " in "; 1257 //s += " in "; 1258 t = use->get_package_name (); 1257 1259 } 1258 1260 … … 1260 1262 1261 1263 tag = Tag::add (Me.m_cmt_site, PrioritySite, s, use); 1262 tag->mark ( );1264 tag->mark (t); 1263 1265 } 1264 1266 } … … 1278 1280 { 1279 1281 cmt_string s = "CMTEXTRATAGS"; 1282 cmt_string t = s; 1280 1283 1281 1284 if (use != 0) 1282 1285 { 1283 s += " in "; 1286 //s += " in "; 1287 t = use->get_package_name (); 1284 1288 } 1285 1289 … … 1302 1306 tag = Tag::add (a, PriorityUserTag, s, use); 1303 1307 1304 tag->mark ( );1308 tag->mark (t); 1305 1309 } 1306 1310 } … … 1353 1357 1354 1358 cmt_string s = "CMTCONFIG"; 1359 cmt_string t = s; 1355 1360 1356 1361 if (use != 0) 1357 1362 { 1358 s += " in "; 1359 } 1360 1363 //s += " in "; 1364 t = use->get_package_name (); 1365 } 1366 1361 1367 Tag* tag; 1362 1368 1363 1369 tag = Tag::add (config_tag, PriorityConfig, s, use); 1364 tag->mark ( );1370 tag->mark (t); 1365 1371 1366 1372 //Me.m_current_tag = config_tag; … … 1379 1385 1380 1386 tag = Tag::add (uname, PriorityUname, "uname", 0); 1381 tag->mark ( );1387 tag->mark ("uname"); 1382 1388 } 1383 1389 } … … 1444 1450 1445 1451 tag = Tag::add (devenv, PriorityUname, "devenv", 0); 1446 tag->mark ( );1452 tag->mark ("devenv"); 1447 1453 } 1448 1454 } … … 1464 1470 1465 1471 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 1466 tag->mark ( );1472 tag->mark ("CMTVERSION"); 1467 1473 1468 1474 sprintf (temp, "CMTr%d", r); 1469 1475 1470 1476 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 1471 tag->mark ( );1477 tag->mark ("CMTVERSION"); 1472 1478 1473 1479 sprintf (temp, "CMTp%d", p); 1474 1480 1475 1481 tag = Tag::add (temp, PriorityVersion, "CMTVERSION", 0); 1476 tag->mark ( );1482 tag->mark ("CMTVERSION"); 1477 1483 1478 1484 } … … 2709 2715 { 2710 2716 if (action_setup != get_action () && 2717 none_style != use.style && 2711 2718 0 == Project::find_in_cmt_paths (use.real_path).size ()) 2712 2719 { … … 6013 6020 6014 6021 tag = Tag::add (tag_name, PriorityTag, "load", 0); 6015 tag->mark ( );6022 tag->mark ("load"); 6016 6023 } 6017 6024 … … 6177 6184 6178 6185 tag = Tag::add (env, PriorityConfig, "load", 0); 6179 tag->mark ( );6186 tag->mark ("load"); 6180 6187 Me.m_current_tag = env; 6181 6188 … … 7836 7843 7837 7844 tag = Tag::add (env, PriorityConfig, "reach current package", 0); 7838 tag->mark ( );7845 tag->mark (use.get_package_name ()); 7839 7846 //Me.m_current_tag = env; 7840 7847 … … 7974 7981 7975 7982 tag = Tag::add (env, PriorityConfig, "reach current package", 0); 7976 tag->mark ( );7983 tag->mark (use.get_package_name ()); 7977 7984 //Me.m_current_tag = env; 7978 7985 -
CMT/HEAD/source/cmt_project.cxx
r565 r568 1029 1029 1030 1030 tag = Tag::add (p.get_name (), PriorityConfig, "PROJECT", 0); 1031 tag->mark ( );1031 tag->mark ("PROJECT"); 1032 1032 } 1033 1033 else if (p.is_current ()) … … 3339 3339 3340 3340 m_off_tag->unmark (); 3341 m_on_tag->mark ( );3341 m_on_tag->mark ("PROJECT"); 3342 3342 } 3343 3343 -
CMT/HEAD/source/cmt_syntax.cxx
r561 r568 1471 1471 { 1472 1472 cmt_string name ("container_package"); 1473 cmt_string context ( "PROJECT " + p->get_name () + " ");1473 cmt_string context (p->get_name ()); 1474 1474 Tag* tag = Tag::find (name); 1475 1475 if (tag == 0) … … 1477 1477 tag = Tag::add (name, PriorityUserTag, context, use); 1478 1478 } 1479 tag->mark ( );1479 tag->mark (use->get_package_name()); 1480 1480 } 1481 1481 } -
CMT/HEAD/source/cmt_tag.cxx
r549 r568 36 36 m_selected = false; 37 37 m_def_use = 0; 38 //m_act_context = ""; 38 39 } 39 40 … … 44 45 45 46 int tag_number; 47 48 Log; 49 log << "Unmarking all tags (" << vector.size () << ")" << log_endl; 46 50 47 51 for (tag_number = 0; tag_number < vector.size (); tag_number++) … … 62 66 63 67 int tag_number; 68 69 Log; 70 log << "Restore tags tree (" << vector.size () << ")" << log_endl; 64 71 65 72 for (tag_number = 0; tag_number < vector.size (); tag_number++) … … 77 84 Tag* ref = tag->m_tag_refs[number]; 78 85 79 ref->mark ( );86 ref->mark (""); 80 87 } 81 88 } … … 85 92 86 93 /*----------------------------------------------------------*/ 87 void Tag::mark () 94 void Tag::mark (const cmt_string& context) 95 //void Tag::mark () 88 96 { 89 97 if (!is_primary ()) return; … … 130 138 131 139 m_selected = true; 132 133 log << "Marking tag[" << this << "] " << m_name << " p=" << m_priority << log_endl; 140 if (context.size () != 0) 141 m_act_context = context; 142 143 log << "Marking tag[" << this << "] " << m_name << " p=" << m_priority 144 << " context=" << context << log_endl; 134 145 135 146 if (m_tag_refs.size () > 0) … … 141 152 Tag* ref = m_tag_refs[number]; 142 153 143 ref->mark ( );154 ref->mark (context); 144 155 } 145 156 } … … 181 192 if (tag->is_selected ()) // it was previously selected 182 193 { 183 ref->mark ( );194 ref->mark (use ? use->get_package_name () : ""); 184 195 } 185 196 } … … 219 230 } 220 231 221 tag->mark ( );232 tag->mark (use ? use->get_package_name () : ""); 222 233 } 223 234 } … … 434 445 } 435 446 436 log << "re-adding tag[" << tag << "] " << name << " p=" << priority << log_endl; 437 447 log << "re-adding tag[" << tag << "] " << name << " p=" << priority 448 << " context=" << context << (use != 0 ? " " + use->get_info () : "") << log_endl; 449 438 450 return (tag); 439 451 } … … 444 456 map.add (name, tag_object); 445 457 446 log << "adding tag[" << tag << "] " << name << " p=" << priority << log_endl; 447 458 log << "adding tag[" << tag << "] " << name << " p=" << priority 459 << " context=" << context << (use != 0 ? " " + use->get_info () : "") << log_endl; 460 448 461 tag->clear (); 449 462 … … 601 614 m_def_use (0), 602 615 m_set_use (0), 616 m_act_context (""), 603 617 m_priority (0) 604 618 { … … 619 633 m_def_use = other.m_def_use; 620 634 m_set_use = other.m_set_use; 635 m_act_context = other.m_act_context; 621 636 m_ref_uses = other.m_ref_uses; 622 637 m_priority = other.m_priority; … … 636 651 m_def_use = other.m_def_use; 637 652 m_set_use = other.m_set_use; 653 m_act_context = other.m_act_context; 638 654 m_ref_uses = other.m_ref_uses; 639 655 m_priority = other.m_priority; … … 656 672 m_def_use = 0; 657 673 m_set_use = 0; 674 m_act_context = ""; 658 675 m_ref_uses.clear (); 659 676 m_context = ""; … … 742 759 { 743 760 out << " (from "; 744 if (m_context != "use") out << m_context ;761 if (m_context != "use") out << m_context + " in "; 745 762 out << "package " << m_def_use->get_package_name () << ")"; 746 763 } … … 806 823 out << "]"; 807 824 } 825 if (m_act_context.size () != 0 && 826 (m_def_use != 0 && 827 m_act_context != m_context && 828 m_act_context != m_def_use->get_package_name () || 829 m_def_use == 0 && 830 m_act_context != m_context)) 831 out << " activated " << m_act_context; 808 832 } 809 833 out << endl; -
CMT/HEAD/source/cmt_tag.h
r549 r568 51 51 void add_ref_use (Use* use); 52 52 void unmark (); 53 void mark (); 53 void mark (const cmt_string& context); 54 //void mark (); 54 55 void show_definition (bool quiet, ostream& out = cout, 55 56 const cmt_string& prefix = "") const; … … 74 75 Use* m_def_use; 75 76 Use* m_set_use; 77 cmt_string m_act_context; 76 78 Use::UsePtrVector m_ref_uses; 77 79 int m_priority;
Note: See TracChangeset
for help on using the changeset viewer.