comparison hgext/convert/__init__.py @ 7502:16905fc2690f

Add debugcvsps command, replacing cvsps script
author Frank Kingswood <frank@kingswood-consulting.co.uk>
date Wed, 10 Dec 2008 14:02:54 +0000
parents db6fbb785800
children 26adfaccdf73
comparison
equal deleted inserted replaced
7501:732c54abd592 7502:16905fc2690f
5 # This software may be used and distributed according to the terms 5 # This software may be used and distributed according to the terms
6 # of the GNU General Public License, incorporated herein by reference. 6 # of the GNU General Public License, incorporated herein by reference.
7 '''converting foreign VCS repositories to Mercurial''' 7 '''converting foreign VCS repositories to Mercurial'''
8 8
9 import convcmd 9 import convcmd
10 import cvsps
10 from mercurial import commands 11 from mercurial import commands
11 from mercurial.i18n import _ 12 from mercurial.i18n import _
12 13
13 # Commands definition was moved elsewhere to ease demandload job. 14 # Commands definition was moved elsewhere to ease demandload job.
14 15
181 return convcmd.convert(ui, src, dest, revmapfile, **opts) 182 return convcmd.convert(ui, src, dest, revmapfile, **opts)
182 183
183 def debugsvnlog(ui, **opts): 184 def debugsvnlog(ui, **opts):
184 return convcmd.debugsvnlog(ui, **opts) 185 return convcmd.debugsvnlog(ui, **opts)
185 186
186 commands.norepo += " convert debugsvnlog" 187 def debugcvsps(ui, *args, **opts):
188 '''Create changeset information from CVS
189
190 This command is intended as a debugging tool for the CVS to Mercurial
191 converter, and can be used as a direct replacement for cvsps.
192
193 Hg debugcvsps reads the CVS rlog for current directory (or any named
194 directory) in the CVS repository, and converts the log to a series of
195 changesets based on matching commit log entries and dates.'''
196 return cvsps.debugcvsps(ui, *args, **opts)
197
198 commands.norepo += " convert debugsvnlog debugcvsps"
187 199
188 cmdtable = { 200 cmdtable = {
189 "convert": 201 "convert":
190 (convert, 202 (convert,
191 [('A', 'authors', '', _('username mapping filename')), 203 [('A', 'authors', '', _('username mapping filename')),
198 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')), 210 _('hg convert [OPTION]... SOURCE [DEST [REVMAP]]')),
199 "debugsvnlog": 211 "debugsvnlog":
200 (debugsvnlog, 212 (debugsvnlog,
201 [], 213 [],
202 'hg debugsvnlog'), 214 'hg debugsvnlog'),
215 "debugcvsps":
216 (debugcvsps,
217 [
218 # Main options shared with cvsps-2.1
219 ('b', 'branches', [], _('Only return changes on specified branches')),
220 ('p', 'prefix', '', _('Prefix to remove from file names')),
221 ('r', 'revisions', [], _('Only return changes after or between specified tags')),
222 ('u', 'update-cache', None, _("Update cvs log cache")),
223 ('x', 'new-cache', None, _("Create new cvs log cache")),
224 ('z', 'fuzz', 60, _('Set commit time fuzz in seconds')),
225 ('', 'root', '', _('Specify cvsroot')),
226 # Options specific to builtin cvsps
227 ('', 'parents', '', _('Show parent changesets')),
228 ('', 'ancestors', '', _('Show current changeset in ancestor branches')),
229 # Options that are ignored for compatibility with cvsps-2.1
230 ('A', 'cvs-direct', None, 'Ignored for compatibility'),
231 ],
232 'hg debugcvsps [OPTION]... [PATH]...'),
203 } 233 }