[Checkins] SVN: keas.build/trunk/src/keas/build/ try now forcing svn auth
Adam Groszer
agroszer at gmail.com
Wed Dec 16 10:01:01 EST 2009
Log message for revision 106630:
try now forcing svn auth
Changed:
U keas.build/trunk/src/keas/build/base.py
U keas.build/trunk/src/keas/build/package.py
-=-
Modified: keas.build/trunk/src/keas/build/base.py
===================================================================
--- keas.build/trunk/src/keas/build/base.py 2009-12-16 14:34:15 UTC (rev 106629)
+++ keas.build/trunk/src/keas/build/base.py 2009-12-16 15:01:00 UTC (rev 106630)
@@ -48,23 +48,23 @@
class SVN(object):
- svnuser = None
- svnpass = None
- svnForceAuth = False
+ user = None
+ passwd = None
+ forceAuth = False
#TODO: spaces in urls+folder names???
- def __init__(self, svnuser=None, svnpass=None, svnForceAuth=False):
- self.svnuser = svnuser
- self.svnpass = svnpass
- self.svnForceAuth = svnForceAuth
+ def __init__(self, user=None, passwd=None, forceAuth=False):
+ self.user = user
+ self.passwd = passwd
+ self.forceAuth = forceAuth
def _addAuth(self, command):
auth = ''
- if self.svnuser:
- auth = '--username %s --password %s' % (self.svnuser, self.svnpass)
+ if self.user:
+ auth = '--username %s --passwdword %s' % (self.user, self.passwd)
- if self.svnForceAuth:
+ if self.forceAuth:
auth += ' --no-auth-cache'
command = command.replace('##__auth__##', auth)
@@ -203,6 +203,11 @@
help="Force one common version through all packages and configs.")
parser.add_option(
+ "--force-svnauth", action="store_true",
+ dest="forceSvnAuth", default=False,
+ help="Force svn authentication with svn-repos- credentials.")
+
+parser.add_option(
"-b", "--use-branch", action="store",
dest="branch", metavar="BRANCH", default=None,
help="When specified, this branch will be always used.")
Modified: keas.build/trunk/src/keas/build/package.py
===================================================================
--- keas.build/trunk/src/keas/build/package.py 2009-12-16 14:34:15 UTC (rev 106629)
+++ keas.build/trunk/src/keas/build/package.py 2009-12-16 15:01:00 UTC (rev 106630)
@@ -315,7 +315,7 @@
# 6. Cleanup
rmtree(buildDir)
- def runCLI(self, configFile, askToCreateRelease=False):
+ def runCLI(self, configFile, askToCreateRelease=False, forceSvnAuth=False):
logger.info('Start releasing new version of ' + self.pkg)
# 1. Read the configuration file.
logger.info('Loading configuration file: ' + configFile)
@@ -332,13 +332,16 @@
self.svnRepositoryUrl = config.get(
base.BUILD_SECTION, 'svn-repos')
- svnRepositoryUsername = config.get(
- base.BUILD_SECTION, 'svn-repos-username')
- svnRepositoryPassword = config.get(
- base.BUILD_SECTION, 'svn-repos-password')
+ if forceSvnAuth:
+ svnRepositoryUsername = config.get(
+ base.BUILD_SECTION, 'svn-repos-username')
+ svnRepositoryPassword = config.get(
+ base.BUILD_SECTION, 'svn-repos-password')
- #self.svn = base.SVN(svnRepositoryUsername, svnRepositoryPassword)
- self.svn = base.SVN()
+ self.svn = base.SVN(svnRepositoryUsername, svnRepositoryPassword,
+ forceAuth=True)
+ else:
+ self.svn = base.SVN()
try:
self.uploadType = config.get(
@@ -452,7 +455,8 @@
print "Usage: build-package [options] package1 package2 ..."
sys.exit(0)
for pkg in args:
- builder = PackageBuilder(pkg, options)
+ builder = PackageBuilder(pkg, options,
+ forceSvnAuth = options.forceSvnAuth)
try:
builder.runCLI(options.configFile)
except KeyboardInterrupt:
More information about the checkins
mailing list