Changeset 454 for CMT/HEAD


Ignore:
Timestamp:
Apr 17, 2008, 11:00:03 AM (16 years ago)
Author:
rybkin
Message:

See C.L. 355

Location:
CMT/HEAD
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/ChangeLog

    r453 r454  
     12008-04-17    <rybkin@lal.in2p3.fr> 355
     2       
     3        * source/cmt_cvs.cxx: Add the -rs suffix option to the cmt checkout command
     4        (proposed by David Rousseau)
     5       
    162008-04-15    <rybkin@lal.in2p3.fr> 354
    27       
  • CMT/HEAD/source/cmt_cvs.cxx

    r452 r454  
    21572157  void help ()
    21582158  {
     2159    cerr << "Usage:" << endl;
    21592160    cerr << "> cd <some work area>" << endl;
    2160     cerr << "> cmt checkout [modifier ...] <package|project>" << endl;
     2161    cerr << "> cmt checkout [modifier]... <package|project>..." << endl;
    21612162    cerr << "" << endl;
    21622163    cerr << "   modifier :" << endl;
     
    21682169    cerr << "   -o offset Offset in the CVS repository" << endl;
    21692170    cerr << "   -requirements <requirements file path>  Check out packages referenced in this requirements file" << endl;
    2170     cerr << "   -t  Change file timestamps to the date of checkout" << endl;
     2171    cerr << "   -t        Change file timestamps to the date of checkout" << endl;
    21712172    cerr << "   -n        simulation mode on" << endl;
    21722173    cerr << "   -no_config  Disable config step after checkout" << endl;   
    21732174    cerr << "   -v        verbose mode on" << endl;
     2175    cerr << "   -rs suffix  Same as -r <packagename|projectname>suffix" << endl;
    21742176    cerr << "   --help    print this help" << endl;
     2177    cerr << "" << endl;
     2178    cerr << "(Modifiers are recognised anywhere on the command line)" << endl;
    21752179    cerr << "" << endl;
    21762180    cerr << "> cmt cvstags <package|project>" << endl;
     
    23372341    m_cvs_offset = "";
    23382342
    2339     cmt_string module;
     2343    //cmt_string module;
    23402344   
    23412345    m_recursive      = false;
     
    23452349    bool need_version_tag = false;
    23462350    cmt_string version_tag;
     2351
     2352    bool need_version_tag_suffix = false;
     2353    cmt_string version_tag_suffix;
     2354
     2355    CmtSystem::cmt_string_vector modules;
    23472356   
    23482357   
     
    24042413            m_head = false;
    24052414            checkout_from_requirements (option);
     2415          }
     2416        else if (need_version_tag_suffix)
     2417          {
     2418            need_version_tag_suffix = false;
     2419            version_tag_suffix = option;
    24062420          }
    24072421        else
     
    24522466                need_requirements_file = true;
    24532467              }
     2468            else if (option == "-rs")
     2469              {
     2470                need_version_tag_suffix = true;
     2471                m_head = false;
     2472              }
    24542473            else if (option == "--help")
    24552474              {
     
    24642483            else
    24652484              {
    2466                 do_checkout_phase1 (option, m_version_dir, version_tag);
    2467               }
    2468           }
     2485                modules.push_back (option);
     2486                //do_checkout_phase1 (option, m_version_dir, version_tag);
     2487              }
     2488          }
     2489      }
     2490    if ( modules.size () < 1)
     2491      {
     2492        help ();
     2493        return;
     2494      }
     2495    for (int arg = 0; arg < modules.size (); arg++)
     2496      {
     2497        if (version_tag_suffix != "")
     2498          {
     2499            cmt_string name;
     2500            CmtSystem::basename (modules[arg], name);
     2501            version_tag = name + version_tag_suffix;
     2502          }
     2503        do_checkout_phase1 (modules[arg], m_version_dir, version_tag);
    24692504      }
    24702505  }
Note: See TracChangeset for help on using the changeset viewer.