rem stringlengths 0 322k | add stringlengths 0 2.05M | context stringlengths 8 228k |
|---|---|---|
d = { 'uuid' : uuid, 'keywords' : kwds } | d = { 'changes' changes: , 'keywords' : kwds } | def repositoryCallback(uuid, notification, reason, **kwds): if notification == 'History': eventPath = '//parcels/osaf/framework/item_' + reason else: return event = Globals.repository.findPath(eventPath) from osaf.framework.notifications.Notification import Notification note = Notification(event) note.threadid = id(t... |
from osaf.framework.notifications.NotificationManager import NotificationManager Globals.notificationManager = NotificationManager() | def setUp(self): RepositoryTestCase.RepositoryTestCase.setUp(self) | |
def onItemChanged(note): uuid = note.GetData()['uuid'] print 'Changed:', Globals.repository[uuid].itsPath def onItemAdded(note): uuid = note.GetData()['uuid'] print 'Added:', Globals.repository[uuid].itsPath def onItemDeleted(note): uuid = note.GetData()['uuid'] print 'Deleted:', uuid e = rep.findPath('//parcels/osaf... | def onItemChanged(note): uuid = note.GetData()['uuid'] print 'Changed:', Globals.repository[uuid].itsPath | |
style = wxTR_DEFAULT_STYLE if self.hideRoot: style |= wxTR_HIDE_ROOT if self.noLines: style |= wxTR_NO_LINES if self.useButtons: style |= wxTR_HAS_BUTTONS else: style |= wxTR_NO_BUTTONS treeList = wxTreeList(parentWindow, Block.getwxID(self), style = style) | treeList = wxTreeList(parentWindow, Block.getwxID(self), style = self.Calculate_wxStyle()) | def renderOneBlock(self, parent, parentWindow): style = wxTR_DEFAULT_STYLE if self.hideRoot: style |= wxTR_HIDE_ROOT if self.noLines: style |= wxTR_NO_LINES if self.useButtons: style |= wxTR_HAS_BUTTONS else: style |= wxTR_NO_BUTTONS treeList = wxTreeList(parentWindow, Block.getwxID(self), style = style) info = wxTreeL... |
node.AddChildNode (None, child, false) else: node.AddRootNode (['Repository Viewer', 'Demo'], 'Views', true) | node.AddChildNode (None, [child], false) else: node.AddRootNode (['Repository Viewer', 'Demo'], ['Views'], true) | def OnGetTreeListDataEvent (self, notification): node = notification.data['node'] item = node.GetData() if item: for child in item: node.AddChildNode (None, child, false) else: node.AddRootNode (['Repository Viewer', 'Demo'], 'Views', true) |
buildOptions.append("--debug") | buildOptions.append("FINAL=0") | def build(buildenv): version = buildenv['version'] if buildenv['os'] in ('osx', 'posix'): # Create the build directory buildDir = os.path.abspath("build_%s" % version) if os.access(buildDir, os.F_OK): hardhatlib.log(buildenv, hardhatlib.HARDHAT_MESSAGE, info['name'], "Temporary build directory exists: " + buildDir... |
style = wx.NO_BORDER | wx.TE_PROCESS_ENTER | wx.TE_NO_VSCROLL | style = wx.NO_BORDER | wx.TE_NO_VSCROLL | def __init__(self, parent, defocusCallback=None, *arguments, **keywords): # Windows and Mac add an extra vertical scrollbar for TE_MULTILINE, # GTK doesn't. Further, if GTK is not multiline, then the single # line mode looks really wonky with a huge cursor. # # The undocumented flag TE_NO_VSCROLL solves these problems... |
endDay = datetime(startDay.year, startDay.month, startDay.day + 1) | def wxSynchronizeWidget(self, **hints): # We now want the preview area to always appear. If the calendar is visible, however, we always want the # preview area to describe today, rather than the currently selected day. minical = Block.Block.findBlockByName("MiniCalendar") if isMainCalendarVisible() or not minical: tod... | |
endDay = datetime(startDay.year, startDay.month, startDay.day + 1) | endDay = startDay + timedelta(days=1) | def wxSynchronizeWidget(self, **hints): # We now want the preview area to always appear. If the calendar is visible, however, we always want the # preview area to describe today, rather than the currently selected day. minical = Block.Block.findBlockByName("MiniCalendar") if isMainCalendarVisible() or not minical: tod... |
hardhatlib.setupEnvironment(buildenv) | def doFunctionalTests(releaseMode, workingDir, log): hardhatlib.setupEnvironment(buildenv) chandlerDir = os.path.join(workingDir, "chandler") if buildenv['os'] == 'win': runChandler = 'RunChandler.bat' else: runChandler = 'RunChandler' if releaseMode == 'debug': runChandler = os.path.join(chandlerDir, 'debug', runCh... | |
hardhatlib.setupEnvironment(buildenv) | def doPerformanceTests(hardhatScript, mode, workingDir, outputDir, buildVersion, log): hardhatlib.setupEnvironment(buildenv) chandlerDir = os.path.join(workingDir, "chandler") testDir = os.path.join(chandlerDir, 'tools', 'QATestScripts', 'Performance') if buildenv['version'] == 'debug': python = buildenv['python_... | |
startDay = self.parent.blockItem.getStartDay() | startDay = self.parent.blockItem.rangeStart | def DrawBackground(self, dc): self._doDrawingCalculations(dc) |
startDay = self.parent.blockItem.getStartDay() | startDay = self.parent.blockItem.rangeStart | def DrawCells(self, dc): self._doDrawingCalculations(dc) self.canvasItemList = [] |
self.OnSelectItem(event) | def OnCreateItem(self, unscrolledPosition, createOnDrag): if createOnDrag: # @@@ disable until we work out repository issues # event.duration = DateTime.DateTimeDelta(0, 0, 60) # x, y = self.getPositionFromDateTime(newTime) # eventRect = wx.Rect(x, y, # self.dayWidth - 1, # ... | |
startDay = self.parent.blockItem.getStartDay() | startDay = self.parent.blockItem.rangeStart | def getDateTimeFromPosition(self, position): startDay = self.parent.blockItem.getStartDay() # @@@ fixes Bug#1831, but doesn't really address the root cause # (the window is drawn with (0,0) virtual size on mac) if self.dayWidth > 0: deltaDays = (position.x - self.xOffset) / self.dayWidth else: deltaDays = 0 deltaHours ... |
def getStartDay(self): if self.daysPerView == 7: startDay = self.rangeStart + \ DateTime.RelativeDateTime(days=-6, weekday=(DateTime.Sunday, 0)) else: startDay = self.rangeStart return startDay | def instantiateWidget(self): return wxWeekPanel(self.parentBlock.widget, Block.Block.getWidgetID(self)) | |
displayName=_(u'Welcome to Chandler %(version)s' % {'version': version.version}), | displayName=_(u'Welcome to Chandler %(version)s') % {'version': version.version}, | def installParcel(parcel, oldVersion=None): import scripts as Scripts from osaf import sharing, startup from osaf.framework import scripting pim_ns = schema.ns('osaf.pim', parcel) sharing_ns = schema.ns('osaf.sharing', parcel) me = pim.Contact.update(parcel, 'me', displayName=_(u'Me'), contactName=pim.ContactName.up... |
The Chandler Team""" % {'version': version.version}) | The Chandler Team""") % {'version': version.version} | def installParcel(parcel, oldVersion=None): import scripts as Scripts from osaf import sharing, startup from osaf.framework import scripting pim_ns = schema.ns('osaf.pim', parcel) sharing_ns = schema.ns('osaf.sharing', parcel) me = pim.Contact.update(parcel, 'me', displayName=_(u'Me'), contactName=pim.ContactName.up... |
attrType = ItemHandler.ItemHandler.typeHandler(item.itsView, value) | attrType = ItemHandler.ItemHandler.typeHandler(item.itsView, valueString) | def SetAttributeValue (self, item, attributeName, valueString): # attempt access as a Chandler attribute first attrType = item.getAttributeAspect(attributeName, "type", True) if attrType is None: attrType = ItemHandler.ItemHandler.typeHandler(item.itsView, value) |
super(RefDict, self).__setitem__(key, value, previousKey, nextKey, alias) | link = super(RefDict, self).__setitem__(key, value, previousKey, nextKey, alias) | def __setitem__(self, key, value, previousKey=None, nextKey=None, alias=None, load=True): |
index.insertKey(key, previousKey) | index.insertKey(key, link._previousKey) | def __setitem__(self, key, value, previousKey=None, nextKey=None, alias=None, load=True): |
def __getDisplayName(self): return self.__dict__.get('displayName') def __setDisplayName(self,val): self.__dict__['displayName'] = val self.setDoc() displayName = property(__getDisplayName,__setDisplayName) | def __getDisplayName(self): return self.__dict__.get('displayName') | |
name = self.displayName if not name: name = self.docInfo() else: name = "%s -- %s" % (name.encode('utf8'),self.docInfo()) | name = self.docInfo() | def setDoc(self): doc = self.doc name = self.displayName if not name: name = self.docInfo() else: name = "%s -- %s" % (name.encode('utf8'),self.docInfo()) if not doc: doc = name else: doc = "%s\n\n%s" % (name,doc) self._setattr('__doc__',doc) |
if aspect=='displayName': val = val or unicode(self.name) elif aspect=='type': | if aspect=='type': | def _init_schema_item(self, attr, view): kind = attr.itsParent = itemFor(self.owner, view) attr.itsName = self.name |
textColor = wx.SYS_COLOUR_HIGHLIGHTTEXT | textColor = wx.Colour(64, 64, 64) | def _SetLabelStyle (self, item, attributeName, dc): if self.labelStyle == 'OnLeft': """ For Label-On-Left collect label layout information: self.editOffset - offset of the edit area self.labelOffset - offset of the label area """ assert not self.isShared, "Label on Left presentationStyle not allowed for shared Attribut... |
textColor = wx.SYS_COLOUR_BTNTEXT dc.SetTextForeground (wx.SystemSettings.GetColour(textColor)) | textColor = wx.SystemSettings.GetColour (wx.SYS_COLOUR_BTNTEXT) dc.SetTextForeground (textColor) | def _SetLabelStyle (self, item, attributeName, dc): if self.labelStyle == 'OnLeft': """ For Label-On-Left collect label layout information: self.editOffset - offset of the edit area self.labelOffset - offset of the label area """ assert not self.isShared, "Label on Left presentationStyle not allowed for shared Attribut... |
def Create (self, parent, id): control = super (LocationAttributeEditor, self).Create (parent, id) control.Bind (wx.EVT_TEXT, self.onTextChanged) return control def onTextChanged(self, event): """ Text changed, for any reason. """ event.Skip() self.showingTheLabel = False | def Create (self, parent, id): control = super (LocationAttributeEditor, self).Create (parent, id) control.Bind (wx.EVT_TEXT, self.onTextChanged) # any time the text changes return control | |
wrapped = textwrap.wrap(title, self.width) | wrapped = self.textwrap(title, self.width) | def make_title(self, title, underline = None): """Wrap title to specified length and add optional underline.""" |
wrapped = textwrap.wrap(text, self.width) | wrapped = self.textwrap(text, self.width) | def handle_author(self, node): """Transform 'author' tags into: |
wrapped = textwrap.wrap(link, self.width - indent) | wrapped = self.textwrap(link, self.width - indent) | def handle_section(self, node): """Transform 'section' tags into: |
wrapped = textwrap.wrap(value, self.width) | wrapped = self.textwrap(value, self.width) | def handle_body(self, node): """Transform 'body' tags into wrapped text.""" |
self.links.append(link) number = self.link_count + len(self.links) | if not link in self.links: self.links.append(link) number = self.link_count + self.links.index(link) + 1 | def handle_mail(self, node): """Transform 'mail' tags into: |
wrapped = textwrap.wrap(value.strip(), self.width-3) | wrapped = self.textwrap(value.strip(), self.width-3) | def handle_ul(self, node): """Transform 'ul' tags into: |
wrapped = textwrap.wrap(value.strip(), self.width - len(prefix)) | wrapped = self.textwrap(value.strip(), self.width - len(prefix)) | def handle_ol(self, node): """Transform 'ol' tags into: |
self.links.append(link) number = self.link_count + len(self.links) | if not link in self.links: self.links.append(link) number = self.link_count + self.links.index(link) + 1 | def handle_uri(self, node): """Transform 'uri' tags into: |
self.infolist.append({"name":f_splitted[0], "version":f_splitted[1], "build":f_splitted[3]}) self.list.append(f_splitted[0]) if not f_splitted[0] in self: self.append(f_splitted[0]) | try: self.infolist.append({"name":f_splitted[0], "version":f_splitted[1], "build":f_splitted[3]}) self.list.append(f_splitted[0]) if not f_splitted[0] in self: self.append(f_splitted[0]) except: pass | def build_local_infolist(self): self.infolist = [] self.list = [] for f in os.listdir("/var/log/packages/"): f_splitted = f.rsplit("-", 3) self.infolist.append({"name":f_splitted[0], "version":f_splitted[1], "build":f_splitted[3]}) self.list.append(f_splitted[0]) if not f_splitted[0] in self: self.append(f_splitted[0])... |
prettyprint (["Package", "Version", "Build", "Repo"], [25, 10, 6, 30]) | def do_list(self, args): if not args: args = self.repos for pkg in self.repos_packages: prettyprint (["Package", "Version", "Build", "Repo"], [25, 10, 6, 30]) for pkg_info in self.repos_packages.get_info(pkg): if pkg_info["repo"] in args: prettyprint ([pkg_info["name"],pkg_info["version"], pkg_info["build"], pkg_info["... | |
log.error("one = expected in '%s' argument to changeset", | log.error("one -- expected in change spec '%s'", | def parseChangeList(changeSpecList, keepExisting=False, updateByDefault=True, allowChangeSets=True): """ Takes input specifying changeSpecs, such as foo=1.1--1.2, and turns it into (name, (oldVersionSpec, oldFlavorSpec), (newVersionSpec, newFlavorSpec), isAbsolute) tuples. """ applyList = [] if isinstance(changeSpecLi... |
def updateFromString(self, val, str): val.extend(self.parseString(x) for x in val.split()) | def updateFromString(self, val, newStr): return self.listType(val + [self.valueType.parseString(x) for x in newStr.split()]) | def updateFromString(self, val, str): val.extend(self.parseString(x) for x in val.split()) |
s = struct.pack('HHHH', rows, columns, 0, 0) | s = struct.pack('HHHH', rows, cols, 0, 0) fcntl.ioctl(self.ptyFd, termios.TIOCSWINSZ, s) def _setTerminalSize(self, rows, cols): s = struct.pack('HHHH', rows, cols, 0, 0) | def _resizeTerminal(self): """ If a windowing system has announced to us that the window has been resized, pass that information to the pseudo tty so that output can be reformated """ s = struct.pack('HHHH', 0, 0, 0, 0) result = fcntl.ioctl(sys.stdin.fileno(), termios.TIOCGWINSZ, s) rows, cols = struct.unpack('HHHH', r... |
signal.signal(signal.SIGWINCH, sigwinch_handler) | def sigwinch_handler(s, f): sigwinch.append(True) | |
self._resizeTerminal() | def sigwinch_handler(s, f): sigwinch.append(True) | |
_updateTroves(cfg, updateItems, replaceFiles = replaceFiles, | _updateTroves(cfg, applyList, replaceFiles = replaceFiles, | def updateAll(cfg, info = False, depCheck = True, replaceFiles = False, depsRecurse = True, test = False, showItems = False): client = conaryclient.ConaryClient(cfg) updateItems = client.fullUpdateItemList() if showItems: for (name, version, flavor) in sorted(updateItems, key=lambda x:x[0]): if version and flavor: pri... |
for job in localUpdates: | for job in sorted(localUpdates): | # def _mergeGroupChanges -- main body begins here |
newTroves = [ ((x[0], x[2][0], x[2][1]), True, {}, False, None, respectBranchAffinity, True, True, updateOnly) for x in itertools.chain(absolutePrimaries, relativePrimaries) ] | newTroves = sorted(((x[0], x[2][0], x[2][1]), True, {}, False, None, respectBranchAffinity, True, True, updateOnly) for x in itertools.chain(absolutePrimaries, relativePrimaries)) | # def _mergeGroupChanges -- main body begins here |
for info in trv.iterTroveList(strongRefs=True): | for info in sorted(trv.iterTroveList(strongRefs=True)): | # def _mergeGroupChanges -- main body begins here |
if "UserView" not in tables: | if "UsersView" not in tables: | def __init__(self, db, name): self.name = name self.db = db self.reCache = {} |
UserView AS | UsersView AS | def __init__(self, db, name): self.name = name self.db = db self.reCache = {} |
print "Group %s has unresolved dependencies:", groupName | print "Group %s has unresolved dependencies:" % groupName | def _handleOne(node, path): seen[node] = True |
depNum = depList[depId][0] | depNum = depList[-depId][0] | def resolve(self, label, depSetList): cu = self.db.cursor() |
def addTarball(self, file): self.tarballs.append(file) | def addTarball(self, file, extractDir=''): self.tarballs.append((file, extractDir)) | def addSignature(self, file): |
def addPatch(self, file): self.patches.append(file) | def addPatch(self, file, level='0', backup=''): self.patches.append((file, level, backup)) | def addPatch(self, file): |
for file in self.tarballs: | for (file, extractdir) in self.tarballs: | def unpackSources(self, builddir): |
os.system("tar -C %s %s %s" % (builddir, tarflags, f)) | if extractdir: destdir = '%s/%s' % (builddir, extractdir) os.system("mkdir -p %s" % destdir) else: destdir = builddir os.system("tar -C %s %s %s" % (destdir, tarflags, f)) | def unpackSources(self, builddir): |
raise CfgEnvironmentError(err.msg, err.filename) | raise CfgEnvironmentError(err.filename, err.filename) | def readObject(self, path, f): # path is used for generating error messages try: lineno = 1 while True: line = f.readline() if not line: break |
raise CfgEnvironmentError(err.reason.args[1], path) | raise CfgEnvironmentError(path, err.reason.args[1]) | def readObject(self, path, f): # path is used for generating error messages try: lineno = 1 while True: line = f.readline() if not line: break |
raise CfgEnvironmentError(err.strerror, err.filename) | raise CfgEnvironmentError(err.filename, err.strerror) | def readObject(self, path, f): # path is used for generating error messages try: lineno = 1 while True: line = f.readline() if not line: break |
fn(val) | try: fn(val) except Exception, err: if errors.exceptionIsUncatchable(err): raise raise ParseError, "%s:%s: when processing %s: %s" \ % (fileName, lineno, key, err) | def configLine(self, line, fileName = "override", lineno = '<No line>'): origLine = line line = line.strip() line = line.replace('\\\\', '\0').replace('\\#', '\1') line = line.split('#', 1)[0] if not line: return line = line.replace('\0', '\\').replace('\1', '#') |
def includeConfigFile(self, val): | def includeConfigFile(self, val, fileName = "override", lineno = '<No line>'): | def includeConfigFile(self, val): if val.startswith("http://") or val.startswith("https://"): f = urllib2.urlopen(val) self.readObject(val, f) else: for cfgfile in util.braceGlob(val): self.read(cfgfile) |
f = urllib2.urlopen(val) | try: f = urllib2.urlopen(val) except urllib2.HTTPError, err: raise CfgEnvironmentError(err.filename, err.msg) except urllib2.URLError, err: raise CfgEnvironmentError(val, err.reason.args[1]) except EnvironmentError, err: raise CfgEnvironmentError(err.filename, err.msg) | def includeConfigFile(self, val): if val.startswith("http://") or val.startswith("https://"): f = urllib2.urlopen(val) self.readObject(val, f) else: for cfgfile in util.braceGlob(val): self.read(cfgfile) |
newJob.add((troveName, oldTrove, (newVersionStr, newFlavorStr), isAbsolute)) | jobToAdd = (troveName, oldTrove, (newVersionStr, newFlavorStr), isAbsolute) newJob.add(jobToAdd) log.debug("set up job %s", jobToAdd) del jobToAdd | # def _updateChangeSet -- body starts here |
VALUES (NULL,?, ?,?,?,?, ?,?,?,?, ?,?,size)""", | VALUES (NULL,?, ?,?,?,?, ?,?,?,?, ?,?,?)""", | def addEntry(self, item, recurse, withFiles, withFileContents, excludeAutoSource, returnVal, size): (name, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute) = \ item |
self.rollback() | self.db.rollback() | def addEntry(self, item, recurse, withFiles, withFileContents, excludeAutoSource, returnVal, size): (name, (oldVersion, oldFlavor), (newVersion, newFlavor), absolute) = \ item |
flavorFilter = None): | flavorFilter = 0): | def getTroveVersionList(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
{ None : flavorFilter }) | { None : [ flavorFilter ] }) | def getTroveVersionList(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
troveFilter = { None : { None : flavorFilter } } | troveFilter = { None : { None : [ 0 ] } } | def getTroveVersionList(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
flavorFilter = None): | flavorFilter = 0): | def getAllTroveLeaves(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
{ None : flavorFilter }) | { None : [ flavorFilter ] }) | def getAllTroveLeaves(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
troveFilter = { None : { None : flavorFilter } } | troveFilter = { None : { None : [ flavorFilter ] } } | def getAllTroveLeaves(self, authToken, clientVersion, troveNameFlavors, flavorFilter = None): if clientVersion >= 23: troveFilter = {} |
troveList = '\n '.join('%s=%s[%s]' % x for x in nonLocal) | troveList = '\n '.join(['%s=%s[%s]' % (x[0], x[2][0], x[2][1]) for x in nonLocal]) | # def _updateChangeSet -- body starts here |
from lib import epdb epdb.set_trace() | def __init__(self, pathId, trove1=None, file1=None, trove2=None, file2=None): self.pathId = pathId self.trove1 = trove1 self.file1 = file1 self.trove2 = trove2 self.file2 = file2 from lib import epdb epdb.set_trace() | |
return db.getTroves([(x[0], x[1][0], x[1][1]) for x in jobs if x[1][0] ], withFiles=False) | oldTroves.update((x[0], x[1][0], x[1][1]) for x in jobs if x[1][0]) return db.getTroves(oldTroves, withFiles=False) | def _getTrovesToBeMigrated(db, troves): """ Gets the list of troves on the system that will be migrated to the new troves in the update job (just the top level troves) """ # perform a diff of toplevel troves to find out # what version of the troves on the system will be updated. existsTrv = trove.Trove("@update", versi... |
@type other: Dependency | @type required: Dependency | def satisfies(self, required): |
fd, fn = tempfile.mkstemp(prefix=os.path.basename(dbPath), | fd, fn = tempfile.mkstemp(prefix=os.path.basename(dbPath) + '-new-', | def migrate(self): import tempfile import os from conary import dbstore |
filesNeeded = [] | filesNeeded = set() | def _getCsFromShim(target, cs, server, job, recurse, withFiles, withFileContents, excludeAutoSource, filesNeeded, chgSetList): (newCs, extraTroveList, extraFileList) = \ server.getChangeSetObj(job, recurse, withFiles, withFileContents, excludeAutoSource) if not cs: cs = newCs else: cs.merge(newCs) return cs, extraTrove... |
filesNeeded += extraFileList | filesNeeded.update(extraFileList) | def _getCsFromShim(target, cs, server, job, recurse, withFiles, withFileContents, excludeAutoSource, filesNeeded, chgSetList): (newCs, extraTroveList, extraFileList) = \ server.getChangeSetObj(job, recurse, withFiles, withFileContents, excludeAutoSource) if not cs: cs = newCs else: cs.merge(newCs) return cs, extraTrove... |
filesNeeded += [ (x[0], troveName, | filesNeeded.update( ( (x[0], troveName, | def _getCsFromShim(target, cs, server, job, recurse, withFiles, withFileContents, excludeAutoSource, filesNeeded, chgSetList): (newCs, extraTroveList, extraFileList) = \ server.getChangeSetObj(job, recurse, withFiles, withFileContents, excludeAutoSource) if not cs: cs = newCs else: cs.merge(newCs) return cs, extraTrove... |
(newVersion, newFlavor, x[3], x[4])) for x in newFilesNeeded ] | (newVersion, newFlavor, x[3], x[4])) for x in newFilesNeeded ) ) | def _getCsFromShim(target, cs, server, job, recurse, withFiles, withFileContents, excludeAutoSource, filesNeeded, chgSetList): (newCs, extraTroveList, extraFileList) = \ server.getChangeSetObj(job, recurse, withFiles, withFileContents, excludeAutoSource) if not cs: cs = newCs else: cs.merge(newCs) return cs, extraTrove... |
oldVersion.asString(), new, | oldVerStr, new, | def CreateFromRepository(repos, packageList, outFileName): cs = "" hashList = [] for (packageName, oldVersion, newVersion) in packageList: pkgSet = repos.getPackageSet(packageName) new = pkgSet.getVersion(newVersion) if oldVersion: old = pkgSet.getVersion(oldVersion) (newCs, filesNeeded) = packageChangeSet(package... |
raise SourceError, "unknown archive compression: " + f | raise SourceError, "unknown archive format: " + f | def do(self): |
shutil.copyfile(self.toFile, dest) | shutil.copyfile(self.fromFile, dest) | def doInstall(self, dir, root): |
self.file = fromFile | self.fromFile = fromFile | def __init__(self, fromFile, toFile, perms = 0644): |
os.link(root + self.fromFile, root + self.toFile) | os.symlink(self.fromFile, root + self.toFile) | def doInstall(self, dir, root): |
notInstalledBranch = \ localUpdatesByPresent[replacedInfo][0].branch() | notInstalledVer = \ localUpdatesByPresent[replacedInfo][0] notInstalledBranch = notInstalledVer.branch() | # def _mergeGroupChanges -- main body begins here |
if (notInstalledBranch == installedBranch or installedBranch == newBranch): | if installedBranch == newBranch: if (newInfo[1] < replaced[0] and not isPrimary and replacedInfo in sameBranchLocalUpdates): alreadyInstalled.add(replacedInfo) break elif notInstalledBranch == installedBranch: | # def _mergeGroupChanges -- main body begins here |
missing = set(sourceSearch) - set(matches) | missing = set(sourceSearch) - set(sourceTroveMatches) | def findTroves(self): self.size = 0 |
"No troves found with names %s" % " ".join(missing) | "No troves found with name(s) %s" % " ".join(missing) | def findTroves(self): self.size = 0 |
print " %s --add-user [--admin] [--mirror] <username>" % sys.argv[0] | print " %s --add-user <username> [--admin] [--mirror]" % sys.argv[0] | def usage(): print "usage: %s" % sys.argv[0] print " %s --add-user [--admin] [--mirror] <username>" % sys.argv[0] print " %s --analyze" % sys.argv[0] print "" print "server flags: --config-file <path>" print ' --db "driver <path>"' print ' --log-file <path>' print ' --... |
pin = os.popen('%s %s' %(provides, f)) | pin = os.popen("%s '%s'" %(provides, f)) | def unpackSources(self, builddir): |
util.execute('%s %s | patch -d %s -p%s %s %s' | util.execute("%s '%s' | patch -d %s -p%s %s %s" | def unpackSources(self, builddir): |
new.append(("%s (%s -> N)" % (x.getName(), newInfo))) | new.append(("%s (%s)" % (x.getName(), newInfo), 'N')) | def displayUpdateJobInfo(cs, verbose=False): indent = ' ' new = [] for x in cs.iterNewTroveList(): oldVersion = x.getOldVersion() newVersion = x.getNewVersion() oldFlavor = x.getOldFlavor() newFlavor = x.getNewFlavor() if newVersion: newTVersion = newVersion.trailingRevision() if oldVersion: oldTVersion = oldVersion... |
trove = cs.getNewTroveVersion(troveName, newVer, newFla) depformat('Requires', trove.getRequires()) depformat('Provides', trove.getProvides()) | if cs.hasNewTrove(troveName, newVer, newFla): trove = cs.getNewTroveVersion(troveName, newVer, newFla) depformat('Requires', trove.getRequires()) depformat('Provides', trove.getProvides()) | 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 isRedirect: childTroves = [] else: childTroves = [ x[0:2] for x in trv.iterTroveListInfo()] childTroves = self.getChildren(troveTup, trv) self[troveTup] = (trv.getSize(), isRedirect, childTroves, trv.getPathHashes()) | self[troveTup] = trv self.getChildren(troveTup, trv) | def cacheTroves(self, troveTupList): troveTupList = [x for x in troveTupList if x not in self] troves = self.repos.getTroves(troveTupList, withFiles=False) |
elif not hasWeak and trove.troveIsCollection(childTup[0]): childColls.append((childTup, byDefault)) childTroves.append((childTup, byDefault)) if not hasWeak and childColls: self.cacheTroves([x[0] for x in childColls]) for childTup, byDefault in childColls: if byDefault: childTroves.extend(self.getChildTroves(childTu... | if trove.troveIsCollection(childTup[0]): childColls.append((childTup, byDefault, isStrong)) self.cacheTroves([x[0] for x in childColls]) newColls = [] for childTup, byDefault, isStrong in childColls: childTrv = self[childTup] for childChildTup, childByDefault, _ in childTrv.iterTroveListInfo(): if not byDe... | def getChildren(self, troveTup, trv): """ Retrieve children, and, if necessary, children's children) from repos. Children's children should only be necessary if the group doesn't have weak references (i.e. is old). """ childTroves = [] hasWeak = False childColls = [] |
return self[troveTup][0] | return self[troveTup].getSize() | def getSize(self, troveTup): return self[troveTup][0] |
return self[troveTup][1] def getChildTroves(self, troveTup): return self[troveTup][2] | return self[troveTup].isRedirect() def iterTroveList(self, troveTup, strongRefs=False, weakRefs=False): for troveTup, byDefault, isStrong in self[troveTup].iterTroveListInfo(): if isStrong: if strongRefs: yield troveTup elif weakRefs: yield troveTup def iterTroveListInfo(self, troveTup): return(self[troveTup].iterTro... | def isRedirect(self, troveTup): return self[troveTup][1] |
return self[troveTup][3] | return self[troveTup].getPathHashes() def includeByDefault(self, troveTup, childTrove): return self[troveTup].includeTroveByDefault(*childTrove) | def getPathHashes(self, troveTup): return self[troveTup][3] |
for (childTup, byDefault) in cache.getChildTroves(troveTup): | for (childTup, byDefault, _) in cache.iterTroveListInfo(troveTup): | def _componentMatches(troveName, compList): return ':' in troveName and troveName.split(':', 1)[1] in compList |
for troveTup in troveTups: | for troveTup in findAllWeakTrovesToRemove(group, troveTups, cache): | def _componentMatches(troveName, compList): return ':' in troveName and troveName.split(':', 1)[1] in compList |
allComps = troveCache.getChildTroves(troveTup) for comp, byDefault in troveCache.getChildTroves(troveTup): | for comp, byDefault, isStrong in troveCache.iterTroveListInfo(troveTup): | def addPackagesForComponents(group, repos, troveCache): """ Add the containing packages for any components added to group. Then switch the components to being implicit, but byDefault=True, while other non-specified components are byDefault=False. """ packages = {} for (n,v,f), explicit, byDefault, comps in group.iterT... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.