Changeset 528 for CMT/HEAD/source


Ignore:
Timestamp:
Nov 25, 2009, 12:11:28 PM (15 years ago)
Author:
rybkin
Message:

See C.L. 415

Location:
CMT/HEAD/source
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_awk.cxx

    r461 r528  
    648648
    649649      if ((level == 0) && (entry == "InstallArea")) continue;
    650       if (entry == "CVS") continue;
     650      if (entry == ".svn" || entry == "CVS") continue;
    651651
    652652      cmt_string req;
     
    742742                  // The structure is without the version directory.
    743743                 
    744                   a.run (name, "v1", path);
     744                  if (!Package::get_version (version, vreq))
     745                    version = "v*";
     746
     747                  a.run (name, version, path, true);
     748                  //              a.run (name, "v1", path);
    745749                  has_package = true;
    746750                 
  • CMT/HEAD/source/cmt_commands.cxx

    r525 r528  
    14221422          if (argc > 0)
    14231423            {
    1424               cmt.m_current_target = fill_one_argument ();
     1424              fill_arguments ();
     1425              //              cmt.m_current_target = fill_one_argument ();
    14251426            }
    14261427
     
    22412242  help_texts.add () =  "show  author            :  package author";
    22422243  help_texts.add () =  "show  branches          :  added branches";
    2243   help_texts.add () =  "show  clients           :  package clients";
     2244  help_texts.add () =  "show  clients <package> [<version> [<path>]] :  clients of <package> [of <version> [in <path>]]";
    22442245  help_texts.add () =  "show  cmtpath_patterns  :  cmtpath_patterns";
    22452246  help_texts.add () =  "show  constituent <name>:  constituent definition";
    22462247  help_texts.add () =  "show  constituent_names :  constituent names";
    22472248  help_texts.add () =  "show  constituents      :  constituent definitions";
     2249  help_texts.add () =  "show  container         :  container package of current project";
    22482250  help_texts.add () =  "show  cycles            :  cycles in the use graph";
    22492251  help_texts.add () =  "show  fragment <name>   :  one fragment definition";
     
    22582260  help_texts.add () =  "show  macros            :  all macro definitions";
    22592261  help_texts.add () =  "show  manager           :  package manager";
    2260   help_texts.add () =  "show  packages          :  packages reachable from the current context";
     2262  help_texts.add () =  "show  packages [<path>]... :  packages reachable from the current context [or <path>s]";
    22612263  help_texts.add () =  "show  path [-d]         :  the package search paths list [in detail]";
    22622264  help_texts.add () =  "show  pattern <name>    :  the pattern definition and usages";
     
    22732275  help_texts.add () =  "show  strategies        :  all strategies (build & version)";
    22742276  help_texts.add () =  "show  tags              :  all currently active tags";
    2275   help_texts.add () =  "show  use_paths <pack>  :  all paths to the used package";
     2277  help_texts.add () =  "show  use_paths <package> :  all use paths to the used <package>";
    22762278  help_texts.add () =  "show  uses              :  used packages";
    22772279  help_texts.add () =  "show  version           :  version of the current package";
    2278   help_texts.add () =  "show  versions <name>   :  visible versions of the selected package";
     2280  help_texts.add () =  "show  versions <package> :  visible versions of the selected <package>";
    22792281  help_texts.add () =  "system                  : display the system tag";
    22802282  help_texts.add () =  "unlock [<p> <v> [<path>]] : unlock a package";
  • CMT/HEAD/source/cmt_error.cxx

    r496 r528  
    2121    error_names.add() = "symbol not found";
    2222    error_names.add() = "pattern not found";
     23    error_names.add() = "constituent not found";
     24    error_names.add() = "fragment not found";
     25    error_names.add() = "language not found";
    2326    error_names.add() = "syntax error";
    2427    error_names.add() = "command_not_implemented";
  • CMT/HEAD/source/cmt_error.h

    r496 r528  
    2222    symbol_not_found,
    2323    pattern_not_found,
     24    constituent_not_found,
     25    fragment_not_found,
     26    language_not_found,
    2427    syntax_error,
    2528    command_not_implemented,
  • CMT/HEAD/source/cmt_fragment.cxx

    r459 r528  
    1616#include "cmt_database.h"
    1717#include "cmt_log.h"
     18#include "cmt_error.h"
    1819
    1920/*----------------------------------------------------------*/
     
    138139  if (fragment == 0)
    139140    {
    140       CmtMessage::info ("Fragment " + name + " not found");
     141      cmt_string t (name);
     142      //      t += " is not defined";
     143      CmtError::set (CmtError::fragment_not_found, t);
     144      //      CmtMessage::info ("Fragment " + name + " not found");
    141145      //      cerr << "Fragment " << name << " not found" << endl;
    142146    }
  • CMT/HEAD/source/cmt_language.cxx

    r486 r528  
    1313#include "cmt_system.h"
    1414#include "cmt_database.h"
     15#include "cmt_error.h"
    1516
    1617/*----------------------------------------------------------*/
     
    2627  Language& language = find (name);
    2728
    28   if (language == null ()) return;
    29 
    30   language.show ();
     29  if (language == null ())
     30    {
     31      cmt_string t (name);
     32
     33      CmtError::set (CmtError::language_not_found, t);
     34    }
     35  else
     36    {
     37      language.show ();
     38    }
    3139}
    3240
  • CMT/HEAD/source/cmt_parser.cxx

    r527 r528  
    26872687  //  configure_current_package ();
    26882688
    2689   Generator::build_default_makefile ();
     2689  //  Generator::build_default_makefile ();
    26902690 
    26912691  CmtSystem::cd ("..");   
     
    27142714  install_setup_scripts ();
    27152715  install_cleanup_scripts ();
     2716
     2717  Generator::build_default_makefile ();
    27162718
    27172719  CmtSystem::cd ("..");
     
    37323734  if (symbol == 0)
    37333735    {
    3734       cmt_string t = " ";
    3735       t += target;
    3736       t += " is not defined ";
     3736      cmt_string t (target);
     3737      t += " is not defined";
    37373738
    37383739      CmtError::set (CmtError::symbol_not_found, t);
     
    38813882  configure (ap);
    38823883
    3883   cout << "# ----------- Clients of " << package <<
    3884     " " << version <<
    3885     " " << path_name <<
    3886     endl;
     3884  cout << "# ----------- Clients of " << package
     3885       << (version != "" ? " " + version : "")
     3886       << (path_name != "" ? " (" + path_name + ")": "")
     3887    //    " " << version <<
     3888    //    " " << path_name <<
     3889       << endl;
    38873890
    38883891  if (path_name == "")
     
    39163919        {
    39173920          c->show ();
     3921        }
     3922      else
     3923        {
     3924          cmt_string t (ap.arguments[0]);
     3925          CmtError::set (CmtError::constituent_not_found, t);
    39183926        }
    39193927    }
     
    41384146void Cmt::do_show_packages (const ArgParser& ap)
    41394147{
    4140   cmt_string path_name;
    4141 
    4142   if (ap.arguments.size () > 0) path_name = ap.arguments[0];
    4143 
    41444148  PathScanner   scanner;
    41454149  PackageViewer viewer;
    41464150
    4147   if (path_name == "")
     4151  if (ap.arguments.size () == 0)
    41484152    {
    41494153      Project::scan_paths (scanner, viewer);
     
    41514155  else
    41524156    {
    4153       scanner.scan_path (path_name, viewer);
     4157      for (int i = 0; i < ap.arguments.size (); i++)
     4158        {
     4159          const cmt_string& path_name = ap.arguments[i];
     4160          if (CmtSystem::test_directory (path_name))
     4161            {
     4162              scanner.scan_path (path_name, viewer);
     4163            }
     4164          else
     4165            {
     4166              CmtMessage::warning ("No such directory: " + path_name);
     4167              CmtError::set (CmtError::path_not_found, path_name);
     4168            }
     4169        }
    41544170    }
    41554171}
     
    43784394  Use* current = &(Use::current());
    43794395
    4380   current->get_all_clients (to_name);
     4396  if (!current->get_all_clients (to_name))
     4397    CmtError::set (CmtError::package_not_found, to_name);
    43814398}
    43824399
  • CMT/HEAD/source/cmt_project.cxx

    r526 r528  
    14221422  static ProjectVector& Projects = projects ();
    14231423
     1424  bool found (false);
    14241425  for (int i = 0; i < Projects.size (); i++)
    14251426    {
     
    14271428
    14281429      const cmt_string& p = project.m_cmtpath;
    1429       scanner.scan_package (p, name);
    1430     }
     1430      if (scanner.scan_package (p, name))
     1431        found = true;
     1432    }
     1433
     1434  if (!found)
     1435    CmtError::set (CmtError::package_not_found, name);
    14311436}
    14321437
  • CMT/HEAD/source/cmt_system.cxx

    r527 r528  
    24502450  /*
    24512451   * The idea and, to some extent, implementation of this function
    2452    * was borrowed from the GNU core utilities of the Free Software Foundation
     2452   * were borrowed from the GNU core utilities of the Free Software Foundation
    24532453   * http://www.gnu.org/software/coreutils/
    24542454   */
  • CMT/HEAD/source/cmt_use.cxx

    r515 r528  
    35133513  if (use == 0)
    35143514    {
    3515       CmtMessage::warning ("No access to " + to_name);
    3516       //      cerr << "#CMT> No access to " << to_name << endl;
     3515      //      CmtMessage::warning ("No access to " + to_name);
    35173516      return (false);
    35183517    }
Note: See TracChangeset for help on using the changeset viewer.