diff options
author | Nicolas Vigier <boklm@mageia.org> | 2011-01-25 19:00:38 +0000 |
---|---|---|
committer | Nicolas Vigier <boklm@mageia.org> | 2011-01-25 19:00:38 +0000 |
commit | 0499c1fd60d5fc07cc43d83f14cc739b39b4ff4a (patch) | |
tree | 98087f3587bdfa4cdbe9ed3701144c86b0a4b374 | |
parent | ba1ca57598a314cc60e2c13cb4244ef13f9b3117 (diff) | |
download | mgarepo-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
-rw-r--r-- | MgaRepo/binrepo.py | 12 |
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) |