aboutsummaryrefslogtreecommitdiffstats
path: root/RepSys/commands
diff options
context:
space:
mode:
Diffstat (limited to 'RepSys/commands')
-rw-r--r--RepSys/commands/authoremail.py3
-rw-r--r--RepSys/commands/changed.py2
-rw-r--r--RepSys/commands/ci.py12
-rw-r--r--RepSys/commands/co.py6
-rw-r--r--RepSys/commands/create.py5
-rw-r--r--RepSys/commands/editlog.py3
-rw-r--r--RepSys/commands/getspec.py5
-rw-r--r--RepSys/commands/getsrpm.py29
-rw-r--r--RepSys/commands/markrelease.py5
-rw-r--r--RepSys/commands/patchspec.py2
-rw-r--r--RepSys/commands/rpmlog.py5
-rw-r--r--RepSys/commands/submit.py35
-rw-r--r--RepSys/commands/switch.py7
-rw-r--r--RepSys/commands/sync.py4
14 files changed, 91 insertions, 32 deletions
diff --git a/RepSys/commands/authoremail.py b/RepSys/commands/authoremail.py
index aee7b58..f5b8b70 100644
--- a/RepSys/commands/authoremail.py
+++ b/RepSys/commands/authoremail.py
@@ -7,6 +7,9 @@ import getopt
HELP = """\
Usage: repsys authoremail [OPTIONS] AUTHOR
+Shows the e-mail of an SVN author. It is just a simple interface to access
+the [authors] section of repsys.conf.
+
Options:
-h Show this message
diff --git a/RepSys/commands/changed.py b/RepSys/commands/changed.py
index d3094a8..62b20b6 100644
--- a/RepSys/commands/changed.py
+++ b/RepSys/commands/changed.py
@@ -8,6 +8,8 @@ import sys
HELP = """\
Usage: repsys changed [OPTIONS] URL
+Shows if there are pending changes since the last package release.
+
Options:
-a Check all packages in given URL
-s Show differences
diff --git a/RepSys/commands/ci.py b/RepSys/commands/ci.py
index 9ffa3bd..8d373b5 100644
--- a/RepSys/commands/ci.py
+++ b/RepSys/commands/ci.py
@@ -5,12 +5,16 @@ from RepSys.rpmutil import commit
HELP = """\
Usage: repsys ci [TARGET]
-Will commit a change. The difference between an ordinary "svn ci" and
-"repsys ci" is that it relocates the working copy to the default repository
-in case the option "mirror" is set in repsys.conf.
+Will commit recent modifications in the package.
+
+The difference between an ordinary "svn ci" and "repsys ci" is that it
+relocates the working copy to the default repository in case the option
+"mirror" is set in repsys.conf.
Options:
-h Show this message
+ -m MSG Use the MSG as the log message
+ -F FILE Read log message from FILE
Examples:
repsys ci
@@ -20,6 +24,8 @@ Examples:
def parse_options():
parser = OptionParser(help=HELP)
parser.add_option("-m", dest="message", default=None)
+ parser.add_option("-F", dest="logfile", type="string",
+ default=None)
opts, args = parser.parse_args()
if len(args):
opts.target = args[0]
diff --git a/RepSys/commands/co.py b/RepSys/commands/co.py
index cadcf56..830b7e7 100644
--- a/RepSys/commands/co.py
+++ b/RepSys/commands/co.py
@@ -8,12 +8,18 @@ import sys
HELP = """\
Usage: repsys co [OPTIONS] URL [LOCALPATH]
+Checkout the package source from the Mandriva repository.
+
+If the 'mirror' option is enabled, the package is obtained from the mirror
+repository.
+
Options:
-r REV Revision to checkout
-o Do not use the mirror (use official server)
-h Show this message
Examples:
+ repsys co pkgname
repsys co http://repos/svn/cnc/snapshot/foo
repsys co http://repos/svn/cnc/snapshot/foo foo-pkg
"""
diff --git a/RepSys/commands/create.py b/RepSys/commands/create.py
index 56af1ef..a8709f0 100644
--- a/RepSys/commands/create.py
+++ b/RepSys/commands/create.py
@@ -8,11 +8,14 @@ import sys
HELP = """\
Usage: repsys create [OPTIONS] URL
+Creates the minimal structure of a package in the repository.
+
Options:
-h Show this message
Examples:
- repsys create http://repos/svn/cnc/snapshot/newpkg
+ repsys create newpkg
+ repsys create svn+ssh://svn.mandriva.com/svn/packages/cooker/newpkg
"""
def parse_options():
diff --git a/RepSys/commands/editlog.py b/RepSys/commands/editlog.py
index 367238f..1962ed8 100644
--- a/RepSys/commands/editlog.py
+++ b/RepSys/commands/editlog.py
@@ -30,8 +30,7 @@ def parse_options():
def editlog(pkgdirurl, revision):
svn = SVN()
- svn.propedit("svn:log", pkgdirurl, revision=SVN.makerev(revision),
- revprop=True)
+ svn.propedit("svn:log", pkgdirurl, rev=revision)
def main():
do_command(parse_options, editlog)
diff --git a/RepSys/commands/getspec.py b/RepSys/commands/getspec.py
index 1079a81..5e44074 100644
--- a/RepSys/commands/getspec.py
+++ b/RepSys/commands/getspec.py
@@ -8,12 +8,15 @@ import sys
HELP = """\
Usage: repsys getspec [OPTIONS] REPPKGURL
+Prints the .spec file of a given package.
+
Options:
-t DIR Use DIR as target for spec file (default is ".")
-h Show this message
Examples:
- repsys getspec http://repos/svn/cnc/snapshot/foo
+ repsys getspec pkgname
+ repsys getspec svn+ssh://svn.mandriva.com/svn/packages/cooker/pkgname
"""
def parse_options():
diff --git a/RepSys/commands/getsrpm.py b/RepSys/commands/getsrpm.py
index d76aca7..f9a63d2 100644
--- a/RepSys/commands/getsrpm.py
+++ b/RepSys/commands/getsrpm.py
@@ -16,20 +16,25 @@ import os
HELP = """\
Usage: repsys getsrpm [OPTIONS] REPPKGURL
+Generates the source RPM (.srpm) file of a given package.
+
Options:
- -c Use files in current/ directory (default)
- -p Use files in pristine/ directory
- -v VER Use files from the version specified by VER (e.g. 2.2.1-2cl)
- -r REV Use files from current directory, in revision REV (e.g. 1001)
- -t DIR Put SRPM file in directory DIR when done (default is ".")
- -P USER Define the RPM packager inforamtion to USER
- -s FILE Run script with "FILE TOPDIR SPECFILE" command
- -n Rename the package to include the revision number
- -l Use subversion log to build rpm %changelog
- -T FILE Template to be used to generate the %changelog
- -h Show this message
+ -c Use files in current/ directory (default)
+ -p Use files in pristine/ directory
+ -v VER Use files from the version specified by VER (e.g. 2.2.1-2cl)
+ -r REV Use files from current directory, in revision REV (e.g. 1001)
+ -t DIR Put SRPM file in directory DIR when done (default is ".")
+ -P USER Define the RPM packager inforamtion to USER
+ -s FILE Run script with "FILE TOPDIR SPECFILE" command
+ -n Rename the package to include the revision number
+ -l Use subversion log to build rpm %changelog
+ -T FILE Template to be used to generate the %changelog
+ -h Show this message
+ --strict Check if the given revision contains changes in REPPKGURL
Examples:
+ repsys getsrpm python
+ repsys getsrpm -l python
repsys getsrpm http://foo.bar/svn/cnc/snapshot/python
repsys getsrpm -p http://foo.bar/svn/cnc/releases/8cl/python
repsys getsrpm -r 1001 file:///svn/cnc/snapshot/python
@@ -69,6 +74,8 @@ def parse_options():
parser.add_option("-n", dest="revname", action="store_true")
parser.add_option("-l", dest="svnlog", action="store_true")
parser.add_option("-T", dest="template", type="string", default=None)
+ parser.add_option("--strict", dest="strict", default=False,
+ action="store_true")
opts, args = parser.parse_args()
del opts.__ignore
if len(args) != 1:
diff --git a/RepSys/commands/markrelease.py b/RepSys/commands/markrelease.py
index 440775b..1707f39 100644
--- a/RepSys/commands/markrelease.py
+++ b/RepSys/commands/markrelease.py
@@ -21,6 +21,11 @@ HELP = """\
Usage: repsys markrelease [OPTIONS] REPPKGURL
+This subcommand creates a 'tag' for a given revision of a given package.
+
+The tag will be stored in the directory releases/ inside the package
+structure.
+
Options:
-f FILE Try to extract information from given file
-r REV Revision which will be used to make the release copy tag
diff --git a/RepSys/commands/patchspec.py b/RepSys/commands/patchspec.py
index 155ff4f..8330cc3 100644
--- a/RepSys/commands/patchspec.py
+++ b/RepSys/commands/patchspec.py
@@ -11,6 +11,8 @@ import sys
HELP = """\
Usage: repsys patchspec [OPTIONS] REPPKGURL PATCHFILE
+It will try to patch a spec file from a given package url.
+
Options:
-l LOG Use LOG as log message
-h Show this message
diff --git a/RepSys/commands/rpmlog.py b/RepSys/commands/rpmlog.py
index 7ea1ac0..5ba5fdd 100644
--- a/RepSys/commands/rpmlog.py
+++ b/RepSys/commands/rpmlog.py
@@ -12,6 +12,8 @@ import sys
HELP = """\
Usage: repsys rpmlog [OPTIONS] REPPKGDIRURL
+Prints the RPM changelog of a given package.
+
Options:
-r REV Collect logs from given revision to revision 0
-n NUM Output only last NUM entries
@@ -19,7 +21,8 @@ Options:
-h Show this message
Examples:
- repsys rpmlog https://repos/snapshot/python
+ repsys rpmlog python
+ repsys rpmlog http://svn.mandriva.com/svn/packages/cooker/python
"""
def parse_options():
diff --git a/RepSys/commands/submit.py b/RepSys/commands/submit.py
index 5c95526..f1726dc 100644
--- a/RepSys/commands/submit.py
+++ b/RepSys/commands/submit.py
@@ -20,6 +20,17 @@ Usage: repsys submit [OPTIONS] [URL [REVISION]]
Submits the package from URL to the submit host.
+The submit host will try to build the package, and upon successful
+completion will 'tag' the package and upload it to the official
+repositories.
+
+The status of the submit can visualized at:
+
+http://kenobi.mandriva.com/bs/output.php
+
+If no URL and revision are specified, the latest changed revision in
+the package working copy of the current directory will be used.
+
Options:
-t TARGET Submit given package URL to given target
-l Just list available targets
@@ -37,13 +48,14 @@ Examples:
repsys submit https://repos/svn/mdv/cooker/foo 14800
repsys submit -r 14800 https://repos/svn/mdv/cooker/foo
repsys submit -l https://repos
+ repsys submit --define section=main/testing -t 2008.0
"""
def parse_options():
parser = OptionParser(help=HELP)
parser.defaults["revision"] = ""
parser.add_option("-t", dest="target", default="Cooker")
- parser.add_option("-l", dest="list", action="store_true")
+ parser.add_option("-l", action="callback", callback=list_targets)
parser.add_option("-r", dest="revision", type="string", nargs=1)
parser.add_option("-s", dest="submithost", type="string", nargs=1,
default=None)
@@ -51,15 +63,8 @@ def parse_options():
opts, args = parser.parse_args()
if not args:
name, rev = get_submit_info(".")
- try:
- yn = raw_input("Submit '%s', revision %d (y/N)? " % (name, rev))
- except KeyboardInterrupt:
- yn = "n"
- if yn.lower() in ("y", "yes"):
- args = name, str(rev)
- else:
- print "Cancelled."
- sys.exit(1)
+ args = name, str(rev)
+ print "submitting %s at revision %s..." % args
elif len(args) > 2:
raise Error, "invalid arguments"
opts.pkgdirurl = default_parent(args[0])
@@ -72,6 +77,16 @@ def parse_options():
raise Error, "provide -l or a revision number"
return opts
+def list_targets(option, opt, val, parser):
+ host = config.get("submit", "host")
+ if host is None:
+ raise Error, "no submit host defined in repsys.conf"
+ createsrpm = get_helper("create-srpm")
+ #TODO make it configurable
+ command = "ssh %s %s --list" % (host, createsrpm)
+ execcmd(command, show=True)
+ sys.exit(0)
+
def submit(pkgdirurl, revision, target, list=0, define=[], submithost=None):
#if not NINZ:
# raise Error, "you must have NINZ installed to use this command"
diff --git a/RepSys/commands/switch.py b/RepSys/commands/switch.py
index dcbdd17..5cbe2d7 100644
--- a/RepSys/commands/switch.py
+++ b/RepSys/commands/switch.py
@@ -5,9 +5,10 @@ from RepSys.rpmutil import switch
HELP = """\
Usage: repsys switch [URL]
-Relocates the working copy to the base location URL. If URL is not
-provided, it will use the option default_parent from repsys.conf as
-default, or, if the current working copy is already based in
+Relocates the working copy to the base location URL.
+
+If URL is not provided, it will use the option default_parent from
+repsys.conf as default, or, if the current working copy is already based in
default_parent, it will use the location from the mirror option from
repsys.conf.
diff --git a/RepSys/commands/sync.py b/RepSys/commands/sync.py
index 42ede8d..a51db22 100644
--- a/RepSys/commands/sync.py
+++ b/RepSys/commands/sync.py
@@ -12,6 +12,8 @@ from the spec file.
Options:
--dry-run Print results without changing the working copy
+ --download -d
+ Try to download the source files not found
-h Show this message
Examples:
@@ -22,6 +24,8 @@ def parse_options():
parser = OptionParser(help=HELP)
parser.add_option("--dry-run", dest="dryrun", default=False,
action="store_true")
+ parser.add_option("-d", "--download", dest="download", default=False,
+ action="store_true")
opts, args = parser.parse_args()
if len(args):
opts.target = args[0]