Commit ee7ea3c6 authored by Jelmer Vernooij's avatar Jelmer Vernooij

Import svn2bzr since it can share testing infrastructure

and mapping code with bzr-svn now.
parents e455ce4f 3a17d7f1
Jelmer Vernooij <jelmer@samba.org>
svn2bzr originally by:
Gustavo Niemeyer <gustavo@niemeyer.net>
- support for tags (once it is in bzrs core)
- support nested branches (svn:externals)
- use commitbuilder so there's no need for workingtrees?
- use svn.ra.checkout() rather than individial get_file() and get_dir()
calls
- bug 44312
- more tests
- testsuite that generates a working tree from each revision in a .svndump file by using just SVN tools and then compares that working tree by checking out the same revision generated by svn2bzr. Perhaps do comparisons by simply running 'svn status' ?
......@@ -18,4 +18,7 @@ setup(name='bzr-svn',
package_dir={'bzrlib.plugins.svn':'.',
'bzrlib.plugins.svn.tests':'tests'},
packages=['bzrlib.plugins.svn',
'bzrlib.plugins.svn.tests'])
'bzrlib.plugins.svn.tests'],
scripts=['svn2bzr'],
data_files=[('man/man1', ['svn2bzr.1'])],
)
#!/bin/sh
TESTS="$*"
rm -rf bzr.test
if [ -z "$TESTS" ]; then
TESTS=testdata/*.dump
fi
for I in $TESTS
do
echo "Testing $I"
./svn2bzr --check --scheme=trunk $I bzr.test || exit 1
rm -rf bzr.test
done
exit 0
This diff is collapsed.
.TH svn2bzr 1 "2006\-05\-02" "0.8.2" "svn2bzr"
.SH "NAME"
svn2bzr \- Conversion tool for converting SVN repositories to bzr branches
.SH "SYNOPSIS"
.B "svn2bzr"
.I [OPTIONS]
.I <dump-file|svn-url>
.I output-dir
.SH "DESCRIPTION"
.B "svn2bzr"
is a simple tool written by Gustavo Niemeyer and Jelmer Vernooij which converts SVN repositories
to bzr branches.
.SH "OPTIONS"
.TP
\fB\-\-version\fR
show program's version number and exit
.TP
\fB\-h\fR, \fB\-\-help\fR
show this help message and exit
.TP
\fB\-\-include\fR=\fIREGEXP\fR
paths matching the regular expression are considered if no
prior exclude matched
.TP
\fB\-\-exclude\fR=\fIREGEXP\fR
paths matching the regular expression are discarded if no
prior include matched
.TP
\fB\-\-prefix\fR=\fIPATH\fR
Subversion repository will be considered as if it started
at the given path
.TP
\fB\-\-scheme\fR=\fISCHEME\fR
Subversion repository scheme (single or trunk, default is
single)
.TP
\fB\-\-check\fR
Enable extra consistency checks (slower)
.TP
\fB\-\-log\fR=\fILEVEL\fR
set logging level to LEVEL (debug, info, warning, error)
.SH BUGS
.TP
Please report any other bugs you find in launchpad.
.SH AUTHORS
.PP
Gustavo Niemeyer <gustavo@niemeyer.net> is the original author.
Jelmer Vernooij <jelmer@samba.org> is the current maintainer.
.SH "SEE ALSO"
.UR http://www.bazaar\-vcs.org/svn2bzr
.BR http://www.bazaar\-vcs.org/svn2bzr,
.BR bzr(1),
.BR svn(1)
SVN-fs-dump-format-version: 2
UUID: 43d016e3-463f-4af7-85a4-939043c5d8a9
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2006-06-20T00:21:38.128280Z
PROPS-END
Revision-number: 1
Prop-content-length: 116
Content-length: 116
K 7
svn:log
V 15
Initial commit
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-06-20T00:22:07.788075Z
PROPS-END
Node-path: branches
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Node-path: branches/foo
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Node-path: tags
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Node-path: trunk
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Revision-number: 2
Prop-content-length: 109
Content-length: 109
K 7
svn:log
V 9
Add data
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-06-20T00:22:37.264058Z
PROPS-END
Node-path: branches/foo/bla
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 5
Text-content-md5: 7185fd3001e424251c6be73a5dc9c28b
Content-length: 15
PROPS-END
blie
Node-path: trunk/foo
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 3
Text-content-md5: c6beb132462d61bdd851de604acec9c7
Content-length: 13
PROPS-END
ha
Revision-number: 3
Prop-content-length: 104
Content-length: 104
K 7
svn:log
V 4
Tag
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-06-20T00:22:45.540475Z
PROPS-END
Node-path: tags/mytag
Node-kind: dir
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: trunk
Node-path: tags/mytag/foo
Node-kind: file
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/foo
Revision-number: 4
Prop-content-length: 120
Content-length: 120
K 7
svn:log
V 19
Strange operation.
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-06-20T00:23:12.193673Z
PROPS-END
Node-path: tags/mytag/foe
Node-kind: dir
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: branches/foo
Node-path: tags/mytag/foe/bla
Node-kind: file
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: branches/foo/bla
SVN-fs-dump-format-version: 2
UUID: 48558b1a-f90f-0410-8d7c-829351447e99
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2006-03-27T12:27:53.455194Z
PROPS-END
Revision-number: 1
Prop-content-length: 116
Content-length: 116
K 7
svn:log
V 15
Initial commit
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-27T12:28:20.403398Z
PROPS-END
Node-path: oldfile
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 2
Text-content-md5: b026324c6904b2a9cb4b88d6d61c81d1
Content-length: 12
PROPS-END
1
Revision-number: 2
Prop-content-length: 130
Content-length: 130
K 7
svn:log
V 29
Do some operations (copies!)
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-27T12:28:48.104525Z
PROPS-END
Node-path: newfile1
Node-kind: file
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: oldfile
Text-content-length: 2
Text-content-md5: 60b725f10c9c85c70d97880dfe8191b3
Content-length: 2
a
Node-path: newfile2
Node-kind: file
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: oldfile
Text-content-length: 2
Text-content-md5: 3b5d5c3712955042212316173ccf37be
Content-length: 2
b
Node-path: oldfile
Node-action: delete
SVN-fs-dump-format-version: 2
UUID: 046b9e4a-d10e-0410-a80f-d40b99db7ae4
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2006-03-12T19:32:49.692650Z
PROPS-END
Revision-number: 1
Prop-content-length: 109
Content-length: 109
K 7
svn:log
V 9
Add data
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-12T19:33:14.536450Z
PROPS-END
Node-path: trunk
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Node-path: trunk/dummy1
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Content-length: 10
PROPS-END
Revision-number: 2
Prop-content-length: 115
Content-length: 115
K 7
svn:log
V 14
Add more data
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-12T19:33:31.505481Z
PROPS-END
Node-path: trunk/dummy2
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Content-length: 10
PROPS-END
Revision-number: 3
Prop-content-length: 105
Content-length: 105
K 7
svn:log
V 5
Copy
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-12T19:34:09.852773Z
PROPS-END
Node-path: trunk-new
Node-kind: dir
Node-action: add
Node-copyfrom-rev: 1
Node-copyfrom-path: trunk
Node-path: trunk-new/dummy2
Node-kind: file
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/dummy2
SVN-fs-dump-format-version: 2
UUID: 8e11036a-4808-0410-b2b2-dca3825221e6
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2005-12-19T15:43:36.096412Z
PROPS-END
Revision-number: 1
Prop-content-length: 112
Content-length: 112
K 7
svn:log
V 11
Add a file
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2005-12-19T15:43:51.614727Z
PROPS-END
Node-path: file
Node-kind: file
Node-action: add
Prop-content-length: 10
Text-content-length: 0
Text-content-md5: d41d8cd98f00b204e9800998ecf8427e
Content-length: 10
PROPS-END
Revision-number: 2
Prop-content-length: 120
Content-length: 120
K 7
svn:log
V 19
Make it executable
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2005-12-19T15:44:04.928232Z
PROPS-END
Node-path: file
Node-kind: file
Node-action: change
Prop-content-length: 36
Content-length: 36
K 14
svn:executable
V 1
*
PROPS-END
Revision-number: 3
Prop-content-length: 127
Content-length: 127
K 7
svn:log
V 26
Remove the executable bit
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2005-12-19T15:44:35.573025Z
PROPS-END
Node-path: file
Node-kind: file
Node-action: change
Prop-content-length: 10
Content-length: 10
PROPS-END
SVN-fs-dump-format-version: 2
UUID: 56608f6f-4808-0410-afa0-9c963a684ec8
Revision-number: 0
Prop-content-length: 56
Content-length: 56
K 8
svn:date
V 27
2005-12-19T15:45:09.177682Z
PROPS-END
Revision-number: 1
Prop-content-length: 115
Content-length: 115
K 7
svn:log
V 14
Ignore a file
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2005-12-19T15:45:34.381718Z
PROPS-END
Node-path:
Node-kind: dir
Node-action: change
Prop-content-length: 37
Content-length: 37
K 10
svn:ignore
V 6
filex
PROPS-END
Revision-number: 2
Prop-content-length: 115
Content-length: 115
K 7
svn:log
V 14
Ignore a glob
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2005-12-19T15:45:43.901955Z
PROPS-END
Node-path:
Node-kind: dir
Node-action: change
Prop-content-length: 44
Content-length: 44
K 10
svn:ignore
V 12
filex
*glob
PROPS-END
Revision-number: 3
Prop-content-length: 122
Content-length: 122
K 7
svn:log
V 21
Create new directory
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-26T19:36:27.981562Z
PROPS-END
Node-path: newdir
Node-kind: dir
Node-action: add
Prop-content-length: 10
Content-length: 10
PROPS-END
Revision-number: 4
Prop-content-length: 118
Content-length: 118
K 7
svn:log
V 17
Remove directory
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-26T19:36:46.036249Z
PROPS-END
Node-path: newdir
Node-action: delete
Revision-number: 5
Prop-content-length: 117
Content-length: 117
K 7
svn:log
V 16
Add another dir
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-26T19:37:16.813060Z
PROPS-END
Node-path: newdir
Node-kind: dir
Node-action: add
Prop-content-length: 59
Content-length: 59
K 10
svn:ignore
V 27
somefile1
somefile2
*file*
PROPS-END
Revision-number: 6
Prop-content-length: 118
Content-length: 118
K 7
svn:log
V 17
Remove dir again
K 10
svn:author
V 6
jelmer
K 8
svn:date
V 27
2006-03-26T19:37:26.682046Z
PROPS-END
Node-path: newdir
Node-action: delete
Revision-number: 7
Prop-content-length: 137
Content-length: 137
K 7
svn:log
V 36
Add some garbage in ignore property
K 10
svn:author