Skip to content

Component2 load #131

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ def read(configname=None):
workdirectory = generalsection.get('Directory', os.getcwd())
streamname = shlex.quote(migrationsection['StreamToMigrate'].strip())
previousstreamname = migrationsection.get('PreviousStream', '').strip()

# new option
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please remove this comment, it doesnt provide any value

component2load = shlex.quote(migrationsection['component2Load'].strip())

baselines = getinitialcomponentbaselines(migrationsection.get('InitialBaseLines'))
ignorefileextensionsproperty = parsedconfig.get(miscsectionname, 'IgnoreFileExtensions', fallback='')
ignorefileextensions = parsesplittedproperty(ignorefileextensionsproperty)
Expand All @@ -62,6 +66,7 @@ def read(configname=None):
configbuilder.setmaxchangesetstoaccepttogether(maxchangesetstoaccepttogether)
configbuilder.setworkdirectory(workdirectory).setstreamname(streamname).setinitialcomponentbaselines(baselines)
configbuilder.setpreviousstreamname(previousstreamname)
configbuilder.setcomponent2load(component2load)
configbuilder.setignorefileextensions(ignorefileextensions)
configbuilder.setignoredirectories(ignoredirectories)
configbuilder.setincludecomponentroots(includecomponentroots).setcommitmessageprefix(commitmessageprefix)
Expand Down Expand Up @@ -141,6 +146,7 @@ def __init__(self):
self.includecomponentroots = ""
self.commitmessageprefix = ""
self.gitattributes = ""
self.component2load = ""

def setuser(self, user):
self.user = user
Expand Down Expand Up @@ -182,6 +188,10 @@ def setstreamname(self, streamname):
self.streamname = streamname
return self

def setcomponent2load(self, component2load):
self.component2load = component2load
return self

def setgitreponame(self, reponame):
self.gitreponame = reponame
self.clonedgitreponame = reponame[:-4] # cut .git
Expand Down Expand Up @@ -237,14 +247,14 @@ def build(self):
self.streamname, self.gitreponame, self.useprovidedhistory,
self.useautomaticconflictresolution, self.maxchangesetstoaccepttogether, self.clonedgitreponame, self.rootFolder,
self.previousstreamname, self.ignorefileextensions, self.ignoredirectories, self.includecomponentroots,
self.commitmessageprefix, self.gitattributes)
self.commitmessageprefix, self.gitattributes, self.component2load)


class ConfigObject:
def __init__(self, user, password, repourl, scmcommand, workspace, useexistingworkspace, workdirectory,
initialcomponentbaselines, streamname, gitreponame, useprovidedhistory,
useautomaticconflictresolution, maxchangesetstoaccepttogether, clonedgitreponame, rootfolder, previousstreamname,
ignorefileextensions, ignoredirectories, includecomponentroots, commitmessageprefix, gitattributes):
ignorefileextensions, ignoredirectories, includecomponentroots, commitmessageprefix, gitattributes, component2load):
self.user = user
self.password = password
self.repo = repourl
Expand All @@ -270,6 +280,7 @@ def __init__(self, user, password, repourl, scmcommand, workspace, useexistingwo
self.includecomponentroots = includecomponentroots
self.commitmessageprefix = commitmessageprefix
self.gitattributes = gitattributes
self.component2load = component2load

def getlogpath(self, filename):
if not self.hasCreatedLogFolder:
Expand Down