Mercurial > hgsubversion
comparison __init__.py @ 257:ffccf0080e54
Move wrappers for hg commands to their own module.
author | Augie Fackler <durin42@gmail.com> |
---|---|
date | Fri, 10 Apr 2009 22:38:29 -0500 |
parents | 7932d098cb5f |
children | 112d57bb736e |
comparison
equal
deleted
inserted
replaced
256:7932d098cb5f | 257:ffccf0080e54 |
---|---|
16 import sys | 16 import sys |
17 import traceback | 17 import traceback |
18 | 18 |
19 from mercurial import commands | 19 from mercurial import commands |
20 from mercurial import extensions | 20 from mercurial import extensions |
21 from mercurial import hg | |
22 from mercurial import util as hgutil | 21 from mercurial import util as hgutil |
23 | 22 |
24 from svn import core | 23 from svn import core |
25 | 24 |
26 import svncommands | 25 import svncommands |
27 import tag_repo | 26 import tag_repo |
28 import util | 27 import util |
28 import wrappers | |
29 | 29 |
30 def reposetup(ui, repo): | 30 def reposetup(ui, repo): |
31 if not util.is_svn_repo(repo): | 31 if not util.is_svn_repo(repo): |
32 return | 32 return |
33 | 33 |
39 Does the following wrappings: | 39 Does the following wrappings: |
40 * parent -> utility_commands.parent | 40 * parent -> utility_commands.parent |
41 * outgoing -> utility_commands.outgoing | 41 * outgoing -> utility_commands.outgoing |
42 """ | 42 """ |
43 entry = extensions.wrapcommand(commands.table, 'parents', | 43 entry = extensions.wrapcommand(commands.table, 'parents', |
44 utility_commands.parent) | 44 wrappers.parent) |
45 entry[1].append(('', 'svn', None, "show parent svn revision instead")) | 45 entry[1].append(('', 'svn', None, "show parent svn revision instead")) |
46 entry = extensions.wrapcommand(commands.table, 'outgoing', | 46 entry = extensions.wrapcommand(commands.table, 'outgoing', |
47 utility_commands.outgoing) | 47 wrappers.outgoing) |
48 entry[1].append(('', 'svn', None, "show revisions outgoing to subversion")) | 48 entry[1].append(('', 'svn', None, "show revisions outgoing to subversion")) |
49 entry = extensions.wrapcommand(commands.table, 'diff', | 49 entry = extensions.wrapcommand(commands.table, 'diff', |
50 svncommands.diff) | 50 wrappers.diff) |
51 entry[1].append(('', 'svn', None, | 51 entry[1].append(('', 'svn', None, |
52 "show svn-style diffs, default against svn parent")) | 52 "show svn-style diffs, default against svn parent")) |
53 entry = extensions.wrapcommand(commands.table, 'push', | 53 entry = extensions.wrapcommand(commands.table, 'push', |
54 svncommands.push) | 54 wrappers.push) |
55 entry[1].append(('', 'svn', None, "push to subversion")) | 55 entry[1].append(('', 'svn', None, "push to subversion")) |
56 entry[1].append(('', 'svn-stupid', None, "use stupid replay during push to svn")) | 56 entry[1].append(('', 'svn-stupid', None, "use stupid replay during push to svn")) |
57 entry = extensions.wrapcommand(commands.table, 'pull', | 57 entry = extensions.wrapcommand(commands.table, 'pull', |
58 svncommands.pull) | 58 wrappers.pull) |
59 entry[1].append(('', 'svn', None, "pull from subversion")) | 59 entry[1].append(('', 'svn', None, "pull from subversion")) |
60 entry[1].append(('', 'svn-stupid', None, "use stupid replay during pull from svn")) | 60 entry[1].append(('', 'svn-stupid', None, "use stupid replay during pull from svn")) |
61 | 61 |
62 entry = extensions.wrapcommand(commands.table, 'clone', | 62 entry = extensions.wrapcommand(commands.table, 'clone', |
63 svncommands.clone) | 63 wrappers.clone) |
64 entry[1].extend([#('', 'skipto-rev', '0', 'skip commits before this revision.'), | 64 entry[1].extend([#('', 'skipto-rev', '0', 'skip commits before this revision.'), |
65 ('', 'svn-stupid', False, 'be stupid and use diffy replay.'), | 65 ('', 'svn-stupid', False, 'be stupid and use diffy replay.'), |
66 ('', 'svn-tag-locations', 'tags', 'Relative path to Subversion tags.'), | 66 ('', 'svn-tag-locations', 'tags', 'Relative path to Subversion tags.'), |
67 ('', 'svn-authors', '', 'username mapping filename'), | 67 ('', 'svn-authors', '', 'username mapping filename'), |
68 ('', 'svn-filemap', '', | 68 ('', 'svn-filemap', '', |
69 'remap file to exclude paths or include only certain paths'), | 69 'remap file to exclude paths or include only certain paths'), |
70 ]) | 70 ]) |
71 # (svn_fetch, | |
72 # , | |
73 # 'hg svnclone source [dest]'), | |
74 | 71 |
75 | 72 |
76 def svn(ui, repo, subcommand, *args, **opts): | 73 def svn(ui, repo, subcommand, *args, **opts): |
77 '''see detailed help for list of subcommands''' | 74 '''see detailed help for list of subcommands''' |
78 | 75 |