Commit Graph

9 Commits

Author SHA1 Message Date
Jonathan Nieder
0316bba80f t9010: svnadmin can fail even if available
If svn is built against one version of SQLite and run against another,
libsvn_subr needlessly errors out in operations that need to make a
commit.

That is clearly not a bug in git but let us consider the ramifications for
the test suite.  git-svn uses libsvn directly and is probably broken by
that bug; it is right for git-svn tests to fail.  The vcs-svn lib, on the
other hand, does not use libsvn and the test t9010 only uses svn to check
its work.  This points to two possible improvements:

 - do not disable most vcs-svn tests if svn is missing.
 - skip validation rather than failing it when svn fails.

Bring about both by putting the svn invocations into a single test that
builds a repo to compare the test-svn-fe result against.  The test will
always pass but only will set the new SVNREPO test prereq if svn succeeds;
and validation using that repo gets an SVNREPO prerequisite so it only
runs with working svn installations.

Works-around: http://bugs.debian.org/608925
Noticed-by: A Large Angry SCM <gitzilla@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
2011-01-10 09:35:17 -08:00
Junio C Hamano
bf9b46c16d Merge branch 'jn/svn-fe' (early part)
* 'jn/svn-fe' (early part):
  vcs-svn: Error out for v3 dumps

Conflicts:
	t/t9010-svn-fe.sh
2011-01-05 13:34:43 -08:00
Junio C Hamano
8e9d453ce7 t9010 fails when no svn is available
Running test t9010 without svn currently errors out for no good reason.

The test uses "svnadmin" without checking if svn is available.  This was a
regression introduced by b0ad24b (t9010 (svn-fe): Eliminate dependency on
svn perl bindings, 2010-10-10) when it stopped including ./lib-git-svn.sh
that had the safety.

This should fix it.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-12-09 09:26:07 -08:00
Jonathan Nieder
b3e5bce1aa vcs-svn: Error out for v3 dumps
By ignoring the Text-Delta and Prop-Delta node fields, current svn-fe
happily mistakes deltas for full text and instead of cleanly erroring
out, it produces a valid but semantically bogus fast-import stream
when fed a dump file in the modern "svnadmin dump --deltas" format.

Dump file parsers are supposed to ignore header fields they don't
understand (to allow for backward-compatible extensions), but they are
also supposed to check the SVN-fs-dump-format-version header to
prevent misinterpretation of non backward-compatible extensions.
Do so.

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-24 14:48:52 -08:00
Ramkumar Ramachandra
b0ad24be8c t9010 (svn-fe): Eliminate dependency on svn perl bindings
Running test t9010 without the SVN:: perl modules currently errors
out, for no good reason.  We can make these tests easier to read and
run by not using the perl libsvn bindings and instead duplicating only
the relevant code from lib-git-svn.sh.

Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-11-23 16:20:22 -08:00
Ævar Arnfjörð Bjarmason
cd9a7b57a7 t/t9010-svn-fe.sh: add an +x bit to this test
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-19 13:07:14 -07:00
Jonathan Nieder
7e45e0569c t9010 (svn-fe): avoid symlinks in test
The svn-fe test fails on Windows in the “svn export” step because of
the lack of symlink support.  With a less ambitious dump, it passes.

Acked-by: Johannes Sixt <j6t@kdbg.org>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-14 19:35:38 -07:00
Jonathan Nieder
24f1136894 t9010 (svn-fe): use Unix-style path in URI
Ever since v1.6.3-rc0~101^2~14 (Tests on Windows: $(pwd) must return
Windows-style paths, 2009-03-13), there is a subtle difference between
$(pwd) and $PWD in tests: the former returns Windows-style paths as
might be output by git and the latter Unix-style paths which msys
programs tend to prefer.

In file:// URIs, Unix-style paths are needed.  Before: “svn export”
declares it cannot find

 file://c:/apps/git/git/t/trash directory/simple-svco

After: “svn export” successfully finds

 file:///c/apps/git/git/...

Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-14 19:35:38 -07:00
David Barr
21746aa34f SVN dump parser
svndump parses data that is in SVN dumpfile format produced by
`svnadmin dump` with the help of line_buffer and uses repo_tree and
fast_export to emit a git fast-import stream.

Based roughly on com.hydrografix.svndump 0.92 from the SvnToCCase
project at <http://svn2cc.sarovar.org/>, by Stefan Hegny and
others.

[rr: allow input from files other than stdin]
[jn: with test, more error reporting]

Signed-off-by: David Barr <david.barr@cordelta.com>
Signed-off-by: Ramkumar Ramachandra <artagnon@gmail.com>
Signed-off-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2010-08-14 19:35:38 -07:00