diff options
author | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-11-13 05:11:28 +0000 |
---|---|---|
committer | Bogdano Arendartchuk <bogdano@mandriva.org> | 2007-11-13 05:11:28 +0000 |
commit | 0fe6300c34bb791ccfb1050b04fbb9afd162b322 (patch) | |
tree | 230ecdf8499337268b330856601c2510ac60a867 /RepSys/rpmutil.py | |
parent | 7e0e0014427a3609d3102e47446cfad7d3c52624 (diff) | |
download | mgarepo-0fe6300c34bb791ccfb1050b04fbb9afd162b322.tar mgarepo-0fe6300c34bb791ccfb1050b04fbb9afd162b322.tar.gz mgarepo-0fe6300c34bb791ccfb1050b04fbb9afd162b322.tar.bz2 mgarepo-0fe6300c34bb791ccfb1050b04fbb9afd162b322.tar.xz mgarepo-0fe6300c34bb791ccfb1050b04fbb9afd162b322.zip |
Make package and revision optional options for submit, again
This mode has been broken for a long time due to a change in subversion
output.
The confirmation of the revision being used was removed, as already used by
mdvsys. Instead, notify the user and allow him to interrupt the process.
Diffstat (limited to 'RepSys/rpmutil.py')
-rw-r--r-- | RepSys/rpmutil.py | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/RepSys/rpmutil.py b/RepSys/rpmutil.py index 69692f1..774f64f 100644 --- a/RepSys/rpmutil.py +++ b/RepSys/rpmutil.py @@ -490,20 +490,17 @@ def get_submit_info(path): if not os.path.isdir(os.path.join(path, ".svn")): raise Error, "subversion directory not found" - svn = SVN(baseurl=pkgdirurl) - + svn = SVN(noauth=True) # Now, extract the package name. - for line in svn.info(path): - if line.startswith("URL: "): - url = line.split()[1] - toks = url.split("/") - if len(toks) < 2 or toks[-1] != "current": - raise Error, "unexpected URL received from 'svn info'" - name = toks[-2] - break - else: - raise Error, "URL tag not found in 'svn info' output" + info = svn.info2(path) + url = info.get("URL") + if url is None: + raise Error, "missing URL from svn info %s" % path + toks = url.split("/") + if len(toks) < 2 or toks[-1] != "current": + raise Error, "unexpected URL received from 'svn info'" + name = toks[-2] # Finally, guess revision. max = -1 @@ -511,8 +508,8 @@ def get_submit_info(path): files.extend(glob.glob("%s/*" % specsdir)) files.extend(glob.glob("%s/*" % sourcesdir)) for line in svn.info(" ".join(files)): - if line.startswith("Revision: "): - rev = int(line.split()[1]) + if line.startswith("Last Changed Rev: "): + rev = int(line.split(":")[1]) if rev > max: max = rev if max == -1: |