comparison __init__.py @ 0:f2636cfed115

Initial import of hgsubversion into a public repository.
author Augie Fackler <durin42@gmail.com>
date Tue, 30 Sep 2008 11:42:52 -0500
parents
children fb1d911bb0be
comparison
equal deleted inserted replaced
-1:000000000000 0:f2636cfed115
1 from mercurial import commands
2 from mercurial import hg
3
4 import svncommand
5 import fetch_command
6
7 def svn(ui, repo, subcommand, *args, **opts):
8 return svncommand.svncmd(ui, repo, subcommand, *args, **opts)
9
10 def svn_fetch(ui, svn_url, hg_repo_path=None, **opts):
11 if not hg_repo_path:
12 hg_repo_path = hg.defaultdest(svn_url) + "-hg"
13 ui.status("Assuming destination %s\n" % hg_repo_path)
14 return fetch_command.fetch_revisions(ui, svn_url, hg_repo_path, **opts)
15
16 commands.norepo += " svnclone"
17 cmdtable = {
18 "svn":
19 (svn,
20 [('u', 'svn_url', '', 'Path to the Subversion server.'),
21 ('', 'stupid', False, 'Be stupid and use diffy replay.'),
22 ],
23 'hg svn subcommand'),
24 "svnclone" :(svn_fetch,
25 [('S', 'skipto_rev', '0', 'Skip commits before this revision.'),
26 ('', 'stupid', False, 'Be stupid and use diffy replay.'),
27 ('T', 'tag_locations', 'tags', 'Relative path to where tags get '
28 'stored, as comma sep. values if there is more than one such path.')
29 ],
30 'hg svn_fetch svn_url, dest'),
31 }