Opened 17 years ago
Closed 16 years ago
#275 closed enhancement (duplicate)
Patch for allowing subversion authorization per recipe
Reported by: | anonymous | Owned by: | cmlenz |
---|---|---|---|
Priority: | major | Milestone: | 0.6 |
Component: | General | Version: | 0.5.3 |
Keywords: | Cc: | ||
Operating System: | BSD |
Description
Hi,
I the following checkout function in build/svntools.py allows user authorization for svn per recipe by giving the additional parameters "passwd" and "user":
def checkout(ctxt, url, path=None, revision=None, dir_='.', passwd=None, user=None):
"""Perform a checkout from a Subversion repository.
:param ctxt: the build context :type ctxt: Context :param url: the URL of the repository :param path: the path inside the repository :param revision: the revision to check out :param dir_: the name of a local subdirectory to check out into """ args = checkout? if revision:
args += ['-r', revision]
if path:
url = posixpath.join(url, path.lstrip('/'))
if passwd:
args += ['--password', passwd]
if user:
args += ['--username', user]
args += [url, dir_]
from bitten.build import shtools returncode = shtools.execute(ctxt, file_='svn', args=args) if returncode != 0:
ctxt.error('svn checkout failed (%s)' % returncode)
Attachments (0)
Change History (1)
comment:1 Changed 16 years ago by dfraser
- Resolution set to duplicate
- Status changed from new to closed
Marking as a duplicate of #349 - the (similar) aptch there is clearer, although the idea of separating out adding username and password here is clearer