rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
for item in files.fieldsChanged(csInfo): print " %s" % item | sys.stdout.write('\n'.join(files.fieldsChanged(csInfo))) | def diff(repos, versionStr = None): try: state = SourceStateFromFile("SRS") except OSError: return if state.getVersion() == versions.NewVersion(): log.error("no versions have been committed") return if versionStr: versionStr = state.expandVersionStr(versionStr) pkgList = repos.findTrove(None, state.getName(), versio... |
str = " " + " ".join(lines) | str = "".join(lines) | def diff(repos, versionStr = None): try: state = SourceStateFromFile("SRS") except OSError: return if state.getVersion() == versions.NewVersion(): log.error("no versions have been committed") return if versionStr: versionStr = state.expandVersionStr(versionStr) pkgList = repos.findTrove(None, state.getName(), versio... |
d['debug'] = NO_PARAM, 'Print debugging information' | d['debug'] = COUNT_PARAM, 'Print helpful debugging output (use multiple times for internal debug info)' | def _processArgs(params, cfgMap, cfg, usage, argv=sys.argv, version=None, commonParams=None, useHelp=False, defaultGroup=None, interspersedArgs=True, hobbleShortOpts=False): argSet = {} # don't mangle the command line argv = argv[:] # historically, usage was generally a function to print out the usage # message. We w... |
log.setVerbosity(log.LOWLEVEL) | def _processArgs(params, cfgMap, cfg, usage, argv=sys.argv, version=None, commonParams=None, useHelp=False, defaultGroup=None, interspersedArgs=True, hobbleShortOpts=False): argSet = {} # don't mangle the command line argv = argv[:] # historically, usage was generally a function to print out the usage # message. We w... | |
return "no new troves found" | return "no new troves were found" | def __str__(self): return "no new troves found" |
def eraseTrove(pkg, versionStr = None, tagScript = None): pkgList = self.db.findTrove(pkg, versionStr) list = [] for p in pkgList: list.append((p.getName(), p.getVersion(), p.getFlavor())) self.db.eraseTroves(list, tagScript = tagScript) | def applyChangeSet(self, pkg, replaceFiles = False, tagScript = None, keepExisting = False): """Applies a change set from a file to the system.""" self._prepareRoot() cs = changeset.ChangeSetFromFile(pkg) if cs.isAbsolute(): cs = self.db.rootChangeSet(cs) | |
retInsert = db.trigger(table, column, "INSERT") retUpdate = db.trigger(table, column, "UPDATE") | retInsert = db.createTrigger(table, column, "INSERT") retUpdate = db.createTrigger(table, column, "UPDATE") | def createTrigger(db, table, column = "changed"): retInsert = db.trigger(table, column, "INSERT") retUpdate = db.trigger(table, column, "UPDATE") return retInsert or retUpdate |
cu = self.cu cu.execute(""" CREATE TABLE TroveTroves2( | self.cu.execute(""" CREATE TABLE TroveTroves2( | def migrate(self): cu = self.cu cu.execute(""" CREATE TABLE TroveTroves2( instanceId INTEGER NOT NULL, includedId INTEGER NOT NULL, flags INTEGER NOT NULL DEFAULT 0, changed NUMERIC(14,0) NOT NULL DEFAULT 0, CONSTRAINT TroveTroves_instanceId_fk FOREIGN KEY (instanceId) REFERENCES Instances(i... |
cu.execute(''' INSERT INTO TroveTroves2 SELECT instanceId, includedId, CASE WHEN byDefault THEN %d ELSE 0 END, | self.cu.execute(""" INSERT INTO TroveTroves (instanceId, includedId, flags, changed) SELECT instanceId, includedId, CASE WHEN byDefault THEN %d ELSE 0 END, | def migrate(self): cu = self.cu cu.execute(""" CREATE TABLE TroveTroves2( instanceId INTEGER NOT NULL, includedId INTEGER NOT NULL, flags INTEGER NOT NULL DEFAULT 0, changed NUMERIC(14,0) NOT NULL DEFAULT 0, CONSTRAINT TroveTroves_instanceId_fk FOREIGN KEY (instanceId) REFERENCES Instances(i... |
FROM TroveTroves''' % TROVE_TROVES_BYDEFAULT) cu.execute('DROP TABLE TroveTroves') cu.execute('ALTER TABLE TroveTroves2 RENAME TO TroveTroves') cu.execute("CREATE UNIQUE INDEX TroveTrovesInstanceIncluded_uq ON " "TroveTroves(instanceId,includedId)") cu.execute("CREATE INDEX TroveTrovesIncludedIdx ON TroveTroves(in... | FROM TroveTroves2""" % TROVE_TROVES_BYDEFAULT) self.cu.execute("DROP TABLE TroveTroves") self.cu.execute("ALTER TABLE TroveTroves2 RENAME TO TroveTroves") self.db.loadSchema() createTroves() | def migrate(self): cu = self.cu cu.execute(""" CREATE TABLE TroveTroves2( instanceId INTEGER NOT NULL, includedId INTEGER NOT NULL, flags INTEGER NOT NULL DEFAULT 0, changed NUMERIC(14,0) NOT NULL DEFAULT 0, CONSTRAINT TroveTroves_instanceId_fk FOREIGN KEY (instanceId) REFERENCES Instances(i... |
self.db.loadSchema() | def migrate(self): cu = self.cu cu.execute(""" CREATE TABLE TroveTroves2( instanceId INTEGER NOT NULL, includedId INTEGER NOT NULL, flags INTEGER NOT NULL DEFAULT 0, changed NUMERIC(14,0) NOT NULL DEFAULT 0, CONSTRAINT TroveTroves_instanceId_fk FOREIGN KEY (instanceId) REFERENCES Instances(i... | |
if childTup in seen: | if childTup in toErase: | def findAllWeakTrovesToRemove(group, primaryErases, cache): # we only remove weak troves if either a) they are primary # removes or b) they are referenced only by troves being removed primaryErases = list(primaryErases) toErase = set(primaryErases) seen = set() parents = {} troveQueue = util.IterableQueue() # create... |
seen.add(childTup) | def findAllWeakTrovesToRemove(group, primaryErases, cache): # we only remove weak troves if either a) they are primary # removes or b) they are referenced only by troves being removed primaryErases = list(primaryErases) toErase = set(primaryErases) seen = set() parents = {} troveQueue = util.IterableQueue() # create... | |
class FilesError(Exception): | class FilesError(errors.ConaryError): | def ThawFile(frz, pathId): if frz[0] == "-": return RegularFile(pathId, streamData = frz) elif frz[0] == "d": return Directory(pathId, streamData = frz) elif frz[0] == "p": return NamedPipe(pathId, streamData = frz) elif frz[0] == "s": return Socket(pathId, streamData = frz) elif frz[0] == "l": return SymbolicLink(path... |
SELECT Matched.reqDepId as depId, | SELECT MAX(Matched.reqDepId) as depId, | def _resolveStmt(requiresTable, providesTableList, depTableList, restrictBy = None, restrictor=None): subselect = "" |
Matched.provInstId | Matched.provInstId, Matched.reqInstId, DepCheck.flagCount | def _resolveStmt(requiresTable, providesTableList, depTableList, restrictBy = None, restrictor=None): subselect = "" |
util.execute('strip '+p) | util.execute('strip -g'+p) | def doFile(self, path): |
@param version: object for the version and release @type version: VersionRelease @param release: release number @type release: int | @param verRel: object for the version and release @type verRel: VersionRelease | def appendVersionReleaseObject(self, verRel): |
print 'start transaction', SQL | def execute(self, SQL, *parms, **kwargs): start_transaction = kwargs.get('start_transaction', True) SQL = SQL.strip() self._checkNotClosed("execute") startingTransaction = False if self.con.autocommit: pass elif start_transaction: if not self.con.inTransaction: if len(SQL) >= 5 and SQL[:5].upper() == "BEGIN": starting... | |
builddir = util.normpath(os.cfg.buildPath) + "/" + recipeObj.name | builddir = util.normpath(cfg.buildPath) + "/" + recipeObj.name | def cookPackageObject(repos, cfg, recipeClass, buildBranch, prep=True, macros={}, targetLabel = None, sourceVersion=None, resume = None, alwaysBumpCount=False): """ Turns a package recipe object into a change set. Returns the absolute changeset created, a list of the names of the packages built, and and a tuple with a ... |
if replacedInfo[1]: | if replaced[0] is not None: | # def _mergeGroupChanges -- main body begins here |
elif not ignorePins: | if replaced[0] is not None and not ignorePins: | # def _mergeGroupChanges -- main body begins here |
streamId = _STREAM_SHORT | def __init__(self, val = None): | |
streamId = _STREAM_INT | def __init__(self, val = None): | |
streamId = _STREAM_MTIME | def __init__(self, val = None): | |
streamId = _STREAM_LONGLONG | def twm(self, diff, base): | |
streamId = _STREAM_STRING | def twm(self, diff, base): | |
streamId = _STREAM_DEPENDENCIES | def __init__(self, s = ''): | |
streamId = _STREAM_STRINGS | def __init__(self, dep = ''): assert(type(dep) is str) self.deps = None self.thaw(dep) | |
streamId = _STREAM_DEVICE | def __init__(self, first = None, *rest): | |
streamId = _STREAM_SIZESHA1 | def setSha1(self, value): return self.items[1].set(value) | |
streamId = _STREAM_INODE | def setSha1(self, value): return self.items[1].set(value) | |
streamId = _STREAM_FLAGS | def __eq__(self, other): | |
streamList = ( ("inode", InodeStream), ("flags", FlagsStream), ("tags", StringsStream) ) | streamDict = { _STREAM_INODE : (InodeStream, "inode"), _STREAM_FLAGS : (FlagsStream, "flags"), _STREAM_TAGS : (StringsStream, "tags") } | def _isFlag(self, flag, set): |
for name, streamClass in self.streamList: | for streamClass, name in self.streamDict.itervalues(): | def copy(self): |
if not data: for (name, streamType) in self.streamList: self.__setattr__(name, streamType()) else: | for streamType, name in self.streamDict.itervalues(): self.__setattr__(name, streamType()) if data: | def initializeStreams(self, data): |
for (name, streamType) in self.streamList: | while i < dataLen: | def initializeStreams(self, data): |
assert(streamId == streamType.streamId) | (streamType, name) = self.streamDict[streamId] | def initializeStreams(self, data): |
assert(i == dataLen) | def initializeStreams(self, data): | |
for (name, streamType) in self.streamList: | for streamType, name in self.streamDict.itervalues(): | def diff(self, other): |
for (name, streamType) in self.streamList: | for streamType, name in self.streamDict.itervalues(): | def twm(self, diff, base, skip = None): |
conflicts = conflicts or w | def twm(self, diff, base, skip = None): | |
for (name, streamType) in self.streamList: | for streamType, name in self.streamDict.itervalues(): | def __eq__(self, other): |
for (name, streamType) in self.streamList: | for streamType, name in self.streamDict.itervalues(): | def metadataEqual(self, other, ignoreOwnerGroup): |
for (name, streamType) in self.streamList: | for streamId, (streamType, name) in self.streamDict.iteritems(): | def freeze(self): |
rc.append(struct.pack("!BH", streamType.streamId, len(s)) + s) | if len(s): rc.append(struct.pack("!BH", streamId, len(s)) + s) | def freeze(self): |
streamList = File.streamList + (("target", StringStream ),) | streamDict = { _STREAM_TARGET : (StringStream, "target") } streamDict.update(File.streamDict) | def __init__(self, fileId, streamData = None): assert(self.__class__ is not File) |
streamList = File.streamList + (("devt", DeviceStream ),) | streamDict = { _STREAM_DEVICE : (DeviceStream, "devt") } streamDict.update(File.streamDict) | def remove(self, target): |
streamList = File.streamList + (('contents', RegularFileStream), ('provides', DependenciesStream), ('requires', DependenciesStream), ('flavor', DependenciesStream)) | streamDict = { _STREAM_CONTENTS : (RegularFileStream , 'contents' ), _STREAM_PROVIDES : (DependenciesStream, 'provides' ), _STREAM_REQUIRES : (DependenciesStream, 'requires' ), _STREAM_FLAVOR : (DependenciesStream, 'flavor' ) } streamDict.update(File.streamDict) | def restore(self, fileContents, root, target, restoreContents): |
for (name, streamType) in RegularFile.streamList: | for streamType, name in RegularFile.streamDict.itervalues(): | def contentsChanged(diff): if diff[0] == 0: return False type = diff[1] if type != "-": return False i = 2 for (name, streamType) in RegularFile.streamList: size = struct.unpack("!H", diff[i:i+2])[0] i += 2 if name == "contents": return size != 0 i += size return False |
for (name, streamType) in cl.streamList: | for streamType, name in cl.streamDict.itervalues(): | def fieldsChanged(diff): sameType = struct.unpack("B", diff[0]) if not sameType: return [ "type" ] type = diff[1] i = 2 if type == "-": cl = RegularFile elif type == "d": cl = Directory elif type == "b": cl = BlockDevice elif type == "c": cl = CharacterDevice elif type == "s": cl = Socket elif type == "l": cl = Symbol... |
d.append(v) | d[troveName].append(v) | def iterTroveLeafsByLabelBulk(self, troveNameList, labelStr): |
def _findErasures(primaryErases, newJob, referencedTroves, recurse): | def _findErasures(primaryErases, newJob, referencedTroves, recurse, ineligible): | def _findErasures(primaryErases, newJob, referencedTroves, recurse): # each node is a ((name, version, flavor), state, edgeList # fromUpdate) # state is ERASE, KEEP, or UNKNOWN # # fromUpdate is True if erasing this node reflects a trove being # replaced by a different one in the Job (an update, not an erase) #... |
recurse) | recurse, ineligible) | # def _mergeGroupChanges -- main body begins here |
%(mode, _permmap[self.mode])) | %(self.mode, _permmap[self.mode])) | def chmod(self, destdir, path): |
log.debug("mirroring %d sigs", len(sigs)) | def mirrorSignatures(sourceRepos, targetRepos, currentMark, cfg, test = False, syncSigs = False): log.debug("looking for new pgp keys") keyList = sourceRepos.getNewPGPKeys(cfg.host, currentMark) if test: log.debug("(not adding %d keys due to test mode)", len(keyList)) else: log.debug("adding %d keys to target", len(key... | |
% (versionStr, name, ', '.join(x.asString() for x in labelPath)) | % (versionStr, name) | def missingMsg(self, name): labelPath = set(x.keys()[0] for x in self.query[name] if x.keys()) versionStr = self.map[name][1].split('/')[-1] if labelPath: return "revision %s of %s was not found on label(s) %s" \ % (versionStr, name, ', '.join(x.asString() for x in labelPath)) else: return "revision %s of %s was not fo... |
cs.newTrove(newTrv.diff(oldTrv)[0]) | continue newCs.newTrove(newTrv.diff(oldTrv)[0]) | def _findTroveObj(availSet, (name, version, flavor)): info = (name, version, flavor) (inDb, fromCs) = availSet[info] |
trove = cs.getNewPackageVersion(troveName, newVer, vewFla) | trove = cs.getNewPackageVersion(troveName, newVer, newFla) | def displayChangeSet(db, repos, cs, troveList, cfg, ls = False, tags = False, fullVersions=False, showChanges=False, all=False, deps=False, sha1s=False, ids=False): (troves, hasVersions) = getTroves(cs, troveList) if all: showChanges = ls = tags = fullVersions = deps = True if not (ls or tags or sha1s or ids): if hasV... |
if argSet or not args or len(args) > 2: return self.usage() | if argSet or not args or len(args) > 1: return self.usage() | def runCommand(self, cfg, argSet, args, profile = False, callback = None, repos = None): args = args[1:] if argSet or not args or len(args) > 2: return self.usage() |
if (hunk.contextCount - conflictCount) < 2: | if conflictCount and (hunk.contextCount - conflictCount) < 2: | def patch(oldLines, unifiedDiff): i = 0 last = len(unifiedDiff) hunks = [] while i < last: (magic1, fromRange, toRange, magic2) = unifiedDiff[i].split() if magic1 != "@@" or magic2 != "@@" or fromRange[0] != "-" or \ toRange[0] != "+": raise BadHunkHeader() (fromStart, fromLen) = fromRange.split(",") fromStart = int(f... |
resetVerbosity = (log.getVerbosity() == log.DEBUG) | resetVerbosity = (log.getVerbosity() == log.LOWLEVEL) | def resolveGroupDependencies(group, cache, cfg, repos, labelPath, flavor, callback): """ Add in any missing dependencies to group """ callback.groupResolvingDependencies() # set up configuration cfg = copy.deepcopy(cfg) cfg.dbPath = ':memory:' cfg.root = ':memory:' cfg.installLabelPath = labelPath cfg.autoResolve = T... |
log.setVerbosity(log.INFO) | log.setVerbosity(log.DEBUG) | def resolveGroupDependencies(group, cache, cfg, repos, labelPath, flavor, callback): """ Add in any missing dependencies to group """ callback.groupResolvingDependencies() # set up configuration cfg = copy.deepcopy(cfg) cfg.dbPath = ':memory:' cfg.root = ':memory:' cfg.installLabelPath = labelPath cfg.autoResolve = T... |
log.setVerbosity(log.DEBUG) | log.setVerbosity(log.LOWLEVEL) | def resolveGroupDependencies(group, cache, cfg, repos, labelPath, flavor, callback): """ Add in any missing dependencies to group """ callback.groupResolvingDependencies() # set up configuration cfg = copy.deepcopy(cfg) cfg.dbPath = ':memory:' cfg.root = ':memory:' cfg.installLabelPath = labelPath cfg.autoResolve = T... |
res = self.getTroveLeavesByBranch(byBranchNoFlavorj, | res = self.getTroveLeavesByBranch(byBranchNoFlavor, | def findTroves(self, labelPath, troves, defaultFlavor = None, acrossRepositories = False, affinityDatabase = None): from deps.deps import overrideFlavor results = {} remaining = [] affinityTroveMap = {} byBranch = {} byBranchNoFlavor = {} byBranchMap = {} byVersion = {} byVersionNoFlavor = {} byVersionMap = {} byLabel ... |
missing.append(byBrancMap[name]) | missing.append(byBranchMap[name]) | def findTroves(self, labelPath, troves, defaultFlavor = None, acrossRepositories = False, affinityDatabase = None): from deps.deps import overrideFlavor results = {} remaining = [] affinityTroveMap = {} byBranch = {} byBranchNoFlavor = {} byBranchMap = {} byVersion = {} byVersionNoFlavor = {} byVersionMap = {} byLabel ... |
return ' '.join(val) | return ' '.join([val[0], str(val[1])]) | def format(self, val, displayOptions=None): return ' '.join(val) |
Flavors.flavor | Flavors.flavor, flags | def getTroveContainers(self, l): cu = self.db.cursor() cu.execute("CREATE TEMPORARY TABLE ftc(idx INTEGER, name STRING, " "version STRING, " "flavor STRING)", start_transaction = False) result = [] for idx, info in enumerate(l): cu.execute("INSERT INTO ftc VALUES(?, ?, ?, ?)", idx, info[0], info[1].asString(), info[2].... |
for (idx, name, version, flavor) in cu: | for (idx, name, version, flavor, flags) in cu: if flags & schema.TROVE_TROVES_WEAKREF: continue | def getTroveContainers(self, l): cu = self.db.cursor() cu.execute("CREATE TEMPORARY TABLE ftc(idx INTEGER, name STRING, " "version STRING, " "flavor STRING)", start_transaction = False) result = [] for idx, info in enumerate(l): cu.execute("INSERT INTO ftc VALUES(?, ?, ?, ?)", idx, info[0], info[1].asString(), info[2].... |
cu.execute(self.__select, key) | cu.execute(self.__select(), key) | def get(self, key, defValue): cu = self.db.cursor() cu.execute(self.__select, key) |
cu.execute(self.__select, key) | cu.execute(self.__select(), key) | def has_key(self, key): cu = self.db.cursor() cu.execute(self.__select, key) |
return self.sources + self.tarballs + self.patches + \ flatten(self.signatures.items()) | sources = [] for (tarball, extractdir) in self.tarballs: sources.append(tarball) for (patch, level, backup) in self.patches: sources.append(patch) return sources + self.sources + flatten(self.signatures.items()) | def allSources(self): |
print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to display most information about the changeset" | print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to display most information about the changeset" print " --recurse-repository Search repositories for... | def usage(): print "conary showcs <changeset> [trove[=version]]" print " Accepts all common display options. Also," print " --show-changes For modifications, show the old " print " file info below new" print " --all Combine tags to displa... |
alwaysDisplayHeaders = False, | alwaysDisplayHeaders = False, recurseRepos=False, | def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None... |
deps = tags = recurse = showTroveFlags = showAllTroves = True | deps = recurse = showTroveFlags = showAllTroves = True | def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None... |
fileDeps = lsl = True | fileDeps = lsl = tags = True | def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None... |
querySource = trovesource.stack(changeSetSource, client.getRepos()) | if recurseRepos: querySource = trovesource.stack(changeSetSource, client.getRepos()) else: querySource = changeSetSource | def displayChangeSet(db, cs, troveSpecs, cfg, # trove options info = False, digSigs = False, deps = False, showBuildReqs = False, all = False, # file options ls = False, lsl = False, ids = False, sha1s = False, tags = False, fileDeps = False, fileVersions = False, # collection options showTroves = False, recurse = None... |
opt = self._match_long_opt(rargs[0].split('=')[0]) option = self._long_opt[opt] | def _process_long_opt(self, rargs, values): if '=' in rargs[0]: had_explicit_value = True else: had_explicit_value = False opt = self._match_long_opt(rargs[0].split('=')[0]) option = self._long_opt[opt] option.had_explicit_value = had_explicit_value return optparse.OptionParser._process_long_opt(self, rargs, values) | |
import traceback traceback.print_stack() | def loadSchema(self): import traceback traceback.print_stack() assert(self.dbh) # keyed by table, values are indexes on the table self.tables = sqllib.CaselessDict() self.views = sqllib.CaselessDict() self.functions = sqllib.CaselessDict() self.sequences = sqllib.CaselessDict() self.triggers = sqllib.CaselessDict() sel... | |
self.delTrove(trv.getName(), trv.getVersion()) | self.delTrove(trv.getName(), trv.getVersion(), forUpdate = True) | def updateTrove(self, trv): |
def delTrove(self, name, version): | def delTrove(self, name, version, forUpdate = False): | def delTrove(self, name, version): |
foundOne = False removeList = [] | updateTrove = False | def delTrove(self, name, version): |
foundOne = True | updateTrove = True | def delTrove(self, name, version): |
if foundOne: | if updateTrove: | def delTrove(self, name, version): |
else: log.warning("%s not found in %s", name, trv.getName()) | foundOne = True | def delTrove(self, name, version): |
def genExcepthook(dumpStack=True, debugCtrlC=False): | def genExcepthook(dumpStack=True, debugCtrlC=False, prefix='conary-stack-'): | def genExcepthook(dumpStack=True, debugCtrlC=False): def excepthook(type, value, tb): if type is bdb.BdbQuit: sys.exit(1) sys.excepthook = sys.__excepthook__ if type == KeyboardInterrupt and not debugCtrlC: sys.exit(1) lines = traceback.format_exception(type, value, tb) if dumpStack: try: (tbfd,path) = tempfile.mkstemp... |
(tbfd,path) = tempfile.mkstemp('', 'conary-stack-') | (tbfd,path) = tempfile.mkstemp('', prefix) | def excepthook(type, value, tb): if type is bdb.BdbQuit: sys.exit(1) sys.excepthook = sys.__excepthook__ if type == KeyboardInterrupt and not debugCtrlC: sys.exit(1) lines = traceback.format_exception(type, value, tb) if dumpStack: try: (tbfd,path) = tempfile.mkstemp('', 'conary-stack-') output = os.fdopen(tbfd, 'w') s... |
pass | s = os.lstat(p) if stat.S_ISDIR(s.st_mode): pass else: raise else: raise | def mkdirChain(*paths): for path in paths: if path[0] != "/": path = os.getcwd() + "/" + path paths = path.split('/') for n in (range(2,len(paths) + 1)): p = string.join(paths[0:n], "/") if not os.path.exists(p): # don't die in case of the race condition where someone # made the directory after we stat'ed for it. try... |
depPath = path[len(sysPathEntry)+1:] break | newDepPath = path[len(sysPathEntry)+1:] if newDepPath not in ('__init__.py', '__init__'): depPath = newDepPath break | def _addPythonProvides(self, path, m, pkg, macros): |
depPath = depPath[len(sysPathEntry)+1:] break | newDepPath = depPath[len(sysPathEntry)+1:] if newDepPath not in ('__init__', '__init__.py'): depPath = newDepPath break | def _addPythonRequirements(self, path, fullpath, pkg, script=False): # FIXME: we really should check for python in destdir and shell # out to use that python to discover the dependencies if it exists. destdir = self.recipe.macros.destdir |
(idx, troveInstanceId, isRedirect, timeStamps) = \ troveIdList.pop(0)[0:4] | (idx, troveInstanceId, isRedirect, timeStamps, clName, clVersion, clMessage) = troveIdList.pop(0) | def iterTroves(self, troveInfoList, withFiles = True, withFileStreams = False): |
singleTroveInfo = troveIdList[idx] if singleTroveInfo[4] is not None: changeLog = changelog.ChangeLog(*singleTroveIds[4:7]) | singleTroveInfo = troveInfoList[idx] if clName is not None: changeLog = changelog.ChangeLog(clName, clVersion, clMessage) | def iterTroves(self, troveInfoList, withFiles = True, withFileStreams = False): |
versionList = versionList, reqVer = reqVer) | versionList = versionList, reqVer = reqVer, metadata = metadata) | def troveInfo(self, auth, t, v): leaves = self.client.getTroveVersionList(self.serverName, {t: [None]}) versionList = sorted(leaves[t].keys(), reverse = True) |
return | return apache.OK | def getMetadata(self, auth, troveName, branch, source, freshmeatName): branch = self.repServer.thawVersion(branch) |
db.createIndex("FileStreams", "FileStreamsIdx", "fileId") | db.createIndex("FileStreams", "FileStreamsFileIdx", "fileId", unique = True) | def createTroves(db): cu = db.cursor() commit = False if 'FileStreams' not in db.tables: cu.execute(""" CREATE TABLE FileStreams( streamId %(PRIMARYKEY)s, fileId %(BINARY20)s, stream %(MEDIUMBLOB)s, changed NUMERIC(14,0) NOT NULL DEFAULT 0 ) %(TABLEOPTS)s""" % db.keywords) db.tables["FileStreams"] = []... |
for item in v.items(): | for item in v.versions: | def getSourceBranch(self): """ Takes a binary version and returns its associated source version (any trailing version info is left untouched). If source is branched off of <repo1>-2 into <repo2>, its new version will be <repo1>-2/<repo2>/2. The corresponding build will be on branch <repo1>-2-0/<repo2>/2-1. getSourceBr... |
return thisScore | return score | def score(self, requirements): |
self.msg = ("Insufficient permission to access server %s" % self.server) | msg = ("Insufficient permission to access server %s" % self.server) | def __init__(self, server = None): self.server = server if server: self.msg = ("Insufficient permission to access server %s" % self.server) else: self.msg = "Insufficient permission" |
self.msg = "Insufficient permission" | msg = "Insufficient permission" ConaryError.__init__(self, msg) | def __init__(self, server = None): self.server = server if server: self.msg = ("Insufficient permission to access server %s" % self.server) else: self.msg = "Insufficient permission" |
start = gzip.GzipFile('', 'r', fileobj = control).read() | start = gzip.GzipFile(None, 'r', fileobj = control).read() | def __init__(self, fileName, skipValidate = 1): if type(fileName) is str: f = open(fileName, "r") csf = filecontainer.FileContainer(f) else: csf = filecontainer.FileContainer(fileName) |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.