From 72ccffd028d506edf9d9b9f88711a05e10e8dc11 Mon Sep 17 00:00:00 2001 From: Nicolas Vigier Date: Thu, 13 Jan 2011 00:43:54 +0000 Subject: don't allow importing package already on svn --- MgaRepo/commands/putsrpm.py | 3 --- MgaRepo/rpmutil.py | 9 +-------- 2 files changed, 1 insertion(+), 11 deletions(-) (limited to 'MgaRepo') diff --git a/MgaRepo/commands/putsrpm.py b/MgaRepo/commands/putsrpm.py index 68d87d0..9e9faa7 100644 --- a/MgaRepo/commands/putsrpm.py +++ b/MgaRepo/commands/putsrpm.py @@ -11,9 +11,6 @@ Usage: mgarepo putsrpm [OPTIONS] SOURCERPMS Will import source RPMs into the SVN repository. -If the package was already imported, it will add the new files and remove -those not present in the source RPM. - Options: -m LOG Log message used when commiting changes -t Create version-release tag on releases/ diff --git a/MgaRepo/rpmutil.py b/MgaRepo/rpmutil.py index 2bf3ef4..80a14a0 100644 --- a/MgaRepo/rpmutil.py +++ b/MgaRepo/rpmutil.py @@ -205,8 +205,6 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None, releaseurl = "/".join([versionurl, srpm.release]) currenturl = "/".join([pkgurl, "current"]) currentdir = os.path.join(tmpdir, "current") - #FIXME when pre-commit hook fails, there's no clear way to know - # what happened ret = svn.mkdir(pkgurl, noerror=1, log="Created package directory") if ret or not svn.ls(currenturl, noerror=1): svn.checkout(pkgurl, tmpdir) @@ -217,12 +215,7 @@ def put_srpm(srpmfile, markrelease=False, striplog=True, branch=None, #svn.commit(tmpdir,log="Created package structure.") version_exists = 1 else: - if svn.ls(releaseurl, noerror=1): - raise Error, "release already exists" - svn.checkout("/".join([pkgurl, "current"]), tmpdir) - svn.mkdir(versionurl, noerror=1, - log="Created directory for version %s." % version) - currentdir = tmpdir + raise Error, "package already exists or error creating package directory" specsdir = os.path.join(currentdir, "SPECS") sourcesdir = os.path.join(currentdir, "SOURCES") -- cgit v1.2.1