Changeset 159 for CMT


Ignore:
Timestamp:
Mar 14, 2006, 5:32:37 PM (18 years ago)
Author:
arnault
Message:

Switch checkout sequence from multi-co to multi update - CL 300

File:
1 edited

Legend:

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

    r158 r159  
    10361036
    10371037  /**
    1038      Construct CVS management files in the top directory. This is needed
    1039      if the top directory of a product is empty. (In this case the
    1040      co -l results in nothing)
    1041    */
    1042   void make_management_files (const cmt_string& module,
    1043                               const cmt_string& entries_text)
    1044   {
    1045     if (!CmtSystem::test_directory ("CVS"))
    1046       {
    1047         /**
    1048          * The CVS repository had not been created (this is generally
    1049          * due to the lack of top files)
    1050          */
    1051 
    1052         if (!mkdir ("CVS")) return;
    1053 
    1054         CmtSystem::cd ("..");
    1055 
    1056         cmt_string s;
    1057        
    1058         // Let's create first the CVS/Root file.
    1059        
    1060         CmtSystem::get_cvsroot (s);
    1061         s += "\n";
    1062        
    1063         cmt_string f;
    1064        
    1065         f = "CVS";
    1066         f += CmtSystem::file_separator ();
    1067         f += "Root";
    1068        
    1069         if (m_simulation)
    1070           {
    1071             cout << "#CMT> Would fill in the CVS/Root file with " << endl;
    1072             cout << s << endl;
    1073           }
    1074         else
    1075           {
    1076             if (m_verbose)
    1077               {
    1078                 cout << "#CMT> Fill in the CVS/Root file with " << endl;
    1079                 cout << s << endl;
    1080               }
    1081             s.write (f);
    1082           }
    1083        
    1084         // Now we create the CVS/Repository file
    1085        
    1086         f = "CVS";
    1087         f += CmtSystem::file_separator ();
    1088         f += "Repository";
    1089        
    1090         CmtSystem::get_cvsroot (s);
    1091         if (s[0] == ':')
    1092           {
    1093             int pos = s.find (1, ":");
    1094             s.erase (0, pos+1);
    1095             pos = s.find (0, ":");
    1096             s.erase (0, pos+1);
    1097           }
    1098         s += "/";
    1099         s += module;
    1100         s += "\n";
    1101        
    1102         if (m_simulation)
    1103           {
    1104             cout << "#CMT> Would fill in the CVS/Repository file with " << endl;
    1105             cout << s << endl;
    1106           }
    1107         else
    1108           {
    1109             if (m_verbose)
    1110               {
    1111                 cout << "#CMT> Fill in the CVS/Repository file with " << endl;
    1112                 cout << s << endl;
    1113               }
    1114             s.write (f);
    1115           }
    1116       }
    1117    
    1118     if (m_simulation)
    1119       {
    1120         cout << "#CMT> Would write the top CVS/Entries file with " << endl;
    1121         cout << entries_text << endl;
    1122       }
    1123     else
    1124       {
    1125         cmt_string entries_file_name;
    1126 
    1127         entries_file_name = "CVS";
    1128         entries_file_name += CmtSystem::file_separator ();
    1129         entries_file_name += "Entries";
    1130    
    1131         cmt_string text;
    1132 
    1133         if (!text.read (entries_file_name))
    1134           {
    1135             // This happens when there were no top files
    1136           }
    1137 
    1138         text += entries_text;
    1139 
    1140         // Now the CVS/Entries is ready to be created.
    1141         if (m_verbose)
    1142           {
    1143             cout << "#CMT> Fill in the top CVS/Entries file with " << endl;
    1144             cout << text << endl;
    1145           }
    1146 
    1147         text.write (entries_file_name);
    1148       }
    1149 
    1150   }
    1151 
    1152   /**
    11531038     Specific checkout of one project
    11541039   */
     
    11911076
    11921077    execute_and_retry (command, "Error getting project CMT contents");
    1193 
    1194     //make_management_files (module, "D/cmt////\n");
    11951078
    11961079    return (true);
Note: See TracChangeset for help on using the changeset viewer.