- Timestamp:
- Apr 25, 2005, 2:02:18 PM (19 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r41 r42 1 2005-04-25 <arnault@lal.in2p3.fr> 270 2 3 * source/cmt_cvs.cxx (class CvsImplementation): Accept empty 4 argument for queries on subprojects 5 6 * source/cmt_cvs.cxx (class CvsImplementation): Accept empty 7 argument for queries on subpackages 8 9 * source/cmt_cvs.cxx (class CvsImplementation): Selection for 10 getting the mudule contents is done using the structure 11 information. 12 13 * source/cmt_cvs.cxx (class CvsImplementation): Isolate specific 14 behaviour into dedicated functions for getting the specific 15 contents for packages or for projects. 16 17 * source/cmt_cvs.cxx (class CvsImplementation): Retrieve fields 18 for structure and subprojects from the CVS pluggin. 19 20 * source/cmt_cvs.cxx (class CvsImplementation): Manage the 21 protocol level related with the version of the CVS pluggin. 22 23 * source/cmt_cvs.cxx (class CvsImplementation): Suppress all dots 24 from the tmpdir due to problems on Windows 25 26 * source/cmt_cvs.cxx (class CvsImplementation): Add support for 27 struture_info and subprojects coming from the new CVS pluggin 28 29 * source/cmt_parser.cxx (do_cvssubprojects): Handle the 30 cvssubprojects command 31 (parser): Commands related with CVS should at least read the 32 requirements file of CMT 33 34 * source/cmt_parser.h (enum): Add cvssubprojects action 35 36 * source/cmt_commands.cxx (CommandHelp): Add help for 37 cvssubprojects command 38 39 * source/cmt_commands.cxx (do_cvssubprojects): Accept empty 40 argument to query for subprojects at top of the repository 41 42 * source/cmt_commands.cxx (do_cvssubpackages): Accept empty 43 argument to query for subpackages at top of the repository 44 45 * source/cmt_commands.cxx (ArgParser): Manage cvssubprojects command. 46 47 * source/cmt_commands.h (class ArgParser): Add cvssubprojects command 48 49 * source/cmt_use.cxx (fill_standard_macros): Production of a new 50 standard macro for obtaining the project releases 51 52 * source/cmt_cvs.h (class Cvs): Add the subprojects function to 53 query CVS about the existing subprojects of a given module. 54 1 55 2005-04-23 Christian Arnault <arnault@lal.in2p3.fr> 269 2 56 -
CMT/HEAD/doc/CMTDoc.html
r29 r42 7 7 tt.cmt {color:#00AA00; font-weight: normal; %background-color: #eeeeee} 8 8 pre {color:#FF0000; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4} 9 pre.cmt { color:#00AA00; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4}9 pre.cmt {font-family: courier; color:#00AA00; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4} 10 10 h2 {color:#0000FF} 11 11 h3 {color:#00AA00} … … 23 23 <center>Christian Arnault</center> 24 24 <center><tt>arnault@lal.in2p3.fr</tt></center></h2> 25 <center><i>Document revision date : 2005-0 3-31</i></center><hr><h2><a href="#index">General index</a></h2>25 <center><i>Document revision date : 2005-04-17</i></center><hr><h2><a href="#index">General index</a></h2> 26 26 <hr><h2><a name="Presentation"></a><a href="#index"><tt> 1</tt></a> - Presentation</h2> 27 27 <blockquote> … … 389 389 platform specific tools will be dynamically reconfigured and 390 390 parameterized transparently. 391 392 391 393 </blockquote> 392 394 </blockquote> 393 395 <hr><h2><a name="Defining and managing projects"></a><a href="#index"><tt> 4</tt></a> - Defining and managing projects</h2> 394 396 <blockquote> 397 395 398 <p>In the CMT terminology, the complete software base is composed 396 399 of CMT packages. Those packages are organized into … … 431 434 packages.</li> 432 435 </ul> 436 433 437 <p>Projects receive detailed descriptions or specifications in a 434 438 dedicated <i>project file</i> … … 438 442 . It can receive the following 439 443 specifications:</p> 440 <pre class="cmt"> 441 project <project-name> [1]444 445 <pre>project <project-name> [1] 442 446 <i>project-use specifications...</i> [2] 443 447 <i>strategy specifications...</i> [3] 444 448 </pre> 449 445 450 <ol> 446 451 <li>The project name specified here takes precedence over the … … 539 544 <p>Every strategy setting defines two mutually exclusive tags 540 545 and activates one of them.</p> 541 <pre class="cmt">546 <pre> 542 547 <project>_<have_item> 543 548 <project>_<have_not_item> </pre> 544 549 <p>Examples</p> 545 <pre class="cmt">550 <pre> 546 551 <project>_prototypes 547 552 <project>_no_prototypes … … 772 777 or (in a <tt>requirements</tt> 773 778 file) 774 <pre class="cmt">779 <pre> 775 780 path_append CMTPATH "/home/arnault/mydev" 776 781 path_append CMTPATH "/ProjectB"</pre> … … 1124 1129 </li> 1125 1130 </ul> 1126 <pre class="cmt">1131 <pre> 1127 1132 use Bar v7r5 [1]</pre> 1128 1133 <i>or</i> 1129 <pre class="cmt">1134 <pre> 1130 1135 use Bar v7r5 A [2]</pre> 1131 1136 <i>or</i> 1132 <pre class="cmt">1137 <pre> 1133 1138 use Bar v7r5 /ProjectB/A [3]</pre> 1134 1139 <p>Given these keys, the referenced package is looked for … … 1164 1169 statement (defined within a given package) 1165 1170 containing : </p> 1166 <pre class="cmt">1171 <pre> 1167 1172 ... 1168 1173 use Bar v7r5 … … 1378 1383 location path of an external software package. Here we take the 1379 1384 example of the Anaphe utility: </p> 1380 <pre class="cmt">1385 <pre> 1381 1386 macro AnapheTOP "" \ 1382 1387 CERN "/afs/cern.ch/sw/lhcxx" \ … … 1649 1654 <tt>target_B</tt> 1650 1655 will in turn be active.</p> 1651 <pre class="cmt">1656 <pre> 1652 1657 library A -target_tag A.cxx 1653 1658 application P -target_tag P.cxx … … 1734 1739 the <tt>set</tt> 1735 1740 statement in a requirements file</li> 1736 <pre class="cmt">1741 <pre> 1737 1742 set CMTSITE "CERN" 1738 1743 set CMTCONFIG "${CMTBIN}" sun "Solaris-CC-dbg"</pre> … … 1741 1746 using the <tt>tag</tt> 1742 1747 statement (in a requirements file): 1743 <pre class="cmt">1748 <pre> 1744 1749 tag newtag tag1 tag2 tag3</pre> 1745 1750 which means that: … … 1757 1762 using the <tt>tag_exclude</tt> 1758 1763 syntax. 1759 <pre class="cmt">1764 <pre> 1760 1765 tag_exclude debug optimized</pre> 1761 1766 This example implies that the two tags <tt>debug</tt> … … 1842 1847 will force the tag <tt>foo</tt> 1843 1848 : 1844 <pre class="cmt">1849 <pre> 1845 1850 tag_apply foo</pre> 1846 1851 <pre> … … 1857 1862 <li> 1858 1863 <i>Implying a tag from another one using the tag association syntax</i> 1859 <pre class="cmt">1864 <pre> 1860 1865 tag Linux foo</pre> 1861 1866 <pre> … … 1873 1878 <i>Through conventionally encoded values of <tt>CMTCONFIG</tt> 1874 1879 </i> 1875 <pre class="cmt">1880 <pre> 1876 1881 tag Linux-foo Linux foo</pre> 1877 1882 <pre> … … 1928 1933 <p>All symbol definitions providing specific values triggered by 1929 1934 the active selectors will be selected, such as in:</p> 1930 <pre class="cmt">1935 <pre> 1931 1936 macro_append cppflags "" \ 1932 1937 debug " -g "</pre> … … 2139 2144 in the <tt> <a HREF='#The requirements file'>requirements</a> </tt> 2140 2145 file : 2141 <pre class="cmt">2146 <pre> 2142 2147 ... 2143 2148 macro Foo_linkopts " -lFoo " \ … … 2282 2287 in <tt>${CMTROOT}/fragments/tex</tt> 2283 2288 .) :</p> 2284 <pre class="cmt">2289 <pre> 2285 2290 ============ tex ===================================== 2286 2291 ${CONSTITUENT} :: ${FILEPATH}/${NAME}.ps … … 2300 2305 's <a HREF="#The requirements file">requirements</a> 2301 2306 file as follows : 2302 <pre class="cmt">2307 <pre> 2303 2308 make_fragment tex -header=tex_header</pre> 2304 2309 where: … … 2317 2322 to include in its <a HREF='#The requirements file'>requirements</a> file a statement similar 2318 2323 to the following: 2319 <pre class="cmt">2324 <pre> 2320 2325 document tex MyDoc -s=../doc doc1.tex doc2.tex </pre> 2321 2326 where: … … 2344 2349 </ol> 2345 2350 <p>The result for our example is: </p> 2346 <pre class="cmt">2351 <pre> 2347 2352 =========== MyDoc.make =============================== 2348 2353 … … 2420 2425 be declared in the 2421 2426 <a HREF='#The requirements file'>requirements</a> file of the provider package as follows: 2422 <pre class="cmt">2427 <pre> 2423 2428 make_fragment <fragment-name> [ options... ] </pre> 2424 2429 where options may be : … … 2549 2554 <li> rootcint 2550 2555 <p>It generates C++ hubs for the Cint interpreter in Root. </p> 2551 <pre class="cmt">2556 <pre> 2552 2557 ========= rootcint ========================================= 2553 2558 $(src)${NAME}.cc :: ${FULLNAME} … … 2558 2563 <p>It generates C++ source files (xxx.g files) from Atlas' AGE 2559 2564 description files. </p> 2560 <pre class="cmt">2565 <pre> 2561 2566 ========= agetocxx ========================================= 2562 2567 output=$(${CONSTITUENT}_output) … … 2572 2577 cd $(bin); $(ar) $(${CONSTITUENT}lib) ${NAME}.o; /bin/rm -f ${NAME}.o 2573 2578 ============================================================ </pre> 2574 <pre class="cmt">2579 <pre> 2575 2580 ========= agetocxx_header ================================== 2576 2581 ${CONSTITUENT}lib = $(bin)lib${CONSTITUENT}.a … … 2595 2600 ============================================================ </pre> 2596 2601 It must be declared as follows : 2597 <pre class="cmt">2602 <pre> 2598 2603 make_fragment agetocxx -suffix=cxx -dependencies -header=agetocxx_header </pre> 2599 2604 </li> … … 2867 2872 and are by default expected from the <tt>../src</tt> 2868 2873 directory</p> 2869 <pre class="cmt">2874 <pre> 2870 2875 library A A.cxx B.cxx</pre> 2871 2876 <p>Then it is possible to change the default search 2872 2877 location as well as to use a simplified wildcarding 2873 2878 syntax:</p> 2874 <pre class="cmt">2879 <pre> 2875 2880 library A -s=A *.cxx -s=B *.cxx</pre> 2876 2881 <ul> … … 2899 2904 regular expressions from general wildcarding 2900 2905 techniques:</p> 2901 <pre class="cmt">2906 <pre> 2902 2907 library A -s=A -x=[0-9] *.cxx -s=B -k=^B *.cxx</pre> 2903 2908 <ul> … … 2931 2936 between the different targets, as in the following 2932 2937 example:</p> 2933 <pre class="cmt">2938 <pre> 2934 2939 library AXt -suffix=Xt *.cxx 2935 2940 library AXaw -suffix=Xaw *.cxx</pre> … … 2944 2949 </tt> 2945 2950 character), such as in the next example:</p> 2946 <pre class="cmt">2951 <pre> 2947 2952 make_fragment doc_to_html (1) 2948 2953 … … 3006 3011 automatically when the default make command is run.</p> 3007 3012 <p>One could, for instance specify within the requirements file :</p> 3008 <pre class="cmt">3013 <pre> 3009 3014 # Constituents belonging to the default <i>all</i> group 3010 3015 … … 3060 3065 and is 3061 3066 declared by the following statement:</p> 3062 <pre class="cmt">3067 <pre> 3063 3068 language fortran90 \ 3064 3069 -suffix=f90 -suffix=F90 \ [1] … … 3100 3105 <tt>for</tt> 3101 3106 macro).</p> 3102 <pre class="cmt">3107 <pre> 3103 3108 macro for "f77" \ 3104 3109 ... … … 3109 3114 , defined as 3110 3115 follows:</p> 3111 <pre class="cmt">3116 <pre> 3112 3117 macro f90 "f90" 3113 3118 ... … … 3119 3124 <tt>-extra_output_suffix</tt> 3120 3125 option like in:</p> 3121 <pre class="cmt">3126 <pre> 3122 3127 language idl -suffix=idl -fragment=idl -extra_output_suffix=_skel</pre> 3123 3128 where, in this case, two object files are produced for each … … 3475 3480 </ul> 3476 3481 <p>Examples of such definition are : </p> 3477 <pre class="cmt">3482 <pre> 3478 3483 package CMT 3479 3484 … … 3510 3515 concept of a generic shell command. 3511 3516 <p>An example of a symple action:</p> 3512 <pre class="cmt">3517 <pre> 3513 3518 action directory "ls $(dir_options)" WIN32 "dir $(dir_options)"</pre> 3514 3519 <p>Like other symbols, actions can be visualized using … … 3552 3557 macro. 3553 3558 <p>Example 1</p> 3554 <pre class="cmt">3559 <pre> 3555 3560 library A ... 3556 3561 action B ... … … 3561 3566 will be rebuilt first. 3562 3567 <p>Example 2</p> 3563 <pre class="cmt">3568 <pre> 3564 3569 library A ... 3565 3570 action B ... … … 3581 3586 <p>Describe the relationships with other packages; the 3582 3587 generic syntax is :</p> 3583 <pre class="cmt">3588 <pre> 3584 3589 use <package> [ <version> [ <offset> ] ]</pre> 3585 3590 <p>Omitting the version specification means that the most … … 3597 3602 CMTPATH).</p> 3598 3603 <p> Examples of such relationships are :</p> 3599 <pre class="cmt">3604 <pre> 3600 3605 use OnX v5r2 3601 3606 use CSet v2r3 … … 3641 3646 ). Suppose 3642 3647 we have the following organization:</p> 3643 <pre class="cmt">3648 <pre> 3644 3649 ---------------- 3645 3650 package A … … 3797 3802 pattern which will apply the include_path statement as 3798 3803 follows:</p> 3799 <pre class="cmt">3804 <pre> 3800 3805 pattern -global include_path include_path ${<package>_root}/<package>/</pre> 3801 3806 <p>For instance, a package named <tt>PackA</tt> 3802 3807 will expand this 3803 3808 pattern as follows:</p> 3804 <pre class="cmt">3809 <pre> 3805 3810 include_path ${PackA_root}/PackA/</pre> 3806 3811 </li> … … 3811 3816 paths must be explicited, through an environment 3812 3817 variable. The following pattern can automate this operation:</p> 3813 <pre class="cmt">3818 <pre> 3814 3819 pattern ld_library_path \ 3815 3820 path_remove LD_LIBRARY_PATH "/<package>/" ; \ … … 3819 3824 would be concerned. These packages will simply have to 3820 3825 apply the pattern as follows:</p> 3821 <pre class="cmt">3826 <pre> 3822 3827 apply_pattern ld_library_path</pre> 3823 3828 <p>The schema installed by this pattern provides first a … … 3835 3840 application. Then every make command would naturally 3836 3841 ensure its actual presence.</p> 3837 <pre class="cmt">3842 <pre> 3838 3843 pattern quality_test application <package>test <package>test.cxx <other_sources></pre> 3839 3844 <p>In this example, an additional pattern … … 3856 3861 <p>Doing so, it is possible to specify custmization 3857 3862 values for user defined template parameters</p> 3858 <pre class="cmt">3863 <pre> 3859 3864 pattern TA macro <base>AAA "AAA" 3860 3865 … … 3867 3872 and thus using the pattern name as a plain CMT 3868 3873 keyword. The previous example becomes: </p> 3869 <pre class="cmt">3874 <pre> 3870 3875 TA base=abc 3871 3876 TA base=def</pre> … … 3902 3907 particular package by using the following 3903 3908 statement:</p> 3904 <pre class="cmt">3909 <pre> 3905 3910 ignore_pattern <name></pre> 3906 3911 </li> … … 3930 3935 </p> 3931 3936 <p>As an example suppose we define</p> 3932 <pre class="cmt">3937 <pre> 3933 3938 path CMTPATH "/ProjectA" 3934 3939 path_append CMTPATH "/ProjectB" … … 3948 3953 <a href="#Generated macros">automatic macros</a> 3949 3954 (automatically setup for all used packages) 3950 <pre class="cmt">3955 <pre> 3951 3956 <package>_cmtpath 3952 3957 <package>_offset</pre> … … 3959 3964 <p>Describe the specific directory branches to be added while 3960 3965 configuring the package.</p> 3961 <pre class="cmt">3966 <pre> 3962 3967 branches <branch-name> ... </pre> 3963 3968 <p> These branches will be created (if needed) at the same … … 4075 4080 <p>Every strategy setting defines two mutually exclusive 4076 4081 tags and activates one of them.</p> 4077 <pre class="cmt">4082 <pre> 4078 4083 <project>_<have_item> 4079 4084 <project>_<have_not_item> </pre> 4080 4085 Examples 4081 <pre class="cmt">4086 <pre> 4082 4087 <project>_prototypes 4083 4088 <project>_no_prototypes … … 4392 4397 file as 4393 4398 follows :</p> 4394 <pre class="cmt">4399 <pre> 4395 4400 tag Foo [1] 4396 4401 tag Bar Foo FooA FooB [2] … … 4775 4780 contain the list of constituent names corresponding to 4776 4781 libraries that must be exported.</p> 4777 <pre class="cmt">4782 <pre> 4778 4783 library Foo ... 4779 4784 library Foo-utils ... … … 5127 5132 <li>Run a shell command described in the macro named <tt>lock_command</tt> 5128 5133 meant to install physical locks onto all files for this version of this package. A typical definition for this macro could be: 5129 <pre class="cmt">5134 <pre> 5130 5135 macro lock_command "chmod -R a-w ../*" \ 5131 5136 WIN32 "attrib /S /D +R ../*"</pre> … … 5539 5544 <li>Run a shell command described in the macro named <tt>unlock_command</tt> 5540 5545 meant to remove physical locks from all files for this version of this package. A typical definition for this macro could be: 5541 <pre class="cmt">5546 <pre> 5542 5547 macro unlock_command "chmod -R g+w ../*" \ 5543 5548 WIN32 "attrib /S /D -R ../*"</pre> … … 5645 5650 appropriate in all projects) is controlled by one option of the 5646 5651 build strategy, which can take one of the two values:</p> 5647 <pre class="cmt">5652 <pre> 5648 5653 build_strategy prototypes 5649 5654 build_strategy no_prototypes</pre> … … 6011 6016 file, containing (among other statements 6012 6017 not shown for the sake of clarity) : 6013 <pre class="cmt">6018 <pre> 6014 6019 package OPACS 6015 6020 … … 6028 6033 package would have just to provide a use 6029 6034 statement like : </p> 6030 <pre class="cmt">6035 <pre> 6031 6036 use OPACS v3 </pre> 6032 6037 <p>This procedure gives the complete benefit of the use … … 6968 6973 <p> 6969 6974 A typical example of how to define such a macro could be : </p> 6970 <pre class="cmt">6975 <pre> 6971 6976 macro Cm_linkopts "-L$(CMROOT)/$(Cm_tag) -lCm -lm" </pre> 6972 6977 </td> … … 6986 6991 . Thus, 6987 6992 a typical definition for this macro could be : 6988 <pre class="cmt">6993 <pre> 6989 6994 macro Cm_stamps "$(Cm_root)/$(Cm_tag)/Cm.stamp" </pre> 6990 6995 <p>Then, these stamp file references are accumulated … … 9753 9758 <hr><h3><a name="The default strategies defined in CMT"></a><a href="#index"><tt>18. 8</tt></a> - The default strategies defined in CMT</h3> 9754 9759 <blockquote> 9755 <pre class="cmt">9760 <pre> 9756 9761 DefaultPrototypesStrategy = Prototypes, 9757 9762 DefaultInstallAreaStrategy = WithoutInstallArea</pre> -
CMT/HEAD/doc/gendoc.py
r11 r42 174 174 print ' tt.cmt {color:#00AA00; font-weight: normal; %background-color: #eeeeee}' 175 175 print ' pre {color:#FF0000; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4}' 176 print ' pre.cmt { color:#00AA00; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4}'176 print ' pre.cmt {font-family: courier; color:#00AA00; background-color: #eeeeee; border-style: solid; border-width: 1; border-color: black; padding: 4}' 177 177 print ' h2 {color:#0000FF}' 178 178 print ' h3 {color:#00AA00}' -
CMT/HEAD/mgr/VisualC.nmake
r32 r42 1 1 CMT_tag=$(tag) 2 2 CMTVERSION=HEAD 3 CMT_project=macro 3 4 cmt_hardware_query_command=uname -m 4 5 cmt_hardware=WIN32 -
CMT/HEAD/mgr/cmt.nmake
r32 r42 3 3 # Application cmt 4 4 # 5 # Generated Sat Apr 02 23:11:18 2005 by arnault5 # Generated Mon Apr 25 12:01:50 2005 by ARNAULT 6 6 # 7 7 #==================================== -
CMT/HEAD/source/cmt.h
r15 r42 126 126 static void do_cvsbranches (const ArgParser& ap); 127 127 static void do_cvssubpackages (const ArgParser& ap); 128 static void do_cvssubprojects (const ArgParser& ap); 128 129 static void do_cvstags (const ArgParser& ap); 129 130 static void do_do (const ArgParser& ap); -
CMT/HEAD/source/cmt_commands.cxx
r37 r42 79 79 pv.push_back (&ArgParser::do_cvsbranches); i++; 80 80 81 parsers.add ("cvss", i);82 parsers.add ("cvssu", i);83 parsers.add ("cvssub", i);84 parsers.add ("cvssubp", i);85 81 parsers.add ("cvssubpa", i); 86 82 parsers.add ("cvssubpac", i); … … 91 87 parsers.add ("cvssubpackages", i); 92 88 pv.push_back (&ArgParser::do_cvssubpackages); i++; 89 90 parsers.add ("cvssubpr", i); 91 parsers.add ("cvssubpro", i); 92 parsers.add ("cvssubproj", i); 93 parsers.add ("cvssubproje", i); 94 parsers.add ("cvssubprojec", i); 95 parsers.add ("cvssubproject", i); 96 parsers.add ("cvssubprojects", i); 97 pv.push_back (&ArgParser::do_cvssubprojects); i++; 93 98 94 99 parsers.add ("cvst", i); … … 832 837 { 833 838 fill_one_argument (); 834 cmt.m_action = action_cvssubpackages; 835 } 836 else 837 { 838 if (!cmt.m_quiet) cerr << "#CMT> syntax error : cvssubpackages arguments missing" << endl; 839 help_action = action_help; 840 cmt.m_action = action_cvssubpackages; 841 } 839 } 840 841 cmt.m_action = action_cvssubpackages; 842 } 843 844 void ArgParser::do_cvssubprojects () 845 { 846 if (argc > 0) 847 { 848 fill_one_argument (); 849 } 850 851 cmt.m_action = action_cvssubprojects; 842 852 } 843 853 … … 2057 2067 help_texts.add () = "create_project <project> <name> [<path>] : create and configure a new project"; 2058 2068 help_texts.add () = "cvsbranches <module> : display the subdirectories for a module"; 2059 help_texts.add () = "cvssubpackagess <module> : display the subpackages for a module"; 2069 help_texts.add () = "cvssubpackages <module> : display the subpackages for a module"; 2070 help_texts.add () = "cvssubprojects <module> : display the subprojects for a module"; 2060 2071 help_texts.add () = "cvstags <module> : display the CVS tags for a module"; 2061 2072 help_texts.add () = "do <action> [<param>=<value>] ... : Execute an action"; … … 2153 2164 help.add (action_cvsbranches, help_texts[action_cvsbranches]); 2154 2165 help.add (action_cvssubpackages, help_texts[action_cvssubpackages]); 2166 help.add (action_cvssubprojects, help_texts[action_cvssubprojects]); 2155 2167 help.add (action_cvstags, help_texts[action_cvstags]); 2156 2168 help.add (action_do, help_texts[action_do]); -
CMT/HEAD/source/cmt_commands.h
r11 r42 42 42 void do_cvsbranches (); 43 43 void do_cvssubpackages (); 44 void do_cvssubprojects (); 44 45 void do_cvstags (); 45 46 void do_do (); -
CMT/HEAD/source/cmt_cvs.cxx
r11 r42 148 148 m_last_module = ""; 149 149 m_last_cvs_infos = ""; 150 structure_info = ""; 150 151 error_info = ""; 151 152 tags_top_info = ""; … … 155 156 branches_info = ""; 156 157 subpackages_info = ""; 158 subprojects_info = ""; 157 159 } 158 160 … … 185 187 // the script named cmt_buildcvsinfos2.sh (referenced in the loginfo script) 186 188 // 187 // This script performs a scan in the CVS repository for currently 4types of189 // This script performs a scan in the CVS repository for the following types of 188 190 // information : 189 191 // 192 // the recognized structure below this module (none, project, package) 190 193 // all top symbolic tags installed for the module 191 194 // all symbolic tags installed for the module 192 195 // all branches available below this module 193 196 // all subpackages installed below the module. 197 // all subprojects installed below the module. 194 198 // 195 199 // In principle, only modules corresponding to true CMT packages are considered. … … 200 204 // 201 205 void show_cvs_infos (const cmt_string& module) 202 { 203 if (module == "") 204 { 205 cout << "#CMT> cmt cvs needs a module name" << endl; 206 return; 207 } 208 209 if (module == m_last_module) 210 { 211 if (m_verbose) 212 { 213 cout << "#CMT> cvs infos for module " << module << " already there" << endl; 214 } 215 } 216 else 217 { 218 m_last_module = module; 206 { 207 static const cmt_string cmtcvsinfos = ".cmtcvsinfos"; 208 static const cmt_string protocol_level = "/v1r1"; 209 210 if (module == "") 211 { 212 cout << "#CMT> cmt cvs needs a module name" << endl; 213 return; 214 } 215 216 if (module == m_last_module) 217 { 218 if (m_verbose) 219 { 220 cout << "#CMT> cvs infos for module " << module << " already there" << endl; 221 } 222 } 223 else 224 { 225 m_last_module = module; 219 226 220 cmt_string home_dir = CmtSystem::pwd (); 221 222 // 223 // Activities related with .cmtcvsinfos will occur in a temporary directory 224 // 225 cmt_string tmp_dir = CmtSystem::getenv ("TMPDIR"); 226 if (tmp_dir == "") 227 { 228 tmp_dir = CmtSystem::file_separator (); 229 tmp_dir += "tmp"; 230 } 231 232 if (!CmtSystem::cd (tmp_dir)) 233 { 234 tmp_dir = home_dir; 235 } 236 237 tmp_dir += CmtSystem::file_separator (); 238 tmp_dir += "cmtcvs"; 239 { 240 cmt_string temp = CmtSystem::get_temporary_name (); 241 CmtSystem::basename (temp, temp); 242 tmp_dir += temp; 243 } 244 245 if (!CmtSystem::test_directory (tmp_dir)) 246 { 247 if (!CmtSystem::mkdir (tmp_dir)) 248 { 249 cout << "#CMT> Cannot create the temporary directory [" 250 << tmp_dir << "]" << endl; 251 return; 252 } 253 } 254 255 //trap "rm -rf ${tmp_dir}" 0 1 2 15 256 257 if (!CmtSystem::cd (tmp_dir)) 258 { 259 cout << "#CMT> Cannot move to the temporary directory " << tmp_dir << endl; 260 261 if (m_verbose) 262 { 263 cout << "#CMT> now removing tmp_dir " << tmp_dir << " home=" << home_dir << endl; 264 } 265 266 CmtSystem::remove_directory (tmp_dir); 267 227 cmt_string home_dir = CmtSystem::pwd (); 228 229 // 230 // Activities related with .cmtcvsinfos will occur in a temporary directory 231 // 232 cmt_string tmp_dir = CmtSystem::getenv ("TMPDIR"); 233 if (tmp_dir == "") 234 { 235 tmp_dir = CmtSystem::file_separator (); 236 tmp_dir += "tmp"; 237 } 238 239 if (!CmtSystem::cd (tmp_dir)) 240 { 241 tmp_dir = home_dir; 242 } 243 244 tmp_dir += CmtSystem::file_separator (); 245 tmp_dir += "cmtcvs"; 246 { 247 cmt_string temp = CmtSystem::get_temporary_name (); 248 CmtSystem::basename (temp, temp); 249 temp.replace_all (".", ""); 250 tmp_dir += temp; 251 } 252 253 if (!CmtSystem::test_directory (tmp_dir)) 254 { 255 if (!CmtSystem::mkdir (tmp_dir)) 256 { 257 cout << "#CMT> Cannot create the temporary directory [" 258 << tmp_dir << "]" << endl; 268 259 return; 269 260 } 261 } 262 263 //trap "rm -rf ${tmp_dir}" 0 1 2 15 264 265 if (!CmtSystem::cd (tmp_dir)) 266 { 267 cout << "#CMT> Cannot move to the temporary directory " << tmp_dir << endl; 270 268 271 269 if (m_verbose) 272 270 { 273 cout << "#CMT> cvs infos are now obtained from the temporary directory " << CmtSystem::pwd () << endl;274 }275 276 /*277 #278 # The script associated to such entries is supposed to :279 # 1) extract the set of <infos> from the ${module}/cmt/requirements file280 # 2) build an output of the form :281 # <infos>=info1 info2 info3 ...282 #283 # Currently this script can be found in284 #285 # ${CMTROOT}/cmt/cmt_buildcvsinfos2.sh286 # %CMTROOT%/cmt/cmt_buildcvsinfos.py287 #288 */289 290 if (!CmtSystem::test_directory (".cmtcvsinfos"))291 {292 CmtSystem::mkdir (".cmtcvsinfos");293 }294 295 CmtSystem::cd (".cmtcvsinfos");296 297 cmt_string cvsroot;298 299 CmtSystem::get_cvsroot (cvsroot);300 301 cmt_string command;302 303 command = "cvs";304 if (cvsroot != "")305 {306 command += " -d ";307 command += cvsroot;308 }309 command += " -Q import -m cmt ";310 if (m_cmtcvstest)311 {312 command += ".cmtcvsinfos/cmtcvstest";313 }314 else315 {316 command += ".cmtcvsinfos";317 }318 command += "/";319 command += module;320 command += " CMT v1";321 322 if (m_verbose || m_simulation)323 {324 cout << "#CMT> Executing [" << command << "]" << endl;325 }326 327 m_last_cvs_infos = "";328 CmtSystem::execute (command, m_last_cvs_infos);329 330 if (m_verbose)331 {332 271 cout << "#CMT> now removing tmp_dir " << tmp_dir << " home=" << home_dir << endl; 333 272 } 334 273 335 274 CmtSystem::remove_directory (tmp_dir); 336 337 CmtSystem::cd (home_dir); 338 } 339 340 /** 341 Now retrieve all info fields : 342 343 error= 344 tags_top= 345 tags= 346 branches= 347 subpackages= 348 349 */ 350 351 Grep grep; 352 353 grep.run (m_last_cvs_infos, "error="); 354 355 if (grep.result () != "") 356 { 357 error_info = grep.result (); 358 error_info.replace ("error=", ""); 359 } 360 else 361 { 362 error_info = ""; 363 } 364 365 grep.run (m_last_cvs_infos, "tags_top="); 366 367 if (grep.result () != "") 368 { 369 tags_top_info = grep.result (); 370 tags_top_info.replace ("tags_top=", ""); 371 } 372 else 373 { 374 tags_top_info = ""; 375 } 376 377 grep.run (m_last_cvs_infos, "tags="); 378 379 if (grep.result () != "") 380 { 381 tags_info = grep.result (); 382 tags_info.replace ("tags=", ""); 383 } 384 else 385 { 386 tags_info = ""; 387 } 388 389 grep.run (m_last_cvs_infos, "cvsversions_top="); 390 391 if (grep.result () != "") 392 { 393 cvsversions_top_info = grep.result (); 394 cvsversions_top_info.replace ("cvsversions_top=", ""); 395 } 396 else 397 { 398 cvsversions_top_info = ""; 399 } 400 401 grep.run (m_last_cvs_infos, "cvsversions="); 402 403 if (grep.result () != "") 404 { 405 cvsversions_info = grep.result (); 406 cvsversions_info.replace ("cvsversions=", ""); 407 } 408 else 409 { 410 cvsversions_info = ""; 411 } 412 413 cmt_string tag_filter = CmtSystem::getenv ("CMTCVSTAGFILTER"); 414 415 if (tag_filter != "") 416 { 417 cmt_string package; 418 CmtSystem::basename (module, package); 419 420 cmt_string pattern = "<package>"; 421 422 tag_filter.replace_all (pattern, package); 423 424 cmt_regexp exp (tag_filter); 425 426 cmt_string text; 427 428 filter_list (tags_top_info, exp); 429 filter_list (tags_info, exp); 430 filter_list (cvsversions_top_info, exp); 431 filter_list (cvsversions_info, exp); 432 } 433 434 if (m_cmtcvstest) 435 { 436 cout << "## tags_top_info=" << tags_top_info << endl; 437 cout << "## tags_info=" << tags_info << endl; 438 cout << "## cvsversions_top_info=" << cvsversions_top_info << endl; 439 cout << "## cvsversions_info=" << cvsversions_info << endl; 440 } 441 442 grep.run (m_last_cvs_infos, "branches="); 443 444 if (grep.result () != "") 445 { 446 branches_info = grep.result (); 447 branches_info.replace ("branches=", ""); 448 } 449 else 450 { 451 branches_info = ""; 452 } 453 454 grep.run (m_last_cvs_infos, "subpackages="); 455 456 if (grep.result () != "") 457 { 458 subpackages_info = grep.result (); 459 subpackages_info.replace ("subpackages=", ""); 460 } 461 else 462 { 463 subpackages_info = ""; 464 } 465 } 466 275 276 return; 277 } 278 279 if (m_verbose) 280 { 281 cout << "#CMT> cvs infos are now obtained from the temporary directory " << CmtSystem::pwd () << endl; 282 } 283 284 /* 285 # 286 # The script associated to such entries is supposed to : 287 # 1) extract the set of <infos> from the ${module}/cmt/requirements file 288 # 2) build an output of the form : 289 # <infos>=info1 info2 info3 ... 290 # 291 # Currently this script can be found in 292 # 293 # ${CMTROOT}/cmt/cmt_buildcvsinfos2.sh 294 # %CMTROOT%/cmt/cmt_buildcvsinfos.py 295 # 296 */ 297 298 if (!CmtSystem::test_directory (cmtcvsinfos)) 299 { 300 CmtSystem::mkdir (cmtcvsinfos); 301 } 302 303 CmtSystem::cd (cmtcvsinfos); 304 305 cmt_string cvsroot; 306 307 CmtSystem::get_cvsroot (cvsroot); 308 309 cmt_string command; 310 311 command = "cvs"; 312 if (cvsroot != "") 313 { 314 command += " -d "; 315 command += cvsroot; 316 } 317 command += " -Q import -m cmt "; 318 319 command += cmtcvsinfos; 320 321 if (m_cmtcvstest) 322 { 323 command += "/cmtcvstest"; 324 } 325 326 command += protocol_level; 327 command += "/"; 328 command += module; 329 command += " CMT v1"; 330 331 if (m_verbose || m_simulation) 332 { 333 cout << "#CMT> Executing [" << command << "]" << endl; 334 } 335 336 m_last_cvs_infos = ""; 337 CmtSystem::execute (command, m_last_cvs_infos); 338 339 if (m_verbose) 340 { 341 cout << "#CMT> now removing tmp_dir " << tmp_dir << " home=" << home_dir << endl; 342 } 343 344 CmtSystem::cd (home_dir); 345 CmtSystem::remove_directory (tmp_dir); 346 } 347 348 /** 349 Now retrieve all info fields : 350 351 structure= 352 error= 353 tags_top= 354 tags= 355 branches= 356 subpackages= 357 subprojects= 358 359 */ 360 361 Grep grep; 362 363 grep.run (m_last_cvs_infos, "structure="); 364 365 if (grep.result () != "") 366 { 367 structure_info = grep.result (); 368 structure_info.replace ("structure=", ""); 369 } 370 else 371 { 372 // This may happen for old protocol level < v1r1 373 structure_info = "package"; 374 } 375 376 grep.run (m_last_cvs_infos, "error="); 377 378 if (grep.result () != "") 379 { 380 error_info = grep.result (); 381 error_info.replace ("error=", ""); 382 } 383 else 384 { 385 error_info = ""; 386 } 387 388 grep.run (m_last_cvs_infos, "tags_top="); 389 390 if (grep.result () != "") 391 { 392 tags_top_info = grep.result (); 393 tags_top_info.replace ("tags_top=", ""); 394 } 395 else 396 { 397 tags_top_info = ""; 398 } 399 400 grep.run (m_last_cvs_infos, "tags="); 401 402 if (grep.result () != "") 403 { 404 tags_info = grep.result (); 405 tags_info.replace ("tags=", ""); 406 } 407 else 408 { 409 tags_info = ""; 410 } 411 412 grep.run (m_last_cvs_infos, "cvsversions_top="); 413 414 if (grep.result () != "") 415 { 416 cvsversions_top_info = grep.result (); 417 cvsversions_top_info.replace ("cvsversions_top=", ""); 418 } 419 else 420 { 421 cvsversions_top_info = ""; 422 } 423 424 grep.run (m_last_cvs_infos, "cvsversions="); 425 426 if (grep.result () != "") 427 { 428 cvsversions_info = grep.result (); 429 cvsversions_info.replace ("cvsversions=", ""); 430 } 431 else 432 { 433 cvsversions_info = ""; 434 } 435 436 cmt_string tag_filter = CmtSystem::getenv ("CMTCVSTAGFILTER"); 437 438 if (tag_filter != "") 439 { 440 cmt_string package; 441 CmtSystem::basename (module, package); 442 443 cmt_string pattern = "<package>"; 444 445 tag_filter.replace_all (pattern, package); 446 447 cmt_regexp exp (tag_filter); 448 449 cmt_string text; 450 451 filter_list (tags_top_info, exp); 452 filter_list (tags_info, exp); 453 filter_list (cvsversions_top_info, exp); 454 filter_list (cvsversions_info, exp); 455 } 456 457 if (m_cmtcvstest) 458 { 459 cout << "## tags_top_info=" << tags_top_info << endl; 460 cout << "## tags_info=" << tags_info << endl; 461 cout << "## cvsversions_top_info=" << cvsversions_top_info << endl; 462 cout << "## cvsversions_info=" << cvsversions_info << endl; 463 } 464 465 grep.run (m_last_cvs_infos, "branches="); 466 467 if (grep.result () != "") 468 { 469 branches_info = grep.result (); 470 branches_info.replace ("branches=", ""); 471 } 472 else 473 { 474 branches_info = ""; 475 } 476 477 grep.run (m_last_cvs_infos, "subpackages="); 478 479 if (grep.result () != "") 480 { 481 subpackages_info = grep.result (); 482 subpackages_info.replace ("subpackages=", ""); 483 } 484 else 485 { 486 subpackages_info = ""; 487 } 488 489 grep.run (m_last_cvs_infos, "subprojects="); 490 491 if (grep.result () != "") 492 { 493 subprojects_info = grep.result (); 494 subprojects_info.replace ("subprojects=", ""); 495 } 496 else 497 { 498 subprojects_info = ""; 499 } 500 } 501 467 502 void show_cvs_infos (const cmt_string& offset, 468 503 const cmt_string& module) … … 700 735 const cmt_string& package, 701 736 const cmt_string& version) 702 { 703 cmt_string dir = m_home_dir; 704 705 if (m_checkout_dir != "") 706 { 707 dir += CmtSystem::file_separator (); 708 dir += m_checkout_dir; 709 } 710 711 dir += CmtSystem::file_separator (); 712 dir += prefix; 713 dir += CmtSystem::file_separator (); 714 dir += package; 715 716 if (Cmt::get_current_structuring_style () == with_version_directory) 717 { 718 dir += CmtSystem::file_separator (); 719 dir += version; 720 } 721 722 CmtSystem::reduce_file_separators (dir); 723 724 return (dir); 725 } 737 { 738 cmt_string dir = m_home_dir; 739 740 if (m_checkout_dir != "") 741 { 742 dir += CmtSystem::file_separator (); 743 dir += m_checkout_dir; 744 } 745 746 dir += CmtSystem::file_separator (); 747 dir += prefix; 748 dir += CmtSystem::file_separator (); 749 dir += package; 750 751 if (Cmt::get_current_structuring_style () == with_version_directory) 752 { 753 dir += CmtSystem::file_separator (); 754 dir += version; 755 } 756 757 CmtSystem::reduce_file_separators (dir); 758 759 return (dir); 760 } 761 762 bool really_checkout_project_contents (const cmt_string& prefix, 763 const cmt_string& project, 764 const cmt_string& version, 765 const cmt_string& module, 766 const cmt_string& basedir, 767 bool at_head, 768 const cmt_string& currentdir) 769 { 770 cmt_string dir = currentdir; 771 772 cout << " # get project files " << endl; 773 774 cmt_string command = "cvs -Q co -P "; 775 if (!at_head) 776 { 777 command += "-r "; 778 command += version; 779 } 780 781 command += "-d "; 782 command += version; 783 784 command += " "; 785 command += module; 786 command += "/cmt"; 787 788 int status = 0; 789 int retry = 0; 790 791 for (;;) 792 { 793 if (m_verbose || m_simulation) 794 { 795 cout << "#CMT> Executing [" << command << "]" << endl; 796 } 797 798 if (!m_simulation) 799 { 800 //status = CmtSystem::execute (command, out); 801 status = CmtSystem::execute (command); 802 } 803 804 if (status != 0) 805 { 806 retry++; 807 808 cout << "# Error getting project CMT contents: status=" << status << endl; 809 cout << "#---------------------------------------------------------" << endl; 810 811 if (retry > 5) exit(0); 812 } 813 else 814 { 815 break; 816 } 817 } 818 819 return (true); 820 } 821 822 bool really_checkout_package_contents (const cmt_string& prefix, 823 const cmt_string& package, 824 const cmt_string& version, 825 const cmt_string& module, 826 const cmt_string& basedir, 827 bool at_head, 828 const cmt_string& currentdir) 829 { 830 cmt_string dir = currentdir; 831 832 cout << " # get top files " << endl; 833 834 cmt_string command = "cvs -Q co -P -l "; 835 if (!at_head) 836 { 837 command += "-r "; 838 command += version; 839 } 840 841 if (Cmt::get_current_structuring_style () == with_version_directory) 842 { 843 command += " -d "; 844 command += version; 845 } 846 else 847 { 848 command += " -d "; 849 command += package; 850 } 851 852 command += " "; 853 command += module; 854 855 if (m_cmtcvstest) 856 { 857 cmt_string cvsroot; 858 859 CmtSystem::get_cvsroot (cvsroot); 860 861 cout << "## cvsroot=" << cvsroot << " command[" << command << "]" << endl; 862 } 863 864 int status = 0; 865 int retry = 0; 866 867 for (;;) 868 { 869 if (m_verbose || m_simulation) 870 { 871 cout << "#CMT> Executing [" << command << "]" << endl; 872 } 873 874 if (!m_simulation) 875 { 876 //status = CmtSystem::execute (command, out); 877 status = CmtSystem::execute (command); 878 } 879 880 if (status != 0) 881 { 882 retry++; 883 884 cout << "# Error getting package CMT contents: status=" << status << endl; 885 cout << "#---------------------------------------------------------" << endl; 886 887 if (retry > 5) exit(0); 888 889 } 890 else 891 { 892 break; 893 } 894 } 895 896 if (Cmt::get_current_structuring_style () == with_version_directory) 897 { 898 if (m_simulation) 899 { 900 cout << "#CMT> Would mkdir " << version << endl; 901 } 902 else 903 { 904 if (m_verbose) 905 { 906 cout << "#CMT> About to mkdir " << version << endl; 907 } 908 909 if (!CmtSystem::cd (version)) 910 { 911 CmtSystem::mkdir (version); 912 if (!CmtSystem::cd (version)) 913 { 914 cout << "# Error creating the version directory :" << version << endl; 915 cout << "#---------------------------------------------------------" << endl; 916 return (false); 917 } 918 } 919 920 /* 921 if (m_verbose) 922 { 923 cout << "#CMT> pwd.2=" << CmtSystem::pwd () << endl; 924 } 925 */ 926 } 927 928 dir += CmtSystem::file_separator (); 929 dir += version; 930 } 931 else 932 { 933 if (m_simulation) 934 { 935 cout << "#CMT> will mkdir " << package << endl; 936 } 937 else 938 { 939 if (!CmtSystem::cd (package)) 940 { 941 if (m_verbose) 942 { 943 cout << "#CMT> About to mkdir " << package << endl; 944 } 945 CmtSystem::mkdir (package); 946 if (!CmtSystem::cd (package)) 947 { 948 cout << "# Error creating the package directory :" << package << endl; 949 cout << "#---------------------------------------------------------" << endl; 950 return (false); 951 } 952 } 953 954 /* 955 if (m_verbose) 956 { 957 cout << "#CMT> pwd.3=" << CmtSystem::pwd () << endl; 958 } 959 */ 960 } 961 962 dir += CmtSystem::file_separator (); 963 dir += package; 964 } 965 966 cmt_string entries_file_name; 967 cmt_string text; 968 969 cmt_string branches = CmtSystem::getenv ("CMTCVSBRANCHES"); 970 971 if (branches == "") 972 { 973 branches = branches_info; 974 } 975 976 CmtSystem::cmt_string_vector branch_vector; 977 978 CmtSystem::split (branches, " \t", branch_vector); 979 980 int i; 981 982 cout << " # get branches " << branches << endl; 983 984 //command = "("; 985 command = ""; 986 987 entries_file_name = "CVS"; 988 entries_file_name += CmtSystem::file_separator (); 989 entries_file_name += "Entries"; 990 991 if (!text.read (entries_file_name)) 992 { 993 // This happens when there were no top files 994 } 995 996 for (i = 0; i < branch_vector.size (); i++) 997 { 998 cmt_string& branch = branch_vector[i]; 999 1000 if (i > 0) 1001 { 1002 command += CmtSystem::command_separator (); 1003 } 1004 1005 //command += "cvs -Q co -P "; 1006 command += "cvs -Q co "; 1007 1008 // if (branch != "cmt") 1009 // { 1010 if (!at_head) 1011 { 1012 command += "-r "; 1013 command += version; 1014 } 1015 // } 1016 1017 command += " -d "; 1018 command += branch; 1019 command += " "; 1020 command += module; 1021 command += "/"; // CVS uses the '/' notation on all platforms!! 1022 command += branch; 1023 //command += "\n"; 1024 1025 text += "D/"; 1026 text += branch; 1027 text += "////\n"; 1028 } 1029 1030 //command += "; echo cmtcvsstatus=$?) 2>&1 "; 1031 1032 if (m_cmtcvstest) 1033 { 1034 cmt_string cvsroot; 1035 1036 CmtSystem::get_cvsroot (cvsroot); 1037 1038 cout << " cvsroot=" << cvsroot << " command[" << command << "]" << endl; 1039 } 1040 1041 status = 0; 1042 retry = 0; 1043 1044 for (;;) 1045 { 1046 if (m_verbose || m_simulation) 1047 { 1048 cout << "#CMT> Executing [" << command << "]" << endl; 1049 } 1050 1051 if (!m_simulation) 1052 { 1053 //status = CmtSystem::execute (command, out); 1054 status = CmtSystem::execute (command); 1055 } 1056 1057 if (status != 0) 1058 { 1059 retry++; 1060 1061 cout << "# Error getting package contents: status=" << status << endl; 1062 cout << "#---------------------------------------------------------" << endl; 1063 1064 if (retry > 5) exit(0); 1065 1066 } 1067 else 1068 { 1069 break; 1070 } 1071 } 1072 1073 if (!CmtSystem::test_directory ("CVS")) 1074 { 1075 /** 1076 * The CVS repository had not been created (this is generally 1077 * due to the lack of top files) 1078 */ 1079 1080 if (m_simulation) 1081 { 1082 cout << "#CMT> Would create the CVS directory" << endl; 1083 } 1084 else 1085 { 1086 if (m_verbose) 1087 { 1088 cout << "#CMT> About to mkdir " << "CVS" << endl; 1089 } 1090 CmtSystem::mkdir ("CVS"); 1091 } 1092 1093 cmt_string s; 1094 1095 // Let's create first the CVS/Root file. 1096 1097 CmtSystem::get_cvsroot (s); 1098 s += "\n"; 1099 1100 cmt_string f; 1101 1102 f = "CVS"; 1103 f += CmtSystem::file_separator (); 1104 f += "Root"; 1105 1106 if (m_simulation) 1107 { 1108 cout << "#CMT> Would fill in the CVS/Root file with " << endl; 1109 cout << s << endl; 1110 } 1111 else 1112 { 1113 if (m_verbose) 1114 { 1115 cout << "#CMT> Fill in the CVS/Root file with " << endl; 1116 cout << s << endl; 1117 } 1118 s.write (f); 1119 } 1120 1121 // Now we create the CVS/Repository file 1122 1123 f = "CVS"; 1124 f += CmtSystem::file_separator (); 1125 f += "Repository"; 1126 1127 CmtSystem::get_cvsroot (s); 1128 if (s[0] == ':') 1129 { 1130 int pos = s.find (1, ":"); 1131 s.erase (0, pos+1); 1132 pos = s.find (0, ":"); 1133 s.erase (0, pos+1); 1134 } 1135 s += "/"; 1136 s += module; 1137 s += "\n"; 1138 1139 if (m_simulation) 1140 { 1141 cout << "#CMT> Would fill in the CVS/Repository file with " << endl; 1142 cout << s << endl; 1143 } 1144 else 1145 { 1146 if (m_verbose) 1147 { 1148 cout << "#CMT> Fill in the CVS/Repository file with " << endl; 1149 cout << s << endl; 1150 } 1151 s.write (f); 1152 } 1153 } 1154 1155 if (m_simulation) 1156 { 1157 cout << "#CMT> Would write the top CVS/Entries file with " << endl; 1158 cout << text << endl; 1159 } 1160 else 1161 { 1162 // Now the CVS/Entries is ready to be created. 1163 if (m_verbose) 1164 { 1165 cout << "#CMT> Fill in the top CVS/Entries file with " << endl; 1166 cout << text << endl; 1167 } 1168 text.write (entries_file_name); 1169 } 1170 1171 return (true); 1172 } 726 1173 727 1174 bool really_checkout_package (const cmt_string& prefix, … … 731 1178 const cmt_string& basedir, 732 1179 bool at_head) 733 { 734 cmt_string dir = basedir; 735 cmt_string out; 736 737 cout << "# ================= working on package " << package 738 << " version " << version; 739 740 if (at_head) cout << " (At head) "; 741 742 { 743 cmt_string full_prefix; 744 745 full_prefix = m_offset; 746 full_prefix += prefix; 747 748 cmt_string echo_ppath; 1180 { 1181 cmt_string dir = basedir; 1182 cmt_string out; 1183 1184 cout << "# ================= working on " << structure_info << " " << package 1185 << " version " << version; 1186 1187 if (at_head) cout << " (At head) "; 1188 1189 cmt_string full_prefix; 1190 1191 full_prefix = m_offset; 1192 full_prefix += prefix; 1193 1194 cmt_string echo_ppath; 749 1195 750 if (prefix != "") 751 { 752 echo_ppath = " path "; 753 echo_ppath += prefix; 754 } 755 756 cout << echo_ppath << endl; 757 } 758 759 CmtSystem::dirname (dir, dir); 760 761 //if (Cmt::get_current_structuring_style () == with_version_directory) 762 { 763 if (m_simulation) 764 { 765 cout << "#CMT> Would mkdir " << dir << endl; 766 } 767 else 768 { 769 if (m_verbose) 770 { 771 cout << "#CMT> About to mkdir " << dir << endl; 772 } 773 774 if (!CmtSystem::mkdir (dir)) 775 { 776 cout << "# Error creating the base directory :" << dir << endl; 777 cout << "#---------------------------------------------------------" << endl; 778 return (false); 779 } 780 781 CmtSystem::cd (dir); 782 783 /* 784 if (m_verbose) 785 { 786 cout << "#CMT> pwd.1=" << CmtSystem::pwd () << endl; 787 } 788 */ 789 } 790 } 791 792 cout << " # get top files " << endl; 793 794 cmt_string command = "cvs -Q co -P -l "; 795 if (!at_head) 796 { 797 command += "-r "; 798 command += version; 799 } 800 801 if (Cmt::get_current_structuring_style () == with_version_directory) 802 { 803 command += " -d "; 804 command += version; 805 } 806 else 807 { 808 command += " -d "; 809 command += package; 810 } 811 812 command += " "; 813 command += module; 814 815 if (m_cmtcvstest) 816 { 817 cmt_string cvsroot; 818 819 CmtSystem::get_cvsroot (cvsroot); 820 821 cout << "## cvsroot=" << cvsroot << " command[" << command << "]" << endl; 822 } 823 824 int status = 0; 825 int retry = 0; 826 827 for (;;) 828 { 829 if (m_verbose || m_simulation) 830 { 831 cout << "#CMT> Executing [" << command << "]" << endl; 832 } 833 834 if (!m_simulation) 835 { 836 //status = CmtSystem::execute (command, out); 837 status = CmtSystem::execute (command); 838 } 839 840 if (status != 0) 841 { 842 retry++; 843 844 cout << "# Error getting package CMT contents: status=" << status << endl; 845 cout << "#---------------------------------------------------------" << endl; 846 847 if (retry > 5) exit(0); 848 849 } 850 else 851 { 852 break; 853 } 854 } 855 856 857 { 858 if (Cmt::get_current_structuring_style () == with_version_directory) 859 { 860 if (m_simulation) 861 { 862 cout << "#CMT> Would mkdir " << version << endl; 863 } 864 else 865 { 866 if (m_verbose) 867 { 868 cout << "#CMT> About to mkdir " << version << endl; 869 } 870 if (!CmtSystem::cd (version)) 871 { 872 CmtSystem::mkdir (version); 873 if (!CmtSystem::cd (version)) 874 { 875 cout << "# Error creating the version directory :" << version << endl; 876 cout << "#---------------------------------------------------------" << endl; 877 return (false); 878 } 879 } 880 881 /* 882 if (m_verbose) 883 { 884 cout << "#CMT> pwd.2=" << CmtSystem::pwd () << endl; 885 } 886 */ 887 } 888 889 dir += CmtSystem::file_separator (); 890 dir += version; 891 } 892 else 893 { 894 if (m_simulation) 895 { 896 cout << "#CMT> will mkdir " << package << endl; 897 } 898 else 899 { 900 if (!CmtSystem::cd (package)) 901 { 902 if (m_verbose) 903 { 904 cout << "#CMT> About to mkdir " << package << endl; 905 } 906 CmtSystem::mkdir (package); 907 if (!CmtSystem::cd (package)) 908 { 909 cout << "# Error creating the package directory :" << package << endl; 910 cout << "#---------------------------------------------------------" << endl; 911 return (false); 912 } 913 } 914 915 /* 916 if (m_verbose) 917 { 918 cout << "#CMT> pwd.3=" << CmtSystem::pwd () << endl; 919 } 920 */ 921 } 922 923 dir += CmtSystem::file_separator (); 924 dir += package; 925 } 926 } 927 928 cmt_string entries_file_name; 929 cmt_string text; 930 931 cmt_string branches = CmtSystem::getenv ("CMTCVSBRANCHES"); 932 933 if (branches == "") 934 { 935 branches = branches_info; 936 } 937 938 CmtSystem::cmt_string_vector branch_vector; 939 940 CmtSystem::split (branches, " \t", branch_vector); 941 942 int i; 943 944 cout << " # get branches " << branches << endl; 945 946 //command = "("; 947 command = ""; 948 949 entries_file_name = "CVS"; 950 entries_file_name += CmtSystem::file_separator (); 951 entries_file_name += "Entries"; 952 953 if (!text.read (entries_file_name)) 954 { 955 // This happens when there were no top files 956 } 957 958 for (i = 0; i < branch_vector.size (); i++) 959 { 960 cmt_string& branch = branch_vector[i]; 961 962 if (i > 0) 963 { 964 command += CmtSystem::command_separator (); 965 } 966 967 //command += "cvs -Q co -P "; 968 command += "cvs -Q co "; 969 970 // if (branch != "cmt") 971 // { 972 if (!at_head) 973 { 974 command += "-r "; 975 command += version; 976 } 977 // } 978 979 command += " -d "; 980 command += branch; 981 command += " "; 982 command += module; 983 command += "/"; // CVS uses the '/' notation on all platforms!! 984 command += branch; 985 //command += "\n"; 986 987 text += "D/"; 988 text += branch; 989 text += "////\n"; 990 } 991 992 //command += "; echo cmtcvsstatus=$?) 2>&1 "; 993 994 if (m_cmtcvstest) 995 { 996 cmt_string cvsroot; 997 998 CmtSystem::get_cvsroot (cvsroot); 999 1000 cout << " cvsroot=" << cvsroot << " command[" << command << "]" << endl; 1001 } 1002 1003 status = 0; 1004 retry = 0; 1005 1006 for (;;) 1007 { 1008 if (m_verbose || m_simulation) 1009 { 1010 cout << "#CMT> Executing [" << command << "]" << endl; 1011 } 1012 1013 if (!m_simulation) 1014 { 1015 //status = CmtSystem::execute (command, out); 1016 status = CmtSystem::execute (command); 1017 } 1018 1019 if (status != 0) 1020 { 1021 retry++; 1022 1023 cout << "# Error getting package contents: status=" << status << endl; 1024 cout << "#---------------------------------------------------------" << endl; 1025 1026 if (retry > 5) exit(0); 1027 1028 } 1029 else 1030 { 1031 break; 1032 } 1033 } 1034 1035 { 1036 if (!CmtSystem::test_directory ("CVS")) 1037 { 1038 /** 1039 * The CVS repository had not been created (this is generally 1040 * due to the lack of top files) 1041 */ 1042 1043 if (m_simulation) 1044 { 1045 cout << "#CMT> Would create the CVS directory" << endl; 1046 } 1047 else 1048 { 1049 if (m_verbose) 1050 { 1051 cout << "#CMT> About to mkdir " << "CVS" << endl; 1052 } 1053 CmtSystem::mkdir ("CVS"); 1054 } 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 << text << endl; 1122 } 1123 else 1124 { 1125 // Now the CVS/Entries is ready to be created. 1126 if (m_verbose) 1127 { 1128 cout << "#CMT> Fill in the top CVS/Entries file with " << endl; 1129 cout << text << endl; 1130 } 1131 text.write (entries_file_name); 1132 } 1133 } 1134 1135 return (true); 1136 } 1196 if (prefix != "") 1197 { 1198 echo_ppath = " path "; 1199 echo_ppath += prefix; 1200 } 1201 1202 cout << echo_ppath << endl; 1203 1204 CmtSystem::dirname (dir, dir); 1205 1206 //if (Cmt::get_current_structuring_style () == with_version_directory) 1207 1208 if (m_simulation) 1209 { 1210 cout << "#CMT> Would mkdir " << dir << endl; 1211 } 1212 else 1213 { 1214 if (m_verbose) 1215 { 1216 cout << "#CMT> About to mkdir " << dir << endl; 1217 } 1218 1219 if (!CmtSystem::mkdir (dir)) 1220 { 1221 cout << "# Error creating the base directory :" << dir << endl; 1222 cout << "#---------------------------------------------------------" << endl; 1223 return (false); 1224 } 1225 1226 CmtSystem::cd (dir); 1227 1228 /* 1229 if (m_verbose) 1230 { 1231 cout << "#CMT> pwd.1=" << CmtSystem::pwd () << endl; 1232 } 1233 */ 1234 } 1235 1236 if (structure_info == "package") 1237 { 1238 really_checkout_package_contents (prefix, 1239 package, 1240 version, 1241 module, 1242 basedir, 1243 at_head, 1244 dir); 1245 } 1246 else if (structure_info == "project") 1247 { 1248 really_checkout_project_contents (prefix, 1249 package, 1250 version, 1251 module, 1252 basedir, 1253 at_head, 1254 dir); 1255 } 1256 1257 return (true); 1258 } 1137 1259 1138 1260 cmt_string find_matching_version (const cmt_string& expression) … … 1544 1666 cmt_string out; 1545 1667 1546 show_cvs_infos (CmtSystem::getenv ("CMTCVSOFFSET"), module);1668 show_cvs_infos (CmtSystem::getenv ("CMTCVSOFFSET"), (module == "") ? "." : module); 1547 1669 1548 1670 if (error_info != "") … … 1553 1675 { 1554 1676 cout << subpackages_info << endl; 1677 } 1678 } 1679 1680 void subprojects (const cmt_string& module) 1681 { 1682 cmt_string out; 1683 1684 show_cvs_infos (CmtSystem::getenv ("CMTCVSOFFSET"), (module == "") ? "." : module); 1685 1686 if (error_info != "") 1687 { 1688 cout << error_info << endl; 1689 } 1690 else 1691 { 1692 cout << subprojects_info << endl; 1555 1693 } 1556 1694 } … … 1626 1764 version = version_tag; 1627 1765 } 1628 1766 1629 1767 CmtSystem::dirname (module, prefix); 1630 1768 CmtSystem::basename (module, package); … … 1746 1884 1747 1885 void checkout (const CmtSystem::cmt_string_vector& arguments) 1748 { 1749 if (arguments.size () < 1) 1750 { 1751 help (); 1752 return; 1753 } 1754 1755 if (CmtSystem::getenv ("CVSROOT") == "") 1756 { 1757 cout << "# Please set CVSROOT first !" << endl; 1758 return; 1759 } 1760 1761 if (CmtSystem::getenv ("CMTCVSTEST") != "") 1762 { 1763 m_cmtcvstest = true; 1764 } 1765 else 1766 { 1767 m_cmtcvstest = false; 1768 } 1769 1770 m_home_dir = CmtSystem::pwd (); 1771 m_checkout_dir = ""; 1772 m_offset = ""; 1773 m_branch_suffix = ""; 1774 1775 cmt_string module; 1776 1777 m_recursive = false; 1778 1779 bool need_version_tag = false; 1780 cmt_string version_tag; 1781 1782 bool need_checkout_dir = false; 1783 bool need_offset = false; 1784 bool need_requirements_file = false; 1785 1786 m_simulation = false; 1787 //m_verbose = true; 1788 m_verbose = false; 1789 1790 bool need_branch_suffix = false; 1791 1792 m_head = true; 1793 1794 m_offset = CmtSystem::getenv ("CMTCVSOFFSET"); 1795 if (m_offset != "") 1796 { 1797 m_offset += "/"; 1798 m_offset.replace_all ("//", "/"); 1799 } 1800 1801 for (int arg = 0; arg < arguments.size (); arg++) 1802 { 1803 const cmt_string& option = arguments[arg]; 1804 1805 if (need_version_tag) 1806 { 1807 need_version_tag = false; 1808 1809 if (option == "HEAD") 1810 { 1811 m_head = true; 1812 } 1813 else 1814 { 1815 version_tag = option; 1816 } 1817 } 1818 else if (need_checkout_dir) 1819 { 1820 need_checkout_dir = false; 1821 m_checkout_dir = option; 1822 } 1823 else if (need_offset) 1824 { 1825 need_offset = false; 1826 m_offset = option; 1827 m_offset += '/'; 1828 m_offset.replace_all ("//", "/"); 1829 } 1830 else if (need_branch_suffix) 1831 { 1832 need_branch_suffix = false; 1833 m_branch_suffix = "-"; 1834 m_branch_suffix += option; 1835 } 1836 else if (need_requirements_file) 1837 { 1838 need_requirements_file = false; 1839 m_head = false; 1840 checkout_from_requirements (option); 1841 } 1842 else 1843 { 1844 if (option == "-R") 1845 { 1846 m_recursive = true; 1847 } 1848 else if (option == "-l") 1849 { 1850 m_recursive = false; 1851 } 1852 else if (option == "-r") 1853 { 1854 need_version_tag = true; 1855 m_head = false; 1856 } 1857 else if (option == "-d") 1858 { 1859 need_checkout_dir = true; 1860 } 1861 else if (option == "-o") 1862 { 1863 need_offset = true; 1864 } 1865 else if (option == "-n") 1866 { 1867 m_simulation = true; 1868 } 1869 else if (option == "-v") 1870 { 1871 m_verbose = true; 1872 } 1873 else if (option == "-branch") 1874 { 1875 need_branch_suffix = true; 1876 } 1877 else if (option == "-requirements") 1878 { 1879 need_requirements_file = true; 1880 } 1881 else if (option == "--help") 1882 { 1883 help (); 1884 return; 1885 } 1886 else if (option[0] == '-') 1887 { 1888 help (); 1889 return; 1890 } 1891 else 1892 { 1893 do_checkout (option, version_tag); 1894 } 1895 } 1896 } 1897 1898 } 1886 { 1887 if (arguments.size () < 1) 1888 { 1889 help (); 1890 return; 1891 } 1892 1893 if (CmtSystem::getenv ("CVSROOT") == "") 1894 { 1895 cout << "# Please set CVSROOT first !" << endl; 1896 return; 1897 } 1898 1899 if (CmtSystem::getenv ("CMTCVSTEST") != "") 1900 { 1901 m_cmtcvstest = true; 1902 } 1903 else 1904 { 1905 m_cmtcvstest = false; 1906 } 1907 1908 m_home_dir = CmtSystem::pwd (); 1909 m_checkout_dir = ""; 1910 m_offset = ""; 1911 m_branch_suffix = ""; 1912 1913 cmt_string module; 1914 1915 m_recursive = false; 1916 1917 bool need_version_tag = false; 1918 cmt_string version_tag; 1919 1920 bool need_checkout_dir = false; 1921 bool need_offset = false; 1922 bool need_requirements_file = false; 1923 1924 m_simulation = false; 1925 //m_verbose = true; 1926 m_verbose = false; 1927 1928 bool need_branch_suffix = false; 1929 1930 m_head = true; 1931 1932 m_offset = CmtSystem::getenv ("CMTCVSOFFSET"); 1933 if (m_offset != "") 1934 { 1935 m_offset += "/"; 1936 m_offset.replace_all ("//", "/"); 1937 } 1938 1939 for (int arg = 0; arg < arguments.size (); arg++) 1940 { 1941 const cmt_string& option = arguments[arg]; 1942 1943 if (need_version_tag) 1944 { 1945 need_version_tag = false; 1946 1947 if (option == "HEAD") 1948 { 1949 m_head = true; 1950 } 1951 else 1952 { 1953 version_tag = option; 1954 } 1955 } 1956 else if (need_checkout_dir) 1957 { 1958 need_checkout_dir = false; 1959 m_checkout_dir = option; 1960 } 1961 else if (need_offset) 1962 { 1963 need_offset = false; 1964 m_offset = option; 1965 m_offset += '/'; 1966 m_offset.replace_all ("//", "/"); 1967 } 1968 else if (need_branch_suffix) 1969 { 1970 need_branch_suffix = false; 1971 m_branch_suffix = "-"; 1972 m_branch_suffix += option; 1973 } 1974 else if (need_requirements_file) 1975 { 1976 need_requirements_file = false; 1977 m_head = false; 1978 checkout_from_requirements (option); 1979 } 1980 else 1981 { 1982 if (option == "-R") 1983 { 1984 m_recursive = true; 1985 } 1986 else if (option == "-l") 1987 { 1988 m_recursive = false; 1989 } 1990 else if (option == "-r") 1991 { 1992 need_version_tag = true; 1993 m_head = false; 1994 } 1995 else if (option == "-d") 1996 { 1997 need_checkout_dir = true; 1998 } 1999 else if (option == "-o") 2000 { 2001 need_offset = true; 2002 } 2003 else if (option == "-n") 2004 { 2005 m_simulation = true; 2006 } 2007 else if (option == "-v") 2008 { 2009 m_verbose = true; 2010 } 2011 else if (option == "-branch") 2012 { 2013 need_branch_suffix = true; 2014 } 2015 else if (option == "-requirements") 2016 { 2017 need_requirements_file = true; 2018 } 2019 else if (option == "--help") 2020 { 2021 help (); 2022 return; 2023 } 2024 else if (option[0] == '-') 2025 { 2026 help (); 2027 return; 2028 } 2029 else 2030 { 2031 do_checkout (option, version_tag); 2032 } 2033 } 2034 } 2035 } 1899 2036 1900 2037 private: … … 1913 2050 cmt_string m_last_module; 1914 2051 cmt_string m_last_cvs_infos; 2052 cmt_string structure_info; 1915 2053 cmt_string error_info; 1916 2054 cmt_string tags_top_info; … … 1920 2058 cmt_string branches_info; 1921 2059 cmt_string subpackages_info; 2060 cmt_string subprojects_info; 1922 2061 }; 1923 2062 … … 2204 2343 } 2205 2344 2345 void Cvs::subprojects (const cmt_string& module) 2346 { 2347 CvsImplementation cvs; 2348 2349 cvs.subprojects (module); 2350 } 2351 2206 2352 void Cvs::checkout (const CmtSystem::cmt_string_vector& arguments) 2207 2353 { -
CMT/HEAD/source/cmt_cvs.h
r11 r42 17 17 static void branches (const cmt_string& module); 18 18 static void subpackages (const cmt_string& module); 19 static void subprojects (const cmt_string& module); 19 20 static void checkout (const CmtSystem::cmt_string_vector& arguments); 20 21 -
CMT/HEAD/source/cmt_parser.cxx
r22 r42 2465 2465 { 2466 2466 Cvs::subpackages (ap.arguments[0]); 2467 } 2468 2469 //---------------------------------------------------------- 2470 void Cmt::do_cvssubprojects (const ArgParser& ap) 2471 { 2472 Cvs::subprojects (ap.arguments[0]); 2467 2473 } 2468 2474 … … 4795 4801 case action_create : 4796 4802 // case action_create_project : 4797 // case action_cvsbranches : 4798 // case action_cvssubpackages : 4799 // case action_cvstags : 4803 case action_cvsbranches : 4804 case action_cvssubpackages : 4805 case action_cvssubprojects : 4806 case action_cvstags : 4800 4807 case action_do : 4801 4808 case action_expand_model : … … 4905 4912 // case action_cvsbranches : 4906 4913 // case action_cvssubpackages : 4914 // case action_cvssubprojects : 4907 4915 // case action_cvstags : 4908 4916 case action_do : … … 5007 5015 // case action_cvsbranches : 5008 5016 // case action_cvssubpackages : 5017 // case action_cvssubprojects : 5009 5018 // case action_cvstags : 5010 5019 case action_do : … … 5115 5124 // case action_cvsbranches : 5116 5125 // case action_cvssubpackages : 5126 // case action_cvssubprojects : 5117 5127 // case action_cvstags : 5118 5128 // case action_do : … … 5274 5284 case action_cvssubpackages : 5275 5285 do_cvssubpackages (ap); 5286 break; 5287 case action_cvssubprojects : 5288 do_cvssubprojects (ap); 5276 5289 break; 5277 5290 case action_cvstags : -
CMT/HEAD/source/cmt_parser.h
r11 r42 235 235 action_cvsbranches, 236 236 action_cvssubpackages, 237 action_cvssubprojects, 237 238 action_cvstags, 238 239 action_do, -
CMT/HEAD/source/cmt_system.cxx
r38 r42 604 604 bool CmtSystem::remove_directory (const cmt_string& name) 605 605 { 606 //c out<< "Try to remove directory " << name << endl;606 //cerr << "Try to remove directory " << name << endl; 607 607 608 608 cmt_string_vector files; … … 616 616 if (test_directory (file)) 617 617 { 618 //cerr << "D=" << file << endl; 618 619 if (!remove_directory (file)) return (false); 619 620 } 620 621 else 621 622 { 623 //cerr << "F=" << file << endl; 622 624 if (!remove_file (file)) return (false); 623 625 } 624 626 } 625 627 626 628 int status = ::rmdir (name); 627 629 if (status != 0) -
CMT/HEAD/source/cmt_use.cxx
r11 r42 2995 2995 } 2996 2996 buffer += "\""; 2997 2998 buffer += "macro "; 2999 buffer += package_name; 3000 buffer += "_project_release"; 3001 buffer += " \""; 3002 if (p != 0) 3003 { 3004 buffer += p->get_release (); 3005 } 3006 buffer += "\""; 2997 3007 } 2998 3008
Note: See TracChangeset
for help on using the changeset viewer.