source: soft/build_system/build_system/repsys/branches/V1_5_3/RepSys/commands/editlog.py @ 1

Last change on this file since 1 was 1, checked in by fasma, 12 years ago

Initial Import from Mandriva's soft revision 224062 and package revision 45733

File size: 886 bytes
Line 
1#!/usr/bin/python
2from RepSys import Error
3from RepSys.command import *
4from RepSys.svn import SVN
5import re
6
7HELP = """\
8Usage: repsys editlog [OPTIONS] [URL] REVISION
9
10Options:
11    -h         Show this message
12
13Examples:
14    repsys editlog 14800
15    repsys editlog https://repos/svn/cnc/snapshot 14800
16"""
17
18def parse_options():
19    parser = OptionParser(help=HELP)
20    opts, args = parser.parse_args()
21    if len(args) == 2:
22        pkgdirurl, revision = args
23    elif len(args) == 1:
24        pkgdirurl, revision = "", args[0]
25    else:
26        raise Error, "invalid arguments"
27    opts.pkgdirurl = default_parent(pkgdirurl)
28    opts.revision = re.compile(r".*?(\d+).*").sub(r"\1", revision)
29    return opts
30
31def editlog(pkgdirurl, revision):
32    svn = SVN()
33    svn.propedit("svn:log", pkgdirurl, rev=revision)
34
35def main():
36    do_command(parse_options, editlog)
37
38# vim:et:ts=4:sw=4
Note: See TracBrowser for help on using the repository browser.