;ò ø¸=Fc@s‚dkZdkZdkZdkTdkTdkTd„Zd„Zd„Zd„Z d„Z ddd„Z d „Z d „Z dS( N(s*c Cs|djo d}n3|ddgjo d}n|djogSn| o½ytdƒ} Wn2tj o&} t|tdƒt | ƒƒqXy| i ƒ}| i ƒWn8tj o,} t |td ƒt | ƒƒd }qX|d d jo|d }qn|od |} nd } g}|djoÿ|}x1|oéd }g} x©|D] }|iidƒ o?t|tdƒ|iƒƒ|i|ƒ|i| ƒ|Sn| p|id|jo+| i|ƒ|i|ƒ|id}qaqaWt|| || ƒ} | o|i| ƒqFqFWn=x9|D]1}t|| |||ƒ o|i|ƒqBqBW|SdS(sCHandle CVS command "action". Return non-zero when it worked.sfetchscheckoutscheckinspublishscommitsunlocksCVS/Roots-Cannot open for obtaining CVSROOT: "CVS/Root"s-Cannot read for obtaining CVSROOT: "CVS/Root"siÿÿÿÿs s-dstagstag attribute missing for "%s"N(sactionsserversopensfs StandardErrorses msg_extrasrecdicts_sstrsreadlinescloses msg_warnings serverargsfailedsnodeliststodoliststagsthislistsnodes attributesshas_keys msg_errors short_namesextendsappendsremovescvs_tagscvs_command_nodesurl_dict( srecdictsserversurl_dictsnodelistsactionstagsfailedsnodestodolists serverargsesfsthislist((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys cvs_commandsf           cCs³dkl}|g|dƒtiidƒoHtiidƒ}tii |ƒ odk l }||dƒqxnt d|dd ƒ}|o|Snt|d dd ƒSd S( sG Prepare for using the cvs command. Returns the program name. (s assert_pkgscvssHOMEs ~/.cvspass(s touch_filei¤is_nosCVSCMDsCVSsN(s DoInstalls assert_pkgsrecdictsossenvironsgetspaths expandusersfnsexistssCommandss touch_files get_var_valsns get_progname(srecdictsns touch_files assert_pkgsfn((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys cvs_prepare`s  cCsšt|tdƒttd„|ƒƒƒt|ƒ}d}x&|D]}|d|i ƒd}qBWt |d||||fƒdjogSn|SdS( sTHandle CVS tag command for a list of nodes. Return list of nodes that failed.sCVS tag for nodes %scCs |iƒS(N(sxs short_name(sx((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys|sss"s" s"%s" %s tag "%s" %siN(smsg_infosrecdicts_sstrsmapsnodelists cvs_preparescvscmdsnamessnodes short_names logged_systems serverargstag(srecdicts serverargstagsnodelistscvscmdsnamessnode((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pyscvs_tagxs)  cCsd}tii|dƒ}yt|ƒ}Wn\tj oP}tii tii|dƒƒo%t |t dƒ|t|ƒƒqüntXy|iƒ}|iƒWn6tj o*}t |t dƒ|t|ƒƒn!X|ddjo|d }n|SdS( sAGet the first line of the CVS/Repository file in directory "dir".ssCVS/RepositorysCVSs.Cannot open for obtaining path in module: "%s"s.Cannot read for obtaining path in module: "%s"iÿÿÿÿs N(scvspathsosspathsjoinsdirsfnamesopensfs StandardErrorsesexistss msg_warningsrecdicts_sstrsreadlinesclose(srecdictsdirscvspathsfsfnamese((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pyscvs_get_repositoryŒs$"$  c Cst|tdƒ||iƒfƒ|iƒ}d}x@|o8|}t i i |ƒ}||joPn|d}q8W|djoÜd} |idƒo|d} |i} nWt i it i i|idƒƒo |i} nt i i |iƒ} t|| ƒ} t| ƒ}t| ƒ}xS|o2t i i|ƒt i i|ƒjo"t|tdƒ| | fƒPnt i i |ƒ}||jo"t|td ƒ| | fƒPn|}t i i |ƒ} | |joPn| }| oPnt||ƒ}| oPntt i i|ƒƒt i i|ƒjo"t|td ƒ||fƒPq#q#Wnt i i |iƒ}|id ƒo|d }n4|iid ƒo|id }nt|d ƒ}t i ƒ}t"||ƒo d}nOyt i#|ƒWn:t$j o.}t&|td ƒ|t'|ƒƒdSnXt(|d|ƒ|iƒ}d} |djot i i+|ƒo>t,|ƒt-|ƒ} yt i.|| ƒWq¼d} q¼Xnz|ii/dƒo d}nd}t1||||||d|ƒ} | o|ddgjo+t1||dd||d|ddƒ} nWd| oWyt i.| |ƒWqªt$j o0}t|tdƒ| |ft'|ƒƒqªXn|oNyt i#|ƒWqÿt$j o*}t|tdƒ|t'|ƒƒqÿXnX| SdS(sPHandle CVS command "action" for one node. Return non-zero when it worked.sCVS %s for node "%s"iischeckoutsspathsCVSsKmismatch between path in cvs:// and tail of recipe directory: "%s" and "%s"s=path in cvs:// is longer than recipe directory: "%s" and "%s"sNmismatch between contents of CVS/Repository at different levels: "%s" and "%s"slogentrysLOGENTRYs"Could not change to directory "%s"sCvs command in "%s"sremovesbinarys-kbs dirlevelssaddscommitsauto_addNs%Could not move file "%s" back to "%s"s#Could not go back to directory "%s"(4smsg_infosrecdicts_sactionsnodes short_namesns dirlevelssprevsosspathsdirnamescvspathsurl_dictshas_keys recipe_dirs dir_for_pathsisdirsjoinsabsnamescvs_get_repositorys fname_foldsadirsbasenamesmsg_notesndirs msg_errorsnpathspslogentrys attributessget_var_val_intsgetcwdscwds fname_equalschdirs StandardErrorses msg_warningsstrsmsg_logs node_namestmpnamesexistssassert_aap_dirs in_aap_dirsrenamesgets addbinargs exec_cvs_cmds serverargsok(srecdicts serverargsurl_dictsnodesactionscwds dirlevelss node_namesndirscvspathsnpathstmpnames dir_for_pathsoksprevsadirspaths addbinargsnspslogentryse((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pyscvs_command_node§s´#     %   %  +        0+icCsHt|ƒ} |od|}nd}|djoÓd} x nod| |||f}t ||ƒ\} } | oËt || ƒti| dƒdjpti| dƒdjo | o|o6t|td ƒƒt||||| ƒd} qDn| o/ti| d ƒdjpti| d ƒdjo d} qAnPqDW| p| pti| d ƒdjo| Sny4t|td ƒƒt|d| |||fƒWn2tj o&} t|tdƒt| ƒƒnXt|d| |||fƒdjSn|djo d}nt|d| ||||fƒdjSdS(sþExecute the CVS command for "action". Handle failure. For "commit" may create directories up to "dirlevels" upwards. When "auto_add" is non-zero and committing fails, try to add the file first. Return non-zero when it worked.s-m "%s"sscommitiis"%s" %s commit %s "%s"sno version heresnot open CVS/Entriess;Directory does not appear to exist in repository, adding itsnothing known aboutscvs addsUp-to-date check faileds6File does not appear to exist in repository, adding its"%s" %s add %s "%s"sAdding file failed: sadds"%s" %s %s %s "%s"N(s cvs_preparesrecdictscvscmdslogentryslogargsactions did_add_dirs serverargs node_namescmdsredir_system_intsokstextsmsg_logsstringsfindsauto_addsmsg_infos_s commit_dirs dirlevelss logged_systems addbinargs StandardErrorses msg_warningsstr(srecdicts serverargsactions addbinargslogentrys node_names dirlevelssauto_addslogargstexts did_add_dirsescvscmdsokscmd((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys exec_cvs_cmd6sB   A9( !"'  cCsÁtiƒ}yštidƒtii|ƒ}| otii|ƒ}n|djotii dƒ ot ||||d|ƒnt|d|||fƒWnnXti|ƒdS(saCommit to create the current directory. If its parent is not in CVS either go up further.s..isCVSis"%s" %s add "%s"N(sossgetcwdscwdschdirspathsdirnames node_namesbasenames dirlevelssisdirs commit_dirsrecdicts serverargscvscmds logged_system(srecdicts node_names serverargs dirlevelsscvscmdsdirnamescwd((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys commit_dir…s  !c Cs•tii|dƒ} yt| ƒ}Wn:tj o.}t |t dƒ| t |ƒƒgSnXy|i ƒ}|iƒWn:tj o.}t |t dƒ| t |ƒƒgSnXg} xË|D]Ã} ti| dƒ} | djoqÆn| d} ti| d| ƒ}|djoqÆntii|| | |!ƒ}| ddjo|o#| it||||dƒƒqÆ| i|ƒqÆW| SdS( s®Obtain a list of items in CVS for directory "dirname". Recursively entry directories if "recursive" is non-zero. "name" is not used, we don't access the server.s CVS/EntriessCannot open "%s": sCannot read "%s": s/iisDN(sosspathsjoinsdirnamesfnamesopensfs StandardErrorses msg_errorsrecdicts_sstrs readlinesslinessclosesresslinesstringsfindsssitems recursivesextendscvs_listsnames commit_itemsappend( srecdictsnames commit_itemsdirnames recursivesesfslinessitemsssfnamesressline((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pyscvs_list™s8!  !    #(sstringsossos.pathsErrorsMessagesUtils cvs_commands cvs_preparescvs_tagscvs_get_repositoryscvs_command_nodes exec_cvs_cmds commit_dirscvs_list( scvs_tagscvs_get_repositorysstringscvs_command_nodes commit_dirscvs_lists cvs_prepares exec_cvs_cmdsoss cvs_command((s0/mnt/gmirror/ports/devel/aap/work/VersContCvs.pys? s    L    O