<s> """<STR_LIT>""" <EOL> import optparse <EOL> import os <EOL> import sys <EOL> from conary import checkin <EOL> from conary import command <EOL> from conary import conarycfg <EOL> from conary import conaryclient <EOL> from conary import constants <EOL> from conary import deps <EOL> from conary import errors , keymgmt <EOL> from conary import state <EOL> from conary import versions <EOL> from conary . build import cook , use , signtrove , derive , explain <EOL> from conary . build import errors as builderrors <EOL> from conary . cmds import branch <EOL> from conary . cmds import commit <EOL> from conary . lib import cfg <EOL> from conary . lib import log <EOL> from conary . lib import openpgpfile <EOL> from conary . lib import openpgpkey <EOL> from conary . lib import options <EOL> from conary . lib import util <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> sys . excepthook = util . genExcepthook ( ) <EOL> _commands = [ ] <EOL> def _register ( cmd ) : <EOL> _commands . append ( cmd ) <EOL> ( NO_PARAM , ONE_PARAM ) = ( options . NO_PARAM , options . ONE_PARAM ) <EOL> ( OPT_PARAM , MULT_PARAM ) = ( options . OPT_PARAM , options . MULT_PARAM ) <EOL> STRICT_OPT_PARAM = options . STRICT_OPT_PARAM <EOL> ( NORMAL_HELP , VERBOSE_HELP ) = ( options . NORMAL_HELP , options . VERBOSE_HELP ) <EOL> class CvcCommand ( command . ConaryCommand ) : <EOL> docs = { '<STR_LIT>' : ( VERBOSE_HELP , <EOL> "<STR_LIT>" , '<STR_LIT>' ) , } <EOL> commandGroup = '<STR_LIT>' <EOL> def addConfigOptions ( self , cfgMap , argDef ) : <EOL> cfgMap [ '<STR_LIT>' ] = '<STR_LIT>' , ONE_PARAM <EOL> command . ConaryCommand . addConfigOptions ( self , cfgMap , argDef ) <EOL> class AddCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : "<STR_LIT>" , <EOL> '<STR_LIT:text>' : "<STR_LIT>" } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:text>" ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> text = argSet . pop ( '<STR_LIT:text>' , False ) <EOL> binary = argSet . pop ( '<STR_LIT>' , False ) <EOL> if len ( args ) < <NUM_LIT:2> : return self . usage ( ) <EOL> checkin . addFiles ( args [ <NUM_LIT:1> : ] , text = text , binary = binary , repos = repos , <EOL> defaultToText = False ) <EOL> _register ( AddCommand ) <EOL> class ExplainCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if len ( args ) < <NUM_LIT:3> : <EOL> return explain . docAll ( cfg ) <EOL> return explain . docObject ( cfg , args [ <NUM_LIT:2> ] ) <EOL> _register ( ExplainCommand ) <EOL> class AnnotateCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or len ( args ) != <NUM_LIT:2> : return self . usage ( ) <EOL> args [ <NUM_LIT:0> ] = repos <EOL> checkin . annotate ( * args ) <EOL> _register ( AnnotateCommand ) <EOL> class BranchShadowCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:info>' : '<STR_LIT>' } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:info>" ] = '<STR_LIT>' , NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> makeShadow = ( args [ <NUM_LIT:0> ] == "<STR_LIT>" ) <EOL> sourceOnly = argSet . pop ( '<STR_LIT>' , False ) <EOL> binaryOnly = argSet . pop ( '<STR_LIT>' , False ) <EOL> targetFile = argSet . pop ( "<STR_LIT>" , None ) <EOL> info = argSet . pop ( '<STR_LIT:info>' , False ) <EOL> if argSet : return self . usage ( ) <EOL> if len ( args ) < <NUM_LIT:3> : return self . usage ( ) <EOL> target = args [ <NUM_LIT:1> ] <EOL> troveSpecs = args [ <NUM_LIT:2> : ] <EOL> branch . branch ( repos , cfg , target , troveSpecs , makeShadow = makeShadow , <EOL> sourceOnly = sourceOnly , binaryOnly = binaryOnly , <EOL> info = info , targetFile = targetFile ) <EOL> _register ( BranchShadowCommand ) <EOL> class CheckoutCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet . has_key ( "<STR_LIT>" ) : <EOL> dir = argSet [ '<STR_LIT>' ] <EOL> del argSet [ '<STR_LIT>' ] <EOL> else : <EOL> dir = None <EOL> if argSet or ( len ( args ) < <NUM_LIT:2> ) or ( dir and len ( args ) != <NUM_LIT:2> ) : <EOL> return self . usage ( ) <EOL> coArgs = [ repos , cfg , dir , args [ <NUM_LIT:1> : ] , callback ] <EOL> checkin . checkout ( * coArgs ) <EOL> _register ( CheckoutCommand ) <EOL> class CloneCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> docs = { '<STR_LIT>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:info>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:message>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:test>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:info>" ] = '<STR_LIT>' , NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:message>" ] = '<STR_LIT>' , ONE_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:test>" ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if len ( args ) < <NUM_LIT:3> : <EOL> return self . usage ( ) <EOL> from conary . cmds import clone <EOL> skipBuildInfo = argSet . pop ( '<STR_LIT>' , False ) <EOL> info = argSet . pop ( '<STR_LIT:info>' , False ) <EOL> message = argSet . pop ( "<STR_LIT:message>" , None ) <EOL> test = argSet . pop ( "<STR_LIT:test>" , False ) <EOL> cloneSources = argSet . pop ( '<STR_LIT>' , False ) <EOL> fullRecurse = argSet . pop ( '<STR_LIT>' , False ) <EOL> if argSet : return self . usage ( ) <EOL> clone . CloneTrove ( cfg , args [ <NUM_LIT:1> ] , args [ <NUM_LIT:2> : ] , not skipBuildInfo , info = info , <EOL> cloneSources = cloneSources , message = message , <EOL> test = test , fullRecurse = fullRecurse ) <EOL> _register ( CloneCommand ) <EOL> class PromoteCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> docs = { '<STR_LIT:info>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:message>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT:test>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , <EOL> '<STR_LIT>' <EOL> '<STR_LIT>' ) <EOL> } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:info>" ] = '<STR_LIT>' , NO_PARAM <EOL> argDef [ "<STR_LIT:message>" ] = '<STR_LIT>' , ONE_PARAM <EOL> argDef [ "<STR_LIT:test>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = ONE_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:2> : ] <EOL> troveSpecs = [ ] <EOL> labelList = [ ] <EOL> for arg in args : <EOL> if '<STR_LIT>' in arg : <EOL> labelList . append ( arg . split ( '<STR_LIT>' , <NUM_LIT:1> ) ) <EOL> else : <EOL> troveSpecs . append ( arg ) <EOL> if not labelList or not troveSpecs : <EOL> return self . usage ( ) <EOL> from conary . cmds import clone <EOL> skipBuildInfo = argSet . pop ( '<STR_LIT>' , False ) <EOL> info = argSet . pop ( '<STR_LIT:info>' , False ) <EOL> message = argSet . pop ( "<STR_LIT:message>" , None ) <EOL> test = argSet . pop ( "<STR_LIT:test>" , False ) <EOL> allFlavors = argSet . pop ( "<STR_LIT>" , True ) <EOL> cloneSources = not argSet . pop ( "<STR_LIT>" , False ) <EOL> argSet . pop ( "<STR_LIT>" , False ) <EOL> targetFile = argSet . pop ( "<STR_LIT>" , False ) <EOL> defaultOnly = argSet . pop ( "<STR_LIT>" , False ) <EOL> exactFlavors = argSet . pop ( "<STR_LIT>" , False ) <EOL> excludeGroups = argSet . pop ( "<STR_LIT>" , False ) <EOL> clone . promoteTroves ( cfg , troveSpecs , labelList , <EOL> skipBuildInfo = skipBuildInfo , <EOL> info = info , message = message , test = test , <EOL> cloneSources = cloneSources , allFlavors = allFlavors , <EOL> cloneOnlyByDefaultTroves = defaultOnly , <EOL> targetFile = targetFile , exactFlavors = exactFlavors , <EOL> excludeGroups = excludeGroups ) <EOL> _register ( PromoteCommand ) <EOL> class CommitCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT:message>' : '<STR_LIT>' , <EOL> '<STR_LIT:test>' : ( '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> } <EOL> hobbleShortOpts = False <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT:message>" ] = '<STR_LIT>' , ONE_PARAM <EOL> argDef [ "<STR_LIT:test>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = '<STR_LIT>' , ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> level = log . getVerbosity ( ) <EOL> message = argSet . pop ( "<STR_LIT:message>" , None ) <EOL> test = argSet . pop ( "<STR_LIT:test>" , False ) <EOL> logfile = argSet . pop ( "<STR_LIT>" , None ) <EOL> if argSet or len ( args ) != <NUM_LIT:1> : return self . usage ( ) <EOL> if message and logfile : <EOL> raise errors . ConaryError ( "<STR_LIT>" <EOL> "<STR_LIT>" ) <EOL> if logfile : <EOL> if logfile == '<STR_LIT:->' : <EOL> message = sys . stdin . read ( ) <EOL> else : <EOL> try : <EOL> message = open ( logfile ) . read ( ) <EOL> except IOError , e : <EOL> raise errors . ConaryError ( "<STR_LIT>" % ( <EOL> e . filename , e . strerror ) ) <EOL> message = message . rstrip ( ) <EOL> checkin . commit ( repos , cfg , message , callback = callback , test = test ) <EOL> log . setVerbosity ( level ) <EOL> _register ( CommitCommand ) <EOL> class ContextCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if len ( args ) > <NUM_LIT:2> : <EOL> return self . usage ( ) <EOL> showPasswords = argSet . pop ( '<STR_LIT>' , False ) <EOL> ask = argSet . pop ( '<STR_LIT>' , False ) <EOL> if len ( args ) > <NUM_LIT:1> : <EOL> name = args [ <NUM_LIT:1> ] <EOL> else : <EOL> name = None <EOL> try : <EOL> prettyPrint = sys . stdout . isatty ( ) <EOL> except AttributeError : <EOL> prettyPrint = False <EOL> cfg . setDisplayOptions ( hidePasswords = not showPasswords , <EOL> prettyPrint = prettyPrint ) <EOL> checkin . setContext ( cfg , name , ask = ask , repos = repos ) <EOL> _register ( ContextCommand ) <EOL> class CookCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' , <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , "<STR_LIT>" ) , <EOL> '<STR_LIT>' : optparse . SUPPRESS_HELP , <EOL> '<STR_LIT>' : '<STR_LIT>' <EOL> '<STR_LIT>' , <EOL> '<STR_LIT>' : optparse . SUPPRESS_HELP , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' ) , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : ( '<STR_LIT>' , <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , '<STR_LIT>' <EOL> '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( VERBOSE_HELP , <EOL> '<STR_LIT>' ) <EOL> } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = MULT_PARAM <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = STRICT_OPT_PARAM <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> level = log . getVerbosity ( ) <EOL> macros = { } <EOL> prep = <NUM_LIT:0> <EOL> downloadOnly = False <EOL> resume = None <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> buildFlavor = deps . deps . parseFlavor ( argSet [ '<STR_LIT>' ] , <EOL> raiseError = True ) <EOL> cfg . buildFlavor = deps . deps . overrideFlavor ( cfg . buildFlavor , <EOL> buildFlavor ) <EOL> del argSet [ '<STR_LIT>' ] <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> f = open ( argSet [ '<STR_LIT>' ] ) <EOL> for row in f : <EOL> row = row . strip ( ) <EOL> if not row or row [ <NUM_LIT:0> ] == '<STR_LIT:#>' : <EOL> continue <EOL> cfg . configLine ( '<STR_LIT>' + row . strip ( ) ) <EOL> f . close ( ) <EOL> del f <EOL> del argSet [ '<STR_LIT>' ] <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> for macro in argSet [ '<STR_LIT>' ] : <EOL> cfg . configLine ( '<STR_LIT>' + macro ) <EOL> del argSet [ '<STR_LIT>' ] <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> del argSet [ '<STR_LIT>' ] <EOL> prep = <NUM_LIT:1> <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> del argSet [ '<STR_LIT>' ] <EOL> ignoreDeps = True <EOL> elif argSet . has_key ( '<STR_LIT>' ) : <EOL> del argSet [ '<STR_LIT>' ] <EOL> ignoreDeps = True <EOL> else : <EOL> ignoreDeps = False <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> if argSet . has_key ( '<STR_LIT>' ) or prep == True : <EOL> log . warn ( '<STR_LIT>' ) <EOL> del argSet [ '<STR_LIT>' ] <EOL> ignoreDeps = True <EOL> downloadOnly = True <EOL> showBuildReqs = argSet . pop ( '<STR_LIT>' , False ) <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> cfg . quiet = True <EOL> del argSet [ '<STR_LIT>' ] <EOL> if '<STR_LIT>' in argSet : <EOL> cfg . cleanAfterCook = False <EOL> del argSet [ '<STR_LIT>' ] <EOL> allowFlavorChange = argSet . pop ( '<STR_LIT>' , False ) <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> resume = argSet [ '<STR_LIT>' ] <EOL> del argSet [ '<STR_LIT>' ] <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> unknownFlags = argSet [ '<STR_LIT>' ] <EOL> del argSet [ '<STR_LIT>' ] <EOL> else : <EOL> unknownFlags = False <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> del argSet [ '<STR_LIT>' ] <EOL> cfg . debugRecipeExceptions = True <EOL> crossCompile = argSet . pop ( '<STR_LIT>' , None ) <EOL> if crossCompile : <EOL> parts = crossCompile . split ( '<STR_LIT>' ) <EOL> isCrossTool = False <EOL> if len ( parts ) == <NUM_LIT:1> : <EOL> crossTarget = crossCompile <EOL> crossHost = None <EOL> else : <EOL> crossHost , crossTarget = parts <EOL> if crossHost == '<STR_LIT>' : <EOL> crossHost = None <EOL> isCrossTool = True <EOL> crossCompile = ( crossHost , crossTarget , isCrossTool ) <EOL> targetFile = argSet . pop ( "<STR_LIT>" , None ) <EOL> if argSet : return self . usage ( ) <EOL> groupOptions = cook . GroupCookOptions ( alwaysBumpCount = True , <EOL> errorOnFlavorChange = not allowFlavorChange , <EOL> shortenFlavors = cfg . shortenGroupFlavors ) <EOL> items = args [ <NUM_LIT:1> : ] <EOL> if not items : <EOL> if os . path . isfile ( '<STR_LIT>' ) : <EOL> conaryState = state . ConaryStateFromFile ( '<STR_LIT>' , repos ) <EOL> items = [ conaryState ] <EOL> if not items : <EOL> return self . usage ( ) <EOL> try : <EOL> cook . cookCommand ( cfg , items , prep , macros , resume = resume , <EOL> allowUnknownFlags = unknownFlags , ignoreDeps = ignoreDeps , <EOL> showBuildReqs = showBuildReqs , profile = profile , <EOL> crossCompile = crossCompile , downloadOnly = downloadOnly , <EOL> groupOptions = groupOptions , <EOL> changeSetFile = targetFile , <EOL> ) <EOL> except builderrors . GroupFlavorChangedError , err : <EOL> err . args = ( err . args [ <NUM_LIT:0> ] + <EOL> '<STR_LIT>' , ) <EOL> raise <EOL> log . setVerbosity ( level ) <EOL> _register ( CookCommand ) <EOL> class DeriveCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> hidden = True <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT:target>' : '<STR_LIT>' , <EOL> '<STR_LIT:info>' : '<STR_LIT>' } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = ONE_PARAM <EOL> argDef [ "<STR_LIT:info>" ] = '<STR_LIT>' , NO_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> argDef [ '<STR_LIT:target>' ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> checkoutDir = argSet . pop ( '<STR_LIT>' , None ) <EOL> extract = argSet . pop ( '<STR_LIT>' , False ) <EOL> targetLabel = argSet . pop ( '<STR_LIT:target>' , None ) <EOL> info = False <EOL> if argSet . has_key ( '<STR_LIT:info>' ) : <EOL> del argSet [ '<STR_LIT:info>' ] <EOL> info = True <EOL> if argSet or len ( args ) != <NUM_LIT:2> : <EOL> return self . usage ( ) <EOL> troveSpec = args [ <NUM_LIT:1> ] <EOL> if extract and '<STR_LIT>' in troveSpec . split ( '<STR_LIT:=>' ) [ <NUM_LIT:0> ] : <EOL> return self . usage ( ) <EOL> if targetLabel : <EOL> try : <EOL> targetLabel = versions . Label ( targetLabel ) <EOL> except : <EOL> return self . usage ( ) <EOL> else : <EOL> targetLabel = cfg . buildLabel <EOL> callback = derive . DeriveCallback ( cfg . trustThreshold ) <EOL> derive . derive ( repos , cfg , targetLabel , troveSpec , <EOL> checkoutDir = checkoutDir , extract = extract , <EOL> info = info , callback = callback ) <EOL> _register ( DeriveCommand ) <EOL> class DiffCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if not args or len ( args ) < <NUM_LIT:2> : return self . usage ( ) <EOL> diffArgs = [ repos , ] <EOL> diffArgs . append ( argSet . pop ( '<STR_LIT>' , None ) ) ; <EOL> if len ( args ) > <NUM_LIT:2> : <EOL> diffArgs . append ( args [ <NUM_LIT:2> : ] ) ; <EOL> return checkin . diff ( * diffArgs ) <EOL> _register ( DiffCommand ) <EOL> class LogCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> hidden = True <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> newer = argSet . pop ( '<STR_LIT>' , False ) <EOL> if argSet or len ( args ) > <NUM_LIT:2> : return self . usage ( ) <EOL> args [ <NUM_LIT:0> ] = repos <EOL> branch = None <EOL> if len ( args ) == <NUM_LIT:2> : <EOL> branch = args [ <NUM_LIT:1> ] <EOL> checkin . showLog ( repos , branch = branch , newer = newer ) <EOL> _register ( LogCommand ) <EOL> class RdiffCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or len ( args ) != <NUM_LIT:4> : return self . usage ( ) <EOL> checkin . rdiff ( repos , cfg . buildLabel , * args [ <NUM_LIT:1> : ] ) <EOL> _register ( RdiffCommand ) <EOL> class RefreshCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> checkin . refresh ( repos , cfg , args [ <NUM_LIT:1> : ] ) <EOL> _register ( RefreshCommand ) <EOL> class RemoveCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if len ( args ) < <NUM_LIT:2> : return self . usage ( ) <EOL> for f in args [ <NUM_LIT:1> : ] : <EOL> checkin . removeFile ( f , repos = repos ) <EOL> _register ( RemoveCommand ) <EOL> class RenameCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if len ( args ) != <NUM_LIT:3> : return self . usage ( ) <EOL> checkin . renameFile ( args [ <NUM_LIT:1> ] , args [ <NUM_LIT:2> ] , repos = repos ) <EOL> _register ( RenameCommand ) <EOL> class AddKeyCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> hidden = True <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if len ( args ) == <NUM_LIT:3> : <EOL> user = args [ <NUM_LIT:2> ] <EOL> elif len ( args ) == <NUM_LIT:2> : <EOL> user = None <EOL> else : <EOL> return self . usage ( ) <EOL> server = argSet . pop ( '<STR_LIT>' , None ) <EOL> keymgmt . addKey ( cfg , server , user ) <EOL> _register ( AddKeyCommand ) <EOL> class GetKeyCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> hidden = True <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if len ( args ) != <NUM_LIT:3> : <EOL> return self . usage ( ) <EOL> else : <EOL> fingerprint = args [ <NUM_LIT:2> ] <EOL> server = argSet . pop ( '<STR_LIT>' , None ) <EOL> keymgmt . showKey ( cfg , server , fingerprint ) <EOL> _register ( GetKeyCommand ) <EOL> class ListKeysCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> hidden = True <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if len ( args ) > <NUM_LIT:3> : <EOL> return self . usage ( ) <EOL> elif len ( args ) == <NUM_LIT:3> : <EOL> user = args [ <NUM_LIT:2> ] <EOL> else : <EOL> user = None <EOL> server = argSet . pop ( '<STR_LIT>' , None ) <EOL> showFps = '<STR_LIT>' in argSet <EOL> keymgmt . displayKeys ( cfg , server , user , showFingerprints = showFps ) <EOL> _register ( ListKeysCommand ) <EOL> class RevertCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> paramHelp = "<STR_LIT>" <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> if argSet : return self . usage ( ) <EOL> checkin . revert ( repos , args [ <NUM_LIT:2> : ] ) <EOL> _register ( RevertCommand ) <EOL> _register ( DiffCommand ) <EOL> class SignCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' } <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if len ( args ) < <NUM_LIT:2> : return self . usage ( ) <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> cfg . quiet = True <EOL> del argSet [ '<STR_LIT>' ] <EOL> recurse = argSet . pop ( '<STR_LIT>' , False ) <EOL> signtrove . signTroves ( cfg , args [ <NUM_LIT:1> : ] , recurse ) <EOL> _register ( SignCommand ) <EOL> class NewPkgCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> docs = { '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' , <EOL> '<STR_LIT>' : '<STR_LIT>' } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = ONE_PARAM <EOL> argDef [ '<STR_LIT>' ] = OPT_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> dir = argSet . pop ( '<STR_LIT>' , None ) <EOL> template = argSet . pop ( '<STR_LIT>' , None ) <EOL> factory = argSet . pop ( '<STR_LIT>' , None ) <EOL> if factory is True : <EOL> factory = '<STR_LIT>' <EOL> if len ( args ) != <NUM_LIT:2> or argSet : <EOL> return self . usage ( ) <EOL> checkin . newTrove ( repos , cfg , args [ <NUM_LIT:1> ] , dir = dir , template = template , <EOL> factory = factory ) <EOL> _register ( NewPkgCommand ) <EOL> class MergeCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or not args or len ( args ) > <NUM_LIT:2> : return self . usage ( ) <EOL> if len ( args ) == <NUM_LIT:2> : <EOL> kw = dict ( versionSpec = args [ <NUM_LIT:1> ] ) <EOL> else : <EOL> kw = { } <EOL> checkin . merge ( cfg , repos , ** kw ) <EOL> _register ( MergeCommand ) <EOL> class MarkRemovedCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or not args or len ( args ) != <NUM_LIT:2> : return self . usage ( ) <EOL> checkin . markRemoved ( cfg , repos , args [ <NUM_LIT:1> ] ) <EOL> _register ( MarkRemovedCommand ) <EOL> class SetCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> hidden = True <EOL> docs = { '<STR_LIT:text>' : ( '<STR_LIT>' ) , <EOL> '<STR_LIT>' : ( '<STR_LIT>' ) } <EOL> def addParameters ( self , argDef ) : <EOL> CvcCommand . addParameters ( self , argDef ) <EOL> argDef [ "<STR_LIT>" ] = NO_PARAM <EOL> argDef [ "<STR_LIT:text>" ] = NO_PARAM <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> binary = argSet . pop ( '<STR_LIT>' , False ) <EOL> text = argSet . pop ( '<STR_LIT:text>' , False ) <EOL> if binary and text : <EOL> log . error ( "<STR_LIT>" ) <EOL> return <NUM_LIT:1> <EOL> if argSet : return self . usage ( ) <EOL> if len ( args ) < <NUM_LIT:2> : return self . usage ( ) <EOL> checkin . setFileFlags ( repos , args [ <NUM_LIT:1> : ] , text = text , binary = binary ) <EOL> _register ( SetCommand ) <EOL> class StatCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or not args or len ( args ) > <NUM_LIT:2> : return self . usage ( ) <EOL> args [ <NUM_LIT:0> ] = repos <EOL> checkin . stat_ ( * args ) <EOL> _register ( StatCommand ) <EOL> class StatCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT:status>' , '<STR_LIT>' , '<STR_LIT>' ] <EOL> help = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or not args or len ( args ) > <NUM_LIT:1> : return self . usage ( ) <EOL> args [ <NUM_LIT:0> ] = repos <EOL> checkin . stat_ ( * args ) <EOL> _register ( StatCommand ) <EOL> class UpdateCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' , '<STR_LIT>' ] <EOL> paramHelp = "<STR_LIT>" <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:2> : ] <EOL> if argSet : return self . usage ( ) <EOL> kwargs = { '<STR_LIT>' : callback } <EOL> checkin . updateSrc ( repos , versionList = args , ** kwargs ) <EOL> _register ( UpdateCommand ) <EOL> class FactoryCommand ( CvcCommand ) : <EOL> commands = [ '<STR_LIT>' ] <EOL> paramHelp = '<STR_LIT>' <EOL> help = '<STR_LIT>' <EOL> commandGroup = '<STR_LIT>' <EOL> def runCommand ( self , cfg , argSet , args , profile = False , <EOL> callback = None , repos = None ) : <EOL> args = args [ <NUM_LIT:1> : ] <EOL> if argSet or len ( args ) > <NUM_LIT:2> : return self . usage ( ) <EOL> args [ <NUM_LIT:0> ] = repos <EOL> checkin . factory ( * args [ <NUM_LIT:1> : ] ) <EOL> _register ( FactoryCommand ) <EOL> class CvcMain ( command . MainHandler ) : <EOL> name = '<STR_LIT>' <EOL> abstractCommand = CvcCommand <EOL> configClass = conarycfg . ConaryConfiguration <EOL> version = constants . version <EOL> commandList = _commands <EOL> hobbleShortOpts = True <EOL> def usage ( self , rc = <NUM_LIT:1> , showAll = False ) : <EOL> print '<STR_LIT>' <EOL> if not showAll : <EOL> print <EOL> print '<STR_LIT>' <EOL> return options . MainHandler . usage ( self , rc , showAll = showAll ) <EOL> def runCommand ( self , thisCommand , cfg , argSet , args , debugAll = False ) : <EOL> client = conaryclient . ConaryClient ( cfg ) <EOL> repos = client . getRepos ( ) <EOL> callback = commit . CheckinCallback ( cfg ) <EOL> if not cfg . buildLabel and cfg . installLabelPath : <EOL> cfg . buildLabel = cfg . installLabelPath [ <NUM_LIT:0> ] <EOL> sys . excepthook = util . genExcepthook ( debug = cfg . debugExceptions , <EOL> debugCtrlC = debugAll ) <EOL> if cfg . installLabelPath : <EOL> cfg . installLabel = cfg . installLabelPath [ <NUM_LIT:0> ] <EOL> else : <EOL> cfg . installLabel = None <EOL> cfg . initializeFlavors ( ) <EOL> log . setMinVerbosity ( log . INFO ) <EOL> log . resetErrorOccurred ( ) <EOL> use . setBuildFlagsFromFlavor ( None , cfg . buildFlavor , error = False ) <EOL> profile = False <EOL> if argSet . has_key ( '<STR_LIT>' ) : <EOL> import cProfile <EOL> prof = cProfile . Profile ( ) <EOL> prof . enable ( ) <EOL> profile = '<STR_LIT>' <EOL> del argSet [ '<STR_LIT>' ] <EOL> keyCache = openpgpkey . getKeyCache ( ) <EOL> keyCache . setPublicPath ( cfg . pubRing ) <EOL> repos = conaryclient . ConaryClient ( cfg ) . getRepos ( ) <EOL> keyCacheCallback = openpgpkey . KeyCacheCallback ( repos , <EOL> cfg ) <EOL> keyCache . setCallback ( keyCacheCallback ) <EOL> try : <EOL> rv = options . MainHandler . runCommand ( self , thisCommand , <EOL> cfg , argSet , args , <EOL> callback = callback , <EOL> repos = client . getRepos ( ) , <EOL> profile = profile ) <EOL> finally : <EOL> if profile == '<STR_LIT>' : <EOL> prof . disable ( ) <EOL> prof . dump_stats ( '<STR_LIT>' ) <EOL> prof . print_stats ( ) <EOL> elif profile : <EOL> prof . stop ( ) <EOL> if log . errorOccurred ( ) : <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> return rv <EOL> def sourceCommand ( cfg , args , argSet , profile = False , callback = None , <EOL> thisCommand = None ) : <EOL> if thisCommand is None : <EOL> thisCommand = CvcMain ( ) . _supportedCommands [ args [ <NUM_LIT:0> ] ] <EOL> if not callback : <EOL> callback = commit . CheckinCallback ( cfg ) <EOL> client = conaryclient . ConaryClient ( cfg ) <EOL> repos = client . getRepos ( ) <EOL> return thisCommand . runCommand ( cfg , argSet , [ '<STR_LIT>' ] + list ( args ) , <EOL> profile = profile , <EOL> callback = callback , <EOL> repos = repos ) <EOL> def main ( argv = None ) : <EOL> if argv is None : <EOL> argv = sys . argv <EOL> sys . stdout = util . FileIgnoreEpipe ( sys . stdout ) <EOL> try : <EOL> argv = list ( argv ) <EOL> debugAll = '<STR_LIT>' in argv <EOL> if debugAll : <EOL> debuggerException = Exception <EOL> argv . remove ( '<STR_LIT>' ) <EOL> else : <EOL> debuggerException = errors . InternalConaryError <EOL> cvcMain = CvcMain ( ) <EOL> ccfg = cvcMain . getConfigFile ( argv ) <EOL> if debugAll : <EOL> ccfg . debugExceptions = True <EOL> ccfg . debugRecipeExceptions = True <EOL> sys . excepthook = util . genExcepthook ( debug = ccfg . debugExceptions , <EOL> debugCtrlC = debugAll ) <EOL> return cvcMain . main ( argv , debuggerException , debugAll = debugAll , <EOL> cfg = ccfg ) <EOL> except debuggerException : <EOL> raise <EOL> except ( errors . ConaryError , errors . CvcError , cfg . CfgError , <EOL> openpgpfile . PGPError ) , e : <EOL> if str ( e ) : <EOL> log . error ( str ( e ) ) <EOL> sys . exit ( <NUM_LIT:2> ) <EOL> else : <EOL> raise <EOL> except KeyboardInterrupt , e : <EOL> pass <EOL> return <NUM_LIT:1> <EOL> if __name__ == "<STR_LIT:__main__>" : <EOL> sys . exit ( main ( ) ) </s>
