comparison __init__.py @ 142:42958d9de864

documentation update
author Alexander Solovyov <piranha@piranha.org.ua>
date Sun, 14 Dec 2008 17:31:26 +0200
parents 9ffde8662967
children edd9f4e5154a
comparison
equal deleted inserted replaced
141:6f2d67bf3039 142:42958d9de864
17 17
18 def svn(ui, repo, subcommand, *args, **opts): 18 def svn(ui, repo, subcommand, *args, **opts):
19 return svncommand.svncmd(ui, repo, subcommand, *args, **opts) 19 return svncommand.svncmd(ui, repo, subcommand, *args, **opts)
20 20
21 def svn_fetch(ui, svn_url, hg_repo_path=None, **opts): 21 def svn_fetch(ui, svn_url, hg_repo_path=None, **opts):
22 '''Clone Subversion repository to local Mercurial repository.
23
24 If no destination directory name is specified, it defaults to the
25 basename of the source plus "-hg".
26
27 You can specify few paths for storing tags using comma separated values.
28 '''
22 if not hg_repo_path: 29 if not hg_repo_path:
23 hg_repo_path = hg.defaultdest(svn_url) + "-hg" 30 hg_repo_path = hg.defaultdest(svn_url) + "-hg"
24 ui.status("Assuming destination %s\n" % hg_repo_path) 31 ui.status("Assuming destination %s\n" % hg_repo_path)
25 should_update = not os.path.exists(hg_repo_path) 32 should_update = not os.path.exists(hg_repo_path)
26 svn_url = util.normalize_url(svn_url) 33 svn_url = util.normalize_url(svn_url)
32 39
33 commands.norepo += " svnclone" 40 commands.norepo += " svnclone"
34 cmdtable = { 41 cmdtable = {
35 "svn": 42 "svn":
36 (svn, 43 (svn,
37 [('u', 'svn_url', '', 'Path to the Subversion server.'), 44 [('u', 'svn-url', '', 'Path to the Subversion server.'),
38 ('', 'stupid', False, 'Be stupid and use diffy replay.'), 45 ('', 'stupid', False, 'Be stupid and use diffy replay.'),
39 ], 46 ],
40 svncommand.generate_help(), 47 svncommand.generate_help(),
41 ), 48 ),
42 "svnclone" :(svn_fetch, 49 "svnclone":
43 [('S', 'skipto_rev', '0', 'Skip commits before this revision.'), 50 (svn_fetch,
51 [('S', 'skipto-rev', '0', 'Skip commits before this revision.'),
44 ('', 'stupid', False, 'Be stupid and use diffy replay.'), 52 ('', 'stupid', False, 'Be stupid and use diffy replay.'),
45 ('T', 'tag_locations', 'tags', 'Relative path to where tags get ' 53 ('T', 'tag-locations', 'tags', 'Relative path to where tags get stored.')
46 'stored, as comma sep. values if there is more than one such path.')
47 ], 54 ],
48 'hg svn_fetch svn_url, dest'), 55 'hg svnclone source [dest]'),
49 } 56 }