Marko Macek wrote:
> + print ' --branches=PATH path for branches (default: /tags)'
> + print ' --tags=PATH path for tags (default: /branches)'
Oops. This is bad (tnx sander). The attached patch fixes it.
Regards,
MArk
--- ../patch-1/cvs2svn.py 2002-10-24 20:21:41.000000000 +0200
+++ cvs2svn.py 2002-10-24 21:30:44.000000000 +0200
@@ -637,7 +637,7 @@
print 'pass %d: %d seconds' % (i, int(times[i] - times[i-1]))
print ' total:', int(times[len(_passes)] - times[start_pass-1]), 'seconds'
-def usage():
+def usage(ctx):
print 'USAGE: %s [-n] [-v] [-s svn-repos-path] [-p pass] cvs-repos-path' \
% os.path.basename(sys.argv[0])
print ' -n dry run. parse CVS repos, but do not construct SVN repos.'
@@ -645,23 +645,15 @@
print ' -s PATH path for SVN repos.'
print ' -p NUM start at pass NUM of %d.' % len(_passes)
print ' --create create a new SVN repository'
- print ' --trunk=PATH path for trunk (default: /trunk)'
- print ' --branches=PATH path for branches (default: /tags)'
- print ' --tags=PATH path for tags (default: /branches)'
+ print ' --trunk=PATH path for trunk (default: %s)' % ctx.trunk_base
+ print ' --branches=PATH path for branches (default: %s)' % ctx.branches_base
+ print ' --tags=PATH path for tags (default: %s)' % ctx.tags_base
sys.exit(1)
def main():
- try:
- opts, args = getopt.getopt(sys.argv[1:], 'p:s:vn',
- [ "create", "trunk", "branches", "tags" ])
- except getopt.GetoptError:
- usage()
- if len(args) != 1:
- usage()
-
# prepare the operation context
ctx = _ctx()
- ctx.cvsroot = args[0]
+ ctx.cvsroot = None
ctx.target = SVNROOT
ctx.log_fname_base = DATAFILE
ctx.verbose = 0
@@ -671,6 +663,15 @@
ctx.tags_base = "/tags"
ctx.branches_base = "/branches"
+ try:
+ opts, args = getopt.getopt(sys.argv[1:], 'p:s:vn',
+ [ "create", "trunk", "branches", "tags" ])
+ except getopt.GetoptError:
+ usage(ctx)
+ if len(args) != 1:
+ usage(ctx)
+
+ ctx.cvsroot = args[0]
start_pass = 1
for opt, value in opts:
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Oct 24 21:35:10 2002