aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/binrepo.py
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-01-27 21:21:43 +0000
committerNicolas Vigier <boklm@mageia.org>2011-01-27 21:21:43 +0000
commitf81735f238927eface0fb987bb062163bdc8dc68 (patch)
treed8523ea0cf70526aa1acdff004d1f3a710b4ec99 /MgaRepo/binrepo.py
parent14681333188adcde6abcb6103e8ea0e6ffdf93b5 (diff)
downloadmgarepo-f81735f238927eface0fb987bb062163bdc8dc68.tar
mgarepo-f81735f238927eface0fb987bb062163bdc8dc68.tar.gz
mgarepo-f81735f238927eface0fb987bb062163bdc8dc68.tar.bz2
mgarepo-f81735f238927eface0fb987bb062163bdc8dc68.tar.xz
mgarepo-f81735f238927eface0fb987bb062163bdc8dc68.zip
add commit option
Diffstat (limited to 'MgaRepo/binrepo.py')
-rw-r--r--MgaRepo/binrepo.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/MgaRepo/binrepo.py b/MgaRepo/binrepo.py
index bb9f16a..9eb5c03 100644
--- a/MgaRepo/binrepo.py
+++ b/MgaRepo/binrepo.py
@@ -319,7 +319,7 @@ def remove(path, message=None, commit=True):
if commit:
svn.commit(binpath, log=message)
-def upload(path, message=None):
+def upload(path, message=None, commit=True):
from MgaRepo.rpmutil import getpkgtopdir
svn = SVN()
if not os.path.exists(path):
@@ -343,7 +343,8 @@ def upload(path, message=None):
pass
if not os.path.exists(bindir):
create_package_dirs(bintopdir)
- svn.commit(topdir, log="%s: created binrepo structure" % silent)
+ if commit:
+ svn.commit(topdir, log="%s: created binrepo structure" % silent)
download(topdir, show=False)
for path in paths:
if svn.info2(path):
@@ -365,13 +366,15 @@ def upload(path, message=None):
if svn.info2(sources):
svn.update(sources)
update = update_sources_threaded(topdir, added=paths)
- rev = svn.commit(binpath, log=message)
+ if commit:
+ rev = svn.commit(binpath, log=message)
if svn.info2(sources):
svn.update(sources)
else:
svn.add(sources)
update.join()
- svn.commit(sources, log=message, nonrecursive=True)
+ if commit:
+ svn.commit(sources, log=message, nonrecursive=True)
def mapped_revision(target, revision, wc=False):
"""Maps a txtrepo revision to a binrepo datespec