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 |
---|
2 | from RepSys import Error |
---|
3 | from RepSys.command import * |
---|
4 | from RepSys.svn import SVN |
---|
5 | import re |
---|
6 | |
---|
7 | HELP = """\ |
---|
8 | Usage: repsys editlog [OPTIONS] [URL] REVISION |
---|
9 | |
---|
10 | Options: |
---|
11 | -h Show this message |
---|
12 | |
---|
13 | Examples: |
---|
14 | repsys editlog 14800 |
---|
15 | repsys editlog https://repos/svn/cnc/snapshot 14800 |
---|
16 | """ |
---|
17 | |
---|
18 | def 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 | |
---|
31 | def editlog(pkgdirurl, revision): |
---|
32 | svn = SVN() |
---|
33 | svn.propedit("svn:log", pkgdirurl, rev=revision) |
---|
34 | |
---|
35 | def 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.