aboutsummaryrefslogtreecommitdiffstats
path: root/MgaRepo/binrepo.py
diff options
context:
space:
mode:
authorNicolas Vigier <boklm@mageia.org>2011-01-25 19:00:38 +0000
committerNicolas Vigier <boklm@mageia.org>2011-01-25 19:00:38 +0000
commit0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a (patch)
tree98087f3587bdfa4cdbe9ed3701144c86b0a4b374 /MgaRepo/binrepo.py
parentba1ca57598a314cc60e2c13cb4244ef13f9b3117 (diff)
downloadmgarepo-0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a.tar
mgarepo-0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a.tar.gz
mgarepo-0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a.tar.bz2
mgarepo-0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a.tar.xz
mgarepo-0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a.zip
svn update sha1.lst file before updating and commiting it
Diffstat (limited to 'MgaRepo/binrepo.py')
-rw-r--r--MgaRepo/binrepo.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/MgaRepo/binrepo.py b/MgaRepo/binrepo.py
index a7d635e..5ae3dd6 100644
--- a/MgaRepo/binrepo.py
+++ b/MgaRepo/binrepo.py
@@ -306,8 +306,9 @@ def remove(path, message=None, commit=True):
bpath = os.path.basename(path)
topdir = getpkgtopdir()
bintopdir = translate_topdir(topdir)
- update = update_sources_threaded(topdir, removed=[bpath])
sources = sources_path(topdir)
+ svn.update(sources)
+ update = update_sources_threaded(topdir, removed=[bpath])
silent = config.get("log", "ignore-string", "SILENT")
if not message:
message = "%s: delete binary file %s" % (silent, bpath)
@@ -363,11 +364,16 @@ def upload(path, message=None):
if not message:
message = "%s: new binary files %s" % (silent, " ".join(paths))
make_symlinks(bindir, sourcesdir)
+ sources = sources_path(topdir)
+ if svn.info2(sources):
+ svn.update(sources)
update = update_sources_threaded(topdir, added=paths)
rev = svn.commit(binpath, log=message)
svn.propset(PROP_BINREPO_REV, str(rev), topdir)
- sources = sources_path(topdir)
- svn.add(sources)
+ if svn.info2(sources):
+ svn.update(sources)
+ else:
+ svn.add(sources)
update.join()
svn.commit(topdir + " " + sources, log=message, nonrecursive=True)