From 019c4d5a7fdf3813eb06740598cd8a378f2d1f57 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Wed, 17 Aug 2011 16:59:03 +0000 Subject: upload on new binrepo --- MgaRepo/rpmutil.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 5f3c196..7874c29 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -634,7 +634,14 @@ def update(target=None): def upload(paths, commit=True): for path in paths: if os.path.isdir(path) or binrepo.is_binary(path): - binrepo.upload(path, commit=commit) + topdir = getpkgtopdir() + binrepo.upload_binary(topdir, os.path.basename(path)) + binrepo.update_sources(topdir, added=[path]) + if commit: + svn = SVN() + silent = config.get("log", "ignore-string", "SILENT") + message = "%s: new file %s" % (silent, path) + svn.commit(binrepo.sources_path(topdir), log=message) else: svn = SVN() svn.add(path, local=True) -- cgit v1.2.1