Changeset 8 for CMT


Ignore:
Timestamp:
Mar 3, 2005, 5:23:09 PM (19 years ago)
Author:
arnault
Message:

Add release conflict detection - CL 255

Location:
CMT/v1r19
Files:
7 deleted
15 edited

Legend:

Unmodified
Added
Removed
  • CMT/v1r19/CVS/Entries

    r7 r8  
    1 /ChangeLog/1.330/Mon Feb 14 13:12:44 2005//
    2 D
     1D/Visual////
     2D/contrib////
     3D/demo////
     4D/doc////
     5D/fragments////
     6D/grafviz////
     7D/java////
     8D/mgr////
     9D/source////
     10D/src////
     11/ChangeLog/1.331/Thu Mar  3 10:24:59 2005//
  • CMT/v1r19/ChangeLog

    r5 r8  
     12005-03-03  Christian Arnault  <arnault@lal.in2p3.fr> 255
     2
     3        * source/cmt_project.cxx (add): Manage project release conflicts.
     4
     5        * source/cmt_error.h (class CmtError): Add project_release_conflict error
     6        * source/cmt_error.cxx (class Error): Add project_release_conflict error
     7
     8        * source/cmt_project.h (class Project): Introduce the management of release information in projects
     9
     10        * source/cmt_parser.cxx (do_check_configuration): Finally suppress the checking of CMTCONFIG
     11        (do_setup): Add do_check_configuration to check some tag settings.
     12
    1132005-03-02  Christian Arnault  <arnault@lal.in2p3.fr> 254
    214
  • CMT/v1r19/contrib/CVS/Entries

    r7 r8  
    44/scenario2.sh/1.1/Wed Sep 13 08:43:59 2000//
    55/scenario4.py/1.1/Thu Jan 18 14:45:16 2001//
    6 D
     6D/cvsmove////
  • CMT/v1r19/doc/CVS/Entries

    r7 r8  
    3232/tbroadcast.html/1.2/Wed Aug 25 09:04:28 2004//
    3333/todo.html/1.4/Wed Aug 25 09:04:28 2004//
    34 D
     34D/Images////
  • CMT/v1r19/mgr/CVS/Entries

    r7 r8  
    5959/srt2cmt.sh/1.5/Mon Dec  4 16:04:23 2000//
    6060/tag.nmake/1.25/Wed Apr 10 15:48:30 2002//
    61 D
     61D/fragments////
  • CMT/v1r19/source/CVS/Entries

    r7 r8  
    77/cmt_cmtpath_pattern.cxx/1.1/Thu Sep 30 16:21:12 2004//
    88/cmt_cmtpath_pattern.h/1.1/Thu Sep 30 16:21:12 2004//
    9 /cmt_commands.cxx/1.5/Mon Feb  7 10:35:03 2005//
    109/cmt_commands.h/1.1/Sun Oct 24 23:00:36 2004//
    1110/cmt_constituent.cxx/1.3/Tue Dec 14 14:17:25 2004//
     
    1716/cmt_deps_builder.cxx/1.1/Thu Sep 30 16:21:12 2004//
    1817/cmt_deps_builder.h/1.1/Thu Sep 30 16:21:12 2004//
    19 /cmt_error.cxx/1.1/Thu Sep 30 16:21:12 2004//
    20 /cmt_error.h/1.1/Thu Sep 30 16:21:13 2004//
    2118/cmt_fragment.cxx/1.1/Thu Sep 30 16:21:13 2004//
    2219/cmt_fragment.h/1.1/Thu Sep 30 16:21:13 2004//
     
    4441/cmt_model.cxx/1.1/Thu Sep 30 16:21:14 2004//
    4542/cmt_model.h/1.1/Thu Sep 30 16:21:14 2004//
    46 /cmt_parser.cxx/1.10/Tue Dec 14 14:17:25 2004//
    4743/cmt_parser.h/1.3/Wed Dec  1 11:26:52 2004//
    4844/cmt_pattern.cxx/1.1/Thu Sep 30 16:21:14 2004//
    4945/cmt_pattern.h/1.1/Thu Sep 30 16:21:14 2004//
    50 /cmt_project.cxx/1.3/Wed Dec  1 11:26:52 2004//
    51 /cmt_project.h/1.2/Wed Dec  1 11:26:52 2004//
    5246/cmt_regexp.cxx/1.1/Thu Sep 30 16:21:15 2004//
    5347/cmt_regexp.h/1.1/Thu Sep 30 16:21:15 2004//
     
    6155/cmt_string.cxx/1.1/Thu Sep 30 16:21:15 2004//
    6256/cmt_string.h/1.1/Thu Sep 30 16:21:15 2004//
    63 /cmt_symbol.cxx/1.2/Sun Oct 24 23:00:36 2004//
    64 /cmt_symbol.h/1.1/Thu Sep 30 16:21:15 2004//
    65 /cmt_syntax.cxx/1.3/Wed Dec  1 11:26:52 2004//
    6657/cmt_syntax.h/1.2/Sun Oct 24 23:00:36 2004//
    67 /cmt_system.cxx/1.4/Mon Feb  7 10:39:05 2005//
    6858/cmt_system.h/1.1/Thu Sep 30 16:21:16 2004//
    69 /cmt_tag.cxx/1.2/Tue Nov  2 02:17:57 2004//
    70 /cmt_tag.h/1.1/Thu Sep 30 16:21:17 2004//
    7159/cmt_triggers.cxx/1.1/Thu Sep 30 16:21:17 2004//
    7260/cmt_triggers.h/1.1/Thu Sep 30 16:21:17 2004//
     
    7563/cmt_vector.h/1.1/Thu Sep 30 16:21:17 2004//
    7664/cmt_vector_iterator.h/1.1/Thu Sep 30 16:21:17 2004//
    77 /cmt_version.h/1.3/Wed Dec  1 11:26:52 2004//
    7865/install.cxx/1.1/Thu Sep 30 16:21:17 2004//
    7966/install_resource.h/1.1/Thu Sep 30 16:21:17 2004//
    8067/install_utils.cxx/1.1/Thu Sep 30 16:21:18 2004//
    8168/install_utils.h/1.1/Thu Sep 30 16:21:18 2004//
     69/cmt_commands.cxx/1.6/Wed Mar  2 09:45:29 2005//
     70/cmt_error.cxx/1.2/Wed Mar  2 09:43:11 2005//
     71/cmt_error.h/1.2/Wed Mar  2 09:42:17 2005//
     72/cmt_parser.cxx/1.11/Wed Mar  2 15:23:24 2005//
     73/cmt_project.cxx/1.4/Wed Mar  2 14:00:36 2005//
     74/cmt_project.h/1.3/Wed Mar  2 13:47:55 2005//
     75/cmt_symbol.cxx/1.3/Wed Mar  2 16:33:53 2005//
     76/cmt_symbol.h/1.2/Wed Mar  2 16:31:44 2005//
     77/cmt_syntax.cxx/1.4/Tue Mar  1 11:15:50 2005//
     78/cmt_system.cxx/1.5/Tue Feb 15 16:23:24 2005//
     79/cmt_tag.cxx/1.3/Tue Mar  1 17:18:54 2005//
     80/cmt_tag.h/1.2/Tue Mar  1 16:52:15 2005//
     81/cmt_version.h/1.4/Tue Mar  1 08:42:29 2005//
    8282D
  • CMT/v1r19/source/cmt_error.cxx

    r3 r8  
    3434    error_names.add() = "conflicting_lock";
    3535    error_names.add() = "unknown_command";
     36    error_names.add() = "project_release_conflict";
    3637  }
    3738
  • CMT/v1r19/source/cmt_error.h

    r3 r8  
    3535    cannot_remove_lock,
    3636    conflicting_lock,
    37     unknown_command
     37    unknown_command,
     38    project_release_conflict
    3839  } code;
    3940
  • CMT/v1r19/source/cmt_parser.cxx

    r3 r8  
    19971997      cerr << "#CMT> The CMTSITE value " << env << " is not used in any tag expression. Please check spelling" << endl;
    19981998    }
    1999 
    2000   env = CmtSystem::getenv ("CMTCONFIG");
    2001   if (env == "")
    2002     {
    2003       return;
    2004     }
    2005 
    2006   tag = Tag::find (env);
    2007   if (tag == 0)
    2008     {
    2009       return;
    2010     }
    2011 
    2012   if (!Tag::check_tag_used (tag) && !Symbol::check_tag_used (tag))
    2013     {
    2014       cerr << "#CMT> The CMTCONFIG value " << env << " is not used in any tag expression. Please check spelling" << endl;
    2015     }
    20161999}
    20172000
     
    39593942  //cerr << "buffer = " << buffer << endl;
    39603943  Use& use = Use::current();
     3944  bool save_quiet = Me.m_quiet;
     3945  Me.m_quiet = true;
    39613946  SyntaxParser::parse_requirements_text (buffer, "", &use);
     3947  Me.m_quiet = save_quiet;
    39623948}
    39633949
  • CMT/v1r19/source/cmt_project.cxx

    r3 r8  
    1616#include "cmt_syntax.h"
    1717#include "cmt_tag.h"
     18#include "cmt_error.h"
    1819
    1920class ProjectReader : public Awk
     
    128129  if (!CmtSystem::cd (compressed_path)) return;
    129130
     131  cmt_string name;
     132  cmt_string release;
     133  CmtSystem::basename (compressed_path, release);
     134
    130135  //
    131136  // Figure out if this is the current project
     
    149154      reader.run (text);
    150155
    151       cmt_string name = reader.get_project_name ();
     156      name = reader.get_project_name ();
    152157      if (name == "")
    153158        {
     159          CmtSystem::dirname (compressed_path, name);
     160          CmtSystem::basename (name, name);
     161
     162          /*
    154163          char buffer[20];
    155164          m_id++;
    156165          sprintf (buffer, "Project%d", m_id);
    157166          name = buffer;
    158         }
    159 
    160       project = Project::add (name);
    161 
     167          */
     168        }
    162169    }
    163170  else
     
    167174        {
    168175          strcpy (buffer, "CMT");
     176          name = buffer;
    169177        }
    170178      else
    171179        {
    172           m_id++;
    173           sprintf (buffer, "Project%d", m_id);
    174         }
    175       project = Project::add (buffer);
    176     }
     180          CmtSystem::dirname (compressed_path, name);
     181          CmtSystem::basename (name, name);
     182          //m_id++;
     183          //sprintf (buffer, "Project%d", m_id);
     184        }
     185    }
     186
     187  project = Project::add (name, release);
    177188
    178189  if (source == "default path")
     
    337348
    338349//----------------------------------------------------------
    339 Project* Project::add (const cmt_string& name)
     350Project* Project::add (const cmt_string& name,
     351                       const cmt_string& release)
    340352{
    341353  static ProjectVector& Projects = projects ();
     
    349361    if (project != 0)
    350362      {
     363        if (!Cmt::get_quiet ())
     364          {
     365            if (release != project->get_release ())
     366              {
     367                cerr << "#CMT> Project " << name << " requested with conflicting releases " << project->get_release () << " and " << release << endl;
     368                CmtError::set (CmtError::project_release_conflict, name);
     369              }
     370          }
     371
     372        // Project objects are recreated here to follow the hierarchy
     373        // This duplication is needed for properly applying the strategies
    351374        Project& p = Projects.add ();
    352375
    353376        project->set_reference (&p);
    354377        p.set_name (name);
     378        p.set_release (release);
    355379
    356380        return (&p);
     381
     382        //return (project);
    357383      }
    358384  }
     
    360386  Project& project = Projects.add ();
    361387  project.set_name (name);
     388  project.set_release (release);
    362389
    363390  return (&project);
     
    613640
    614641//----------------------------------------------------------
     642const cmt_string& Project::get_release () const
     643{
     644  return (m_release);
     645}
     646
     647//----------------------------------------------------------
    615648const cmt_string& Project::get_cmtpath () const
    616649{
     
    638671
    639672//----------------------------------------------------------
     673void Project::set_release (const cmt_string& release)
     674{
     675  m_release = release;
     676}
     677
     678//----------------------------------------------------------
    640679void Project::set_cmtpath (const cmt_string& path)
    641680{
     
    671710{
    672711  m_name = "";
     712  m_release = "";
    673713  m_cmtpath = "";
    674714  m_cmtpath_pwd = "";
     
    814854  //   +             the new project is then parsed ... etc...
    815855
    816   // Question : do we consider by default pwd/../.. ???
    817 
    818856  cmt_string cmtprojectpath = CmtSystem::getenv ("CMTPROJECTPATH");
    819857  cmt_string sep;
     
    884922    }
    885923
    886   cout << m_name << " (in " << m_cmtpath << ")";
     924  cout << m_name << " " << m_release << " (in " << m_cmtpath << ")";
    887925
    888926  if (is_current) cout << " (current)";
  • CMT/v1r19/source/cmt_project.h

    r3 r8  
    4747  static Project* find_by_cmtpath (const cmt_string& cmtpath);
    4848  static Project* get_current ();
    49   static Project* add (const cmt_string& name);
     49  static Project* add (const cmt_string& name,
     50                       const cmt_string& release);
    5051
    5152  static ProjectVector& projects ();
     
    7172
    7273  const cmt_string& get_name () const;
     74  const cmt_string& get_release () const;
    7375  const cmt_string& get_cmtpath () const;
    7476  const cmt_string& get_cmtpath_pwd () const;
    7577  const cmt_string& get_cmtpath_source () const;
    76   void set_name (const cmt_string& new_name);
     78  void set_name (const cmt_string& name);
     79  void set_release (const cmt_string& release);
    7780  void set_cmtpath (const cmt_string& path);
    7881  void set_cmtpath_pwd (const cmt_string& path);
     
    98101private:
    99102  cmt_string m_name;
     103  cmt_string m_release;
    100104
    101105  Project* m_reference;
  • CMT/v1r19/src/CVS/Entries

    r7 r8  
    1616/setup.tcsh/1.18/Tue Aug 31 14:43:20 2004//
    1717/setup.zsh/1.25/Wed Aug 25 09:04:34 2004//
    18 D
     18D/demo////
  • CMT/v1r19/src/demo/CVS/Entries

    r7 r8  
    44/tprivate.out/1.2/Fri Jun 21 14:47:36 2002//
    55/tproject.cmt/1.2/Wed Aug 25 09:04:34 2004//
    6 D
     6D/demoA////
     7D/demoB////
     8D/demoC////
  • CMT/v1r19/src/demo/demoA/CVS/Entries

    r7 r8  
    66/init.sh/1.2/Wed Aug 25 09:04:34 2004//
    77/requirements/1.11/Wed Aug 25 09:04:34 2004//
    8 D
     8D/fragments////
  • CMT/v1r19/src/demo/demoA/fragments/CVS/Entries

    r7 r8  
    11/rename/1.3/Wed Aug 25 09:04:35 2004//
    22/rename_header/1.3/Wed Aug 25 09:04:35 2004//
    3 D
     3D/nmake////
Note: See TracChangeset for help on using the changeset viewer.