Changeset 496
- Timestamp:
- Apr 27, 2009, 3:18:05 PM (15 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 8 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r495 r496 1 2009-04-27 <rybkin@lal.in2p3.fr> 391 2 3 * source/cmt_error.h: Add an error configuration_error 4 * source/cmt_error.cxx: idem 5 * source/cmt_commands.cxx: Set CmtError::syntax_error for "cmt checkout" 6 command when appropriate to ensure the exist status is set to a nonzero 7 value on error. Add the mention of SVN to help message 8 * source/cmt_vcs.h: Declare generic CVS-like checkout class Vcs (for 9 Version Control System) and Subversion checkout class Svn 10 * source/cmt_vcs.cxx: Implement Vcs, Svn classes. The choice between CVS 11 and Subversion is made based on which environment variable - CVSROOT or 12 SVNROOT - is set. Svn uses the command specified via macro 13 svn_checkout_command for checkout from Subversion repository. CVS checkout 14 is still done via Cvs::checkout 15 * source/cmt_parser.cxx: Add the possibility to do checkout from Subversion 16 repository by making use of class Vcs to implement "cmt checkout" command. 17 After help message is printed, return a nonzero value from Cmt::parser on 18 error 19 * mgr/requirements: For Linux, Darwin, and Windows, set macro 20 svn_checkout_command to mgr/cmt_svn_checkout.py. Replace cmt_cvs.cxx with 21 cmt_vcs.cxx 22 1 23 2009-04-20 <rybkin@lal.in2p3.fr> 390 2 24 -
CMT/HEAD/mgr/cmt.make
r11 r496 109 109 #-- start of application 110 110 111 $(bin)cmt${application_suffix} :: $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_ cvs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(use_stamps) $(cmtstamps) requirements $(use_requirements)111 $(bin)cmt${application_suffix} :: $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_vcs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(use_stamps) $(cmtstamps) requirements $(use_requirements) 112 112 $(link_echo) $@ 113 $(link_silent) cd $(bin); $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_ cvs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(use_linkopts) $(cmtlinkopts); mv -f cmt.exe.new cmt${application_suffix}113 $(link_silent) cd $(bin); $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_vcs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(use_linkopts) $(cmtlinkopts); mv -f cmt.exe.new cmt${application_suffix} 114 114 115 115 ### … … 118 118 ### 119 119 ### $(link_silent) cd $(bin); \ 120 ### $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_ cvs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o \120 ### $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_vcs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o \ 121 121 ### $(cmt_use_linkopts) $(cmtlinkopts); \ 122 122 ### mv -f cmt.exe.new cmt${application_suffix} 123 ### $(link_silent) cd $(bin); $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_ cvs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(cmt_use_linkopts) $(cmtlinkopts); mv -f cmt.exe.new cmt${application_suffix}123 ### $(link_silent) cd $(bin); $(cpplink) -o cmt.exe.new $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_vcs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o $(cmt_use_linkopts) $(cmtlinkopts); mv -f cmt.exe.new cmt${application_suffix} 124 124 125 125 … … 166 166 167 167 ifndef QUICK 168 $(bin)cmt_dependencies.make :: ../source/cmt.cxx ../source/cmt_awk.cxx ../source/cmt_branch.cxx ../source/cmt_constituent.cxx ../source/cmt_deps_builder.cxx ../source/cmt_fragment.cxx ../source/cmt_generator.cxx ../source/cmt_include.cxx ../source/cmt_parser.cxx ../source/cmt_script.cxx ../source/cmt_string.cxx ../source/cmt_system.cxx ../source/cmt_tag.cxx ../source/cmt_use.cxx ../source/cmt_symbol.cxx ../source/cmt_error.cxx ../source/cmt_pattern.cxx ../source/cmt_language.cxx ../source/cmt_ cvs.cxx ../source/cmt_group.cxx ../source/cmt_database.cxx ../source/cmt_lock.cxx ../source/cmt_triggers.cxx ../source/cmt_regexp.cxx ../source/cmt_model.cxx ../source/cmt_project.cxx ../source/cmt_syntax.cxx ../source/cmt_install_area.cxx ../source/cmt_cmtpath_pattern.cxx ../source/cmt_sequence.cxx ../source/cmt_generators.cxx ../source/cmt_scope_section.cxx ../source/cmt_log.cxx ../source/cmt_commands.cxx requirements $(use_requirements) $(cmt_final_setup_cmt)168 $(bin)cmt_dependencies.make :: ../source/cmt.cxx ../source/cmt_awk.cxx ../source/cmt_branch.cxx ../source/cmt_constituent.cxx ../source/cmt_deps_builder.cxx ../source/cmt_fragment.cxx ../source/cmt_generator.cxx ../source/cmt_include.cxx ../source/cmt_parser.cxx ../source/cmt_script.cxx ../source/cmt_string.cxx ../source/cmt_system.cxx ../source/cmt_tag.cxx ../source/cmt_use.cxx ../source/cmt_symbol.cxx ../source/cmt_error.cxx ../source/cmt_pattern.cxx ../source/cmt_language.cxx ../source/cmt_vcs.cxx ../source/cmt_group.cxx ../source/cmt_database.cxx ../source/cmt_lock.cxx ../source/cmt_triggers.cxx ../source/cmt_regexp.cxx ../source/cmt_model.cxx ../source/cmt_project.cxx ../source/cmt_syntax.cxx ../source/cmt_install_area.cxx ../source/cmt_cmtpath_pattern.cxx ../source/cmt_sequence.cxx ../source/cmt_generators.cxx ../source/cmt_scope_section.cxx ../source/cmt_log.cxx ../source/cmt_commands.cxx requirements $(use_requirements) $(cmt_final_setup_cmt) 169 169 @echo "------> (cmt.make) Rebuilding $@"; \ 170 170 args=`echo $? | sed -e "s#requirements.*##"`; \ … … 305 305 #-- start of cpp ------ 306 306 307 $(bin)cmt_ cvs.o : $(cmt_cvs_cxx_dependencies)308 $(cpp_echo) $@ 309 $(cpp_silent) cd $(bin); $(cppcomp) -o cmt_ cvs.o $(use_pp_cppflags) $(cmt_pp_cppflags) $(app_cmt_pp_cppflags) $(cmt_cvs_pp_cppflags) $(use_cppflags) $(cmt_cppflags) $(app_cmt_cppflags) $(cmt_cvs_cppflags) $(cmt_cvs_cxx_cppflags) -I../source ../source/cmt_cvs.cxx307 $(bin)cmt_vcs.o : $(cmt_vcs_cxx_dependencies) 308 $(cpp_echo) $@ 309 $(cpp_silent) cd $(bin); $(cppcomp) -o cmt_vcs.o $(use_pp_cppflags) $(cmt_pp_cppflags) $(app_cmt_pp_cppflags) $(cmt_vcs_pp_cppflags) $(use_cppflags) $(cmt_cppflags) $(app_cmt_cppflags) $(cmt_vcs_cppflags) $(cmt_vcs_cxx_cppflags) -I../source ../source/cmt_vcs.cxx 310 310 311 311 #-- end of cpp ------ … … 432 432 #-- start of cleanup_objects ------ 433 433 $(cleanup_echo) objects 434 -$(cleanup_silent) cd $(bin); /bin/rm -f $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_ cvs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o434 -$(cleanup_silent) cd $(bin); /bin/rm -f $(bin)cmt.o $(bin)cmt_awk.o $(bin)cmt_branch.o $(bin)cmt_constituent.o $(bin)cmt_deps_builder.o $(bin)cmt_fragment.o $(bin)cmt_generator.o $(bin)cmt_include.o $(bin)cmt_parser.o $(bin)cmt_script.o $(bin)cmt_string.o $(bin)cmt_system.o $(bin)cmt_tag.o $(bin)cmt_use.o $(bin)cmt_symbol.o $(bin)cmt_error.o $(bin)cmt_pattern.o $(bin)cmt_language.o $(bin)cmt_vcs.o $(bin)cmt_group.o $(bin)cmt_database.o $(bin)cmt_lock.o $(bin)cmt_triggers.o $(bin)cmt_regexp.o $(bin)cmt_model.o $(bin)cmt_project.o $(bin)cmt_syntax.o $(bin)cmt_install_area.o $(bin)cmt_cmtpath_pattern.o $(bin)cmt_sequence.o $(bin)cmt_generators.o $(bin)cmt_scope_section.o $(bin)cmt_log.o $(bin)cmt_commands.o 435 435 #-- end of cleanup_objects ------ -
CMT/HEAD/mgr/cmt_dependencies.make
r461 r496 7 7 cmt_generator_cxx_dependencies = ../source/cmt_generator.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_fragment.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_awk.h ../source/cmt_map.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_deps_builder.h ../source/cmt_generator.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_generators.h ../source/cmt_log.h 8 8 cmt_include_cxx_dependencies = ../source/cmt_include.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_include.h ../source/cmt_map.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_log.h 9 cmt_parser_cxx_dependencies = ../source/cmt_parser.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_version.h ../source/cmt_branch.h ../source/cmt_fragment.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h ../source/cmt_deps_builder.h ../source/cmt_generator.h ../source/cmt_error.h ../source/cmt_cvs.h ../source/cmt_ lock.h ../source/cmt_triggers.h ../source/cmt_model.h ../source/cmt_syntax.h ../source/cmt_install_area.h ../source/cmt_sequence.h ../source/cmt_log.h ../source/cmt_commands.h9 cmt_parser_cxx_dependencies = ../source/cmt_parser.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_version.h ../source/cmt_branch.h ../source/cmt_fragment.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h ../source/cmt_deps_builder.h ../source/cmt_generator.h ../source/cmt_error.h ../source/cmt_cvs.h ../source/cmt_vcs.h ../source/cmt_lock.h ../source/cmt_triggers.h ../source/cmt_model.h ../source/cmt_syntax.h ../source/cmt_install_area.h ../source/cmt_sequence.h ../source/cmt_log.h ../source/cmt_commands.h 10 10 cmt_script_cxx_dependencies = ../source/cmt_script.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_script.h ../source/cmt_map.h ../source/cmt_include.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h 11 11 cmt_string_cxx_dependencies = ../source/cmt_string.cxx ../source/cmt_std.h ../source/cmt_string.h … … 17 17 cmt_pattern_cxx_dependencies = ../source/cmt_pattern.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_branch.h ../source/cmt_fragment.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h ../source/cmt_error.h ../source/cmt_syntax.h ../source/cmt_log.h 18 18 cmt_language_cxx_dependencies = ../source/cmt_language.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_fragment.h ../source/cmt_language.h ../source/cmt_branch.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h 19 cmt_ cvs_cxx_dependencies = ../source/cmt_cvs.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_cvs.h ../source/cmt_awk.h ../source/cmt_map.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_project.h ../source/cmt_log.h19 cmt_vcs_cxx_dependencies = ../source/cmt_vcs.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_cvs.h ../source/cmt_vcs.h ../source/cmt_awk.h ../source/cmt_map.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_project.h ../source/cmt_log.h ../source/cmt_error.h 20 20 cmt_group_cxx_dependencies = ../source/cmt_group.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_group.h ../source/cmt_branch.h ../source/cmt_fragment.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h 21 21 cmt_database_cxx_dependencies = ../source/cmt_database.cxx ../source/cmt_vector.h ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_branch.h ../source/cmt_fragment.h ../source/cmt_group.h ../source/cmt_constituent.h ../source/cmt_language.h ../source/cmt_map.h ../source/cmt_pattern.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_cmtpath_pattern.h ../source/cmt_database.h … … 32 32 cmt_scope_section_cxx_dependencies = ../source/cmt_scope_section.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_parser.h ../source/cmt_scope_section.h 33 33 cmt_log_cxx_dependencies = ../source/cmt_log.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_log.h ../source/cmt_vector.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h 34 cmt_commands_cxx_dependencies = ../source/cmt_commands.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_map.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_commands.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_log.h 34 cmt_commands_cxx_dependencies = ../source/cmt_commands.cxx ../source/cmt_std.h ../source/cmt_string.h ../source/cmt_vector.h ../source/cmt_map.h ../source/cmt_parser.h ../source/cmt_regexp.h ../source/cmt_system.h ../source/cmt.h ../source/cmt_commands.h ../source/cmt_include.h ../source/cmt_script.h ../source/cmt_pattern.h ../source/cmt_scope_section.h ../source/cmt_use.h ../source/cmt_tag.h ../source/cmt_symbol.h ../source/cmt_awk.h ../source/cmt_project.h ../source/cmt_log.h ../source/cmt_error.h -
CMT/HEAD/mgr/requirements
r490 r496 470 470 macro lock_suffix ".lock" 471 471 macro lock_file "${lock_name}${lock_suffix}" 472 473 474 macro svn_checkout_command "" \ 475 Linux "python ${CMTROOT}/mgr/cmt_svn_checkout.py " \ 476 Darwin "python ${CMTROOT}/mgr/cmt_svn_checkout.py " \ 477 VisualC "python %CMTROOT%\mgr\cmt_svn_checkout.py " 472 478 473 479 macro preprocessor_command "" \ … … 737 743 cmt_pattern.cxx \ 738 744 cmt_language.cxx \ 739 cmt_ cvs.cxx \745 cmt_vcs.cxx \ 740 746 cmt_group.cxx \ 741 747 cmt_database.cxx \ -
CMT/HEAD/source/cmt_commands.cxx
r482 r496 11 11 #include "cmt_project.h" 12 12 #include "cmt_log.h" 13 #include "cmt_error.h" 13 14 14 15 ArgParser::ArgParser (CmtContext& context) : cmt(context), argc(0), argv(0), mode(Csh) … … 830 831 else 831 832 { 832 CmtMessage::error ("syntax: checkout arguments missing"); 833 CmtError::set (CmtError::syntax_error, "checkout argument(s) missing"); 834 // CmtMessage::error ("syntax: checkout arguments missing"); 833 835 // if (!cmt.m_quiet) cerr << "#CMT> syntax error : checkout arguments missing" << endl; 834 836 help_action = action_help; … … 2203 2205 help_texts.add () = "check files <old> <new> : compare two files and overrides <old> by <new> if different"; 2204 2206 help_texts.add () = "check version <name> : check if a name follows a version tag syntax "; 2205 help_texts.add () = "co | checkout : perform a cvs checkout over a CMT package";2207 help_texts.add () = "co | checkout : perform a cvs/svn checkout over a CMT package"; 2206 2208 help_texts.add () = "cleanup [-csh|-sh|-bat] : generate a cleanup script"; 2207 2209 help_texts.add () = "config : generate setup and cleanup scripts"; -
CMT/HEAD/source/cmt_error.cxx
r459 r496 27 27 error_names.add() = "version_conflict"; 28 28 error_names.add() = "file_access_error"; 29 error_names.add() = "configuration_error"; 29 30 error_names.add() = "execution_error"; 30 31 error_names.add() = "cannot_lock"; -
CMT/HEAD/source/cmt_error.h
r363 r496 28 28 version_conflict, 29 29 file_access_error, 30 configuration_error, 30 31 execution_error, 31 32 cannot_lock, -
CMT/HEAD/source/cmt_parser.cxx
r487 r496 24 24 #include "cmt_error.h" 25 25 #include "cmt_cvs.h" 26 #include "cmt_vcs.h" 26 27 #include "cmt_lock.h" 27 28 #include "cmt_triggers.h" … … 2355 2356 void Cmt::do_checkout (const ArgParser& ap) 2356 2357 { 2357 Cvs::checkout (ap.arguments); 2358 Vcs::checkout (ap.arguments); 2359 // Cvs::checkout (ap.arguments); 2358 2360 } 2359 2361 … … 5415 5417 { 5416 5418 do_help (ap); 5417 exit (0); 5419 return 2; 5420 // exit (0); 5418 5421 } 5419 5422 … … 5491 5494 { 5492 5495 do_help (ap); 5493 return (0); 5496 int code (0); 5497 if (CmtError::has_pending_error ()) 5498 { 5499 code = CmtError::get_last_error_code (); 5500 CmtError::print (); 5501 } 5502 return code; 5503 //return (0); 5494 5504 } 5495 5505 -
CMT/HEAD/source/cmt_vcs.cxx
r495 r496 11 11 #include "cmt.h" 12 12 #include "cmt_cvs.h" 13 #include "cmt_vcs.h" 13 14 #include "cmt_awk.h" 14 15 #include "cmt_symbol.h" 15 16 #include "cmt_project.h" 16 17 #include "cmt_log.h" 18 #include "cmt_error.h" 17 19 18 20 /** … … 2233 2235 cerr << "Usage:" << endl; 2234 2236 cerr << "> cd <some work area>" << endl; 2235 cerr << "> cmt c heckout [modifier]... <package|project>..." << endl;2237 cerr << "> cmt co | checkout [modifier]... <package|project>..." << endl; 2236 2238 cerr << "" << endl; 2237 2239 cerr << " modifier :" << endl; … … 2250 2252 cerr << " --help print this help" << endl; 2251 2253 cerr << "" << endl; 2252 cerr << "(Modifiers are recognised anywhere on the command line )" << endl;2254 cerr << "(Modifiers are recognised anywhere on the command line.)" << endl; 2253 2255 cerr << "" << endl; 2254 2256 cerr << "> cmt cvstags <package|project>" << endl; … … 3076 3078 } 3077 3079 3080 void Vcs::help () 3081 { 3082 cerr << "Usage:" << endl; 3083 cerr << "> cd <some work area>" << endl; 3084 cerr << "> cmt co | checkout [modifier]... <package|project>..." << endl; 3085 cerr << "" << endl; 3086 cerr << " modifier :" << endl; 3087 cerr << " -l Do not process used packages (default)." << endl; 3088 //cerr << " -R Process used products recursively." << endl; 3089 cerr << " -r rev Check out version tag. (is sticky)" << endl; 3090 cerr << " -vd dir Use this version directory instead of version tag." << endl; 3091 cerr << " -d dir Check out into dir instead of module name." << endl; 3092 cerr << " -o offset Offset in the repository" << endl; 3093 //cerr << " -requirements <requirements file path> Check out packages referenced in this requirements file" << endl; 3094 //cerr << " -t Change file timestamps to the date of checkout" << endl; 3095 //cerr << " -n simulation mode on" << endl; 3096 cerr << " -no_config Disable config step after checkout" << endl; 3097 //cerr << " -v verbose mode on" << endl; 3098 cerr << " -rs suffix Same as -r <packagename|projectname>suffix" << endl; 3099 cerr << " --help print this help" << endl; 3100 cerr << "" << endl; 3101 cerr << "(Modifiers are recognised anywhere on the command line.)" << endl; 3102 // cerr << "" << endl; 3103 // cerr << "> cmt cvstags <package|project>" << endl; 3104 // cerr << "> cmt cvssubpackages <directory>" << endl; 3105 // cerr << "> cmt cvssubprojects <directory>" << endl; 3106 cerr << "" << endl; 3107 } 3108 3109 /** 3110 * When running cmt cvs commands, we stand by definition outside of any existing 3111 * package context. Thus it's likely that CMTPATH are not completely defined. 3112 * This function manually prepends CMTPATH entries to the environment variable. 3113 */ 3114 void Vcs::add_cmtpath (const cmt_string& dir) 3115 { 3116 static cmt_string CMTPATH; 3117 bool add (true); 3118 CmtSystem::cmt_string_vector paths; 3119 3120 cmt_string cmtpath = Symbol::get_env_value ("CMTPATH"); 3121 3122 CmtSystem::split (cmtpath, CmtSystem::path_separator (), paths); 3123 for (int j = 0; j < paths.size (); j++) 3124 { 3125 if (dir == paths[j]) 3126 { 3127 add = false; 3128 break; 3129 } 3130 } 3131 if (add) 3132 { 3133 CMTPATH = dir; 3134 if (cmtpath != "") 3135 { 3136 CMTPATH += CmtSystem::path_separator (); 3137 CMTPATH += cmtpath; 3138 } 3139 CmtSystem::putenv ("CMTPATH", CMTPATH); 3140 } 3141 // if (m_verbose) 3142 // CmtMessage::info ("CMTPATH=" + CmtSystem::getenv ("CMTPATH")); 3143 } 3144 3145 bool Vcs::need_version_directory () 3146 { 3147 bool need_version = false; 3148 3149 { 3150 CmtStructuringStyle style = Cmt::get_current_structuring_style (); 3151 if (style == default_structuring_style) 3152 { 3153 Use& current_use = Use::current (); 3154 if (current_use.get_strategy ("VersionDirectory")) 3155 need_version = true; 3156 } 3157 else if (style == with_version_directory) 3158 need_version = true; 3159 } 3160 3161 return need_version; 3162 } 3163 3164 int Vcs::parse_checkout (const CmtSystem::cmt_string_vector& arguments, 3165 Checkout& checkout, bool& config) 3166 { 3167 if (arguments.size () < 1) 3168 { 3169 CmtError::set (CmtError::syntax_error, "Too few arguments"); 3170 help (); 3171 return 2; 3172 } 3173 3174 /** 3175 * Parse the arguments 3176 */ 3177 bool need_version_tag = false; 3178 bool need_checkout_dir = false; 3179 bool need_version_dir = false; 3180 bool need_offset = false; 3181 bool need_requirements_file = false; 3182 cmt_string version_tag_suffix; 3183 bool need_version_tag_suffix = false; 3184 3185 for (int arg = 0; arg < arguments.size (); arg++) 3186 { 3187 const cmt_string& option = arguments[arg]; 3188 3189 if (need_version_tag 3190 || need_checkout_dir 3191 || need_version_dir 3192 || need_offset 3193 || need_requirements_file) 3194 { 3195 if (option[0] == '-') 3196 { 3197 CmtError::set (CmtError::syntax_error, 3198 "Option argument expected. Option " + option 3199 + " provided"); 3200 // CmtMessage::error ("Option argument expected. Option " + option + " provided"); 3201 help (); 3202 return 2; 3203 } 3204 } 3205 3206 if (need_version_tag) 3207 { 3208 need_version_tag = false; 3209 3210 // if (option == "HEAD") 3211 // { 3212 // m_head = true; 3213 // } 3214 // else 3215 // { 3216 checkout.m_version_tag = option; 3217 // } 3218 } 3219 else if (need_checkout_dir) 3220 { 3221 need_checkout_dir = false; 3222 checkout.m_checkout_dir = option; 3223 } 3224 else if (need_version_dir) 3225 { 3226 need_version_dir = false; 3227 checkout.m_version_dir = option; 3228 } 3229 else if (need_offset) 3230 { 3231 need_offset = false; 3232 checkout.m_offset = option; 3233 //m_offset += '/'; 3234 //m_offset.replace_all ("//", "/"); 3235 } 3236 else if (need_requirements_file) 3237 { 3238 need_requirements_file = false; 3239 //m_head = false; 3240 //checkout_from_requirements (option); 3241 } 3242 else if (need_version_tag_suffix) 3243 { 3244 need_version_tag_suffix = false; 3245 version_tag_suffix = option; 3246 } 3247 else 3248 { 3249 if (option == "-R") 3250 { 3251 CmtMessage::warning ("Option " + option + " not implemented"); 3252 //m_recursive = true; 3253 } 3254 else if (option == "-t") 3255 { 3256 CmtMessage::warning ("Option " + option + " not implemented"); 3257 //need_touch_files = true; 3258 } 3259 else if (option == "-l") 3260 { 3261 //m_recursive = false; 3262 } 3263 else if (option == "-r") 3264 { 3265 need_version_tag = true; 3266 //m_head = false; 3267 } 3268 else if (option == "-d") 3269 { 3270 need_checkout_dir = true; 3271 } 3272 else if (option == "-o") 3273 { 3274 need_offset = true; 3275 } 3276 else if (option == "-n") 3277 { 3278 CmtMessage::warning ("Option " + option + " not implemented"); 3279 //m_simulation = true; 3280 } 3281 else if (option == "-no_config") 3282 { 3283 config = false; 3284 } 3285 else if (option == "-v") 3286 { 3287 CmtMessage::warning ("Option " + option + " not implemented"); 3288 //m_verbose = true; 3289 } 3290 else if (option == "-vd") 3291 { 3292 need_version_dir = true; 3293 } 3294 else if (option == "-requirements") 3295 { 3296 CmtMessage::warning ("Option " + option + " not implemented"); 3297 need_requirements_file = true; 3298 } 3299 else if (option == "-rs") 3300 { 3301 need_version_tag_suffix = true; 3302 //m_head = false; 3303 } 3304 else if (option == "--help") 3305 { 3306 help (); 3307 return 0; 3308 } 3309 else if (option[0] == '-') 3310 { 3311 CmtError::set (CmtError::syntax_error, "Invalid option " + option); 3312 // CmtMessage::error ("Invalid option " + option); 3313 help (); 3314 return 2; 3315 } 3316 else 3317 { 3318 checkout.m_modules.push_back (option); 3319 } 3320 } 3321 } 3322 3323 for (int arg = 0; arg < checkout.m_modules.size (); arg++) 3324 { 3325 if (version_tag_suffix != "") 3326 { 3327 cmt_string name; 3328 CmtSystem::basename (checkout.m_modules[arg], name); 3329 checkout.m_version_tag = name + version_tag_suffix; 3330 } 3331 } 3332 3333 if (checkout.m_modules.size () < 1) 3334 { 3335 CmtError::set (CmtError::syntax_error, "No module to checkout specified"); 3336 // CmtMessage::error ("No module to checkout specified"); 3337 help (); 3338 return 2; 3339 } 3340 // checkout.print (); 3341 return 0; 3342 } 3343 3344 void Vcs::checkout (const CmtSystem::cmt_string_vector& arguments) 3345 { 3346 cmt_string cvsroot = CmtSystem::getenv ("CVSROOT"); 3347 cmt_string svnroot = CmtSystem::getenv ("SVNROOT"); 3348 3349 if (cvsroot != "" && svnroot != "") 3350 { 3351 CmtError::set (CmtError::configuration_error, 3352 "Both CVSROOT and SVNROOT set in environment"); 3353 return; 3354 } 3355 3356 if (cvsroot == "" && svnroot == "") 3357 { 3358 CmtError::set (CmtError::configuration_error, 3359 "Neither CVSROOT nor SVNROOT set in environment"); 3360 return; 3361 } 3362 3363 if (cvsroot != "") 3364 { 3365 Cvs::checkout (arguments); 3366 return; 3367 } 3368 3369 bool config (true); 3370 Checkout checkout; 3371 parse_checkout (arguments, checkout, config); 3372 3373 if (CmtError::has_pending_error ()) return; 3374 3375 add_cmtpath (CmtSystem::pwd ()); 3376 bool with_version_directory (need_version_directory ()); 3377 /* 3378 checkout.print (); 3379 cerr << "config: " << config << endl; 3380 cerr << "with_version_directory: " << with_version_directory << endl; 3381 */ 3382 if (svnroot != "") 3383 { 3384 Svn::checkout (checkout, config, with_version_directory); 3385 return; 3386 } 3387 } 3388 3389 void Svn::checkout (const Vcs::Checkout& checkout, 3390 bool config, bool with_version_directory) 3391 { 3392 cmt_string checkout_command; 3393 Symbol* checkout_command_macro = Symbol::find ("svn_checkout_command"); 3394 if (checkout_command_macro != 0) 3395 { 3396 checkout_command = checkout_command_macro->resolve_macro_value (); 3397 } 3398 if (checkout_command == "") 3399 { 3400 CmtError::set (CmtError::symbol_not_found, 3401 "Macro svn_checkout_command not defined"); 3402 return; 3403 } 3404 3405 cmt_string cmd (checkout_command); 3406 cmt_string msg; 3407 3408 if (!config) 3409 cmd += " --no_config"; 3410 3411 if (with_version_directory) 3412 cmd += " --with_version_directory"; 3413 else 3414 cmd += " --without_version_directory"; 3415 3416 if (checkout.m_version_tag != "") 3417 { 3418 cmd += " -r " + checkout.m_version_tag; 3419 msg += " (" + checkout.m_version_tag + ")"; 3420 } 3421 else 3422 { 3423 msg += " (HEAD)"; 3424 } 3425 if (checkout.m_offset != "") 3426 { 3427 cmd += " -o " + checkout.m_offset; 3428 msg += " offset " + checkout.m_offset; 3429 } 3430 if (checkout.m_checkout_dir != "") 3431 { 3432 cmd += " -d " + checkout.m_checkout_dir; 3433 msg += " in " + checkout.m_checkout_dir; 3434 } 3435 if (checkout.m_version_dir != "") 3436 cmd += " --version-dir " + checkout.m_version_dir; 3437 3438 /** 3439 * Then call checkout for each argument 3440 */ 3441 for (int arg = 0; arg < checkout.m_modules.size (); arg++) 3442 { 3443 const cmt_string& module = checkout.m_modules[arg]; 3444 CmtMessage::info ("Working on " + module + msg); 3445 // cerr << cmd + " " + module << endl; 3446 int status = CmtSystem::execute (cmd + " " + module); 3447 if (0 == status) 3448 { 3449 CmtMessage::info (module + " done."); 3450 } 3451 else 3452 { 3453 CmtError::set (CmtError::execution_failed, cmd + " " + module, status); 3454 } 3455 // do_checkout_phase1 (modules[arg], m_version_dir, version_tag); 3456 } 3457 } -
CMT/HEAD/source/cmt_vcs.h
r495 r496 5 5 //----------------------------------------------------------- 6 6 7 #ifndef __cmt_ cvs_h__8 #define __cmt_ cvs_h__7 #ifndef __cmt_vcs_h__ 8 #define __cmt_vcs_h__ 9 9 10 10 #include "cmt_system.h" 11 11 12 class Cvs12 class Vcs 13 13 { 14 public:14 public: 15 15 16 static void tags (const CmtSystem::cmt_string_vector& arguments); 17 static void branches (const cmt_string& module); 18 static void subpackages (const cmt_string& module); 19 static void subprojects (const cmt_string& module); 16 /* static void tags (const CmtSystem::cmt_string_vector& arguments); */ 17 /* static void branches (const cmt_string& module); */ 18 /* static void subpackages (const cmt_string& module); */ 19 /* static void subprojects (const cmt_string& module); */ 20 20 static void checkout (const CmtSystem::cmt_string_vector& arguments); 21 21 22 class Checkout 23 { 24 public: 25 cmt_string m_version_tag; 26 cmt_string m_checkout_dir; 27 cmt_string m_version_dir; 28 cmt_string m_offset; 29 CmtSystem::cmt_string_vector m_modules; 30 void print () 31 { 32 cerr << "m_version_tag: " << m_version_tag << endl; 33 cerr << "m_checkout_dir: " << m_checkout_dir << endl; 34 cerr << "m_version_dir: " << m_version_dir << endl; 35 cerr << "m_offset: " << m_offset << endl; 36 for (int arg = 0; arg < m_modules.size (); arg++) 37 { 38 cerr << "m_modules[" << arg << "]: " << m_modules[arg] << endl; 39 } 40 } 41 }; 42 43 private: 44 45 static void help (); 46 static void add_cmtpath (const cmt_string& dir); 47 static bool need_version_directory (); 48 static int parse_checkout (const CmtSystem::cmt_string_vector& arguments, 49 Checkout& checkout, bool& config); 50 }; 51 52 class Svn 53 { 54 public: 55 56 static void checkout (const Vcs::Checkout& checkout, 57 bool config, bool with_version_directory); 22 58 }; 23 59
Note: See TracChangeset
for help on using the changeset viewer.