<s> import sys <EOL> if '<STR_LIT>' not in sys . path : <EOL> sys . path . append ( '<STR_LIT>' ) <EOL> import vistrails . db . services . vistrail <EOL> from vistrails . db . domain import DBModule , DBConnection , DBPort , DBFunction , DBParameter , DBLocation , DBPortSpec , DBTag , DBAnnotation , DBVistrail , DBAction <EOL> from vistrails . db . services import io <EOL> def main ( out_fname , in_fnames ) : <EOL> """<STR_LIT>""" <EOL> ( save_bundle , vt_save_dir ) = io . open_bundle_from_zip_xml ( DBVistrail . vtType , in_fnames [ <NUM_LIT:0> ] ) <EOL> for in_fname in in_fnames [ <NUM_LIT:1> : ] : <EOL> ( new_save_bundle , new_save_dir ) = io . open_bundle_from_zip_xml ( DBVistrail . vtType , in_fname ) <EOL> vistrails . db . services . vistrail . merge ( save_bundle , new_save_bundle , "<STR_LIT>" , True , vt_save_dir , new_save_dir ) <EOL> io . save_bundle_to_zip_xml ( save_bundle , out_fname ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> if len ( sys . argv ) < <NUM_LIT:3> : <EOL> print "<STR_LIT>" % sys . argv [ <NUM_LIT:0> ] <EOL> sys . exit ( <NUM_LIT:0> ) <EOL> main ( sys . argv [ <NUM_LIT:1> ] , sys . argv [ <NUM_LIT:2> : ] ) </s>
