comparison __init__.py @ 185:57355b0e7bd1

Creating patch for documention messages.
author Dan Villiom Podlaski Christiansen <danchr@cs.au.dk>
date Sat, 17 Jan 2009 15:30:37 -0600
parents a336e3e82648
children 91db8fc049b0
comparison
equal deleted inserted replaced
184:d3ea6c98a086 185:57355b0e7bd1
1 '''integration with Subversion repositories
2
3 This extension allows Mercurial to act as a Subversion client, for
4 fast incremental, bidirectional updates.
5
6 It is *not* ready yet for production use. You should only be using
7 this if you're ready to hack on it, and go diving into the internals
8 of Mercurial and/or Subversion.
9
10 Before using hgsubversion, it is *strongly* encouraged to run the
11 automated tests. See `README' in the hgsubversion directory for
12 details.
13 '''
14
1 import os 15 import os
2 16
3 from mercurial import commands 17 from mercurial import commands
4 from mercurial import hg 18 from mercurial import hg
5 19
14 28
15 repo.__class__ = tag_repo.generate_repo_class(ui, repo) 29 repo.__class__ = tag_repo.generate_repo_class(ui, repo)
16 30
17 31
18 def svn(ui, repo, subcommand, *args, **opts): 32 def svn(ui, repo, subcommand, *args, **opts):
33 '''see detailed help for list of subcommands'''
34
19 return svncommand.svncmd(ui, repo, subcommand, *args, **opts) 35 return svncommand.svncmd(ui, repo, subcommand, *args, **opts)
20 36
21 def svn_fetch(ui, svn_url, hg_repo_path=None, **opts): 37 def svn_fetch(ui, svn_url, hg_repo_path=None, **opts):
22 '''Clone Subversion repository to local Mercurial repository. 38 '''clone Subversion repository to a local Mercurial repository.
23 39
24 If no destination directory name is specified, it defaults to the 40 If no destination directory name is specified, it defaults to the
25 basename of the source plus "-hg". 41 basename of the source plus "-hg".
26 42
27 You can specify multiple paths for the location of tags using comma 43 You can specify multiple paths for the location of tags using comma
40 56
41 commands.norepo += " svnclone" 57 commands.norepo += " svnclone"
42 cmdtable = { 58 cmdtable = {
43 "svn": 59 "svn":
44 (svn, 60 (svn,
45 [('u', 'svn-url', '', 'Path to the Subversion server.'), 61 [('u', 'svn-url', '', 'path to the Subversion server.'),
46 ('', 'stupid', False, 'Be stupid and use diffy replay.'), 62 ('', 'stupid', False, 'be stupid and use diffy replay.'),
47 ('A', 'authors', '', 'username mapping filename'), 63 ('A', 'authors', '', 'username mapping filename'),
48 ('', 'filemap', '', 'remap file to exclude paths or include only certain paths'), 64 ('', 'filemap', '',
65 'remap file to exclude paths or include only certain paths'),
49 ], 66 ],
50 svncommand.generate_help(), 67 svncommand.generate_help(),
51 ), 68 ),
52 "svnclone": 69 "svnclone":
53 (svn_fetch, 70 (svn_fetch,
54 [('S', 'skipto-rev', '0', 'Skip commits before this revision.'), 71 [('S', 'skipto-rev', '0', 'skip commits before this revision.'),
55 ('', 'stupid', False, 'Be stupid and use diffy replay.'), 72 ('', 'stupid', False, 'be stupid and use diffy replay.'),
56 ('T', 'tag-locations', 'tags', 'Relative path to Subversion tags.'), 73 ('T', 'tag-locations', 'tags', 'Relative path to Subversion tags.'),
57 ('A', 'authors', '', 'username mapping filename'), 74 ('A', 'authors', '', 'username mapping filename'),
58 ('', 'filemap', '', 'remap file to exclude paths or include only certain paths'), 75 ('', 'filemap', '',
76 'remap file to exclude paths or include only certain paths'),
59 ], 77 ],
60 'hg svnclone source [dest]'), 78 'hg svnclone source [dest]'),
61 } 79 }