From: Jonathan Nieder <jrnieder@gmail.com>
To: Ramkumar Ramachandra <artagnon@gmail.com>
Cc: Git List <git@vger.kernel.org>,
David Barr <david.barr@cordelta.com>,
Sverre Rabbelier <srabbelier@gmail.com>,
Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH 2/3] t9010-svn-fi: Add tests for svn-fi
Date: Tue, 1 Feb 2011 21:18:12 -0600 [thread overview]
Message-ID: <20110202031812.GB15285@elie> (raw)
In-Reply-To: <20110202024944.GA11339@kytes>
Ramkumar Ramachandra wrote:
> Jonathan Nieder writes:
>> Ramkumar Ramachandra wrote:
>> Is it impossible to test without svn present or otherwise speed
>> these up? Some random ideas:
[...]
> Hm, I'm not entirely convinced -- the final verdict is always dictated
> by whether or not the emitted dumpstream loads. Many streams that look
> alright to the eye don't actually load because of small intricacies
> like missing newlines. It'll be awfully complicated reverse-engineer
> all these intricate rules and write them in terms of sed/ awk
> commands. Yes, svnrdump will be faster, but it'll only be available
> with the later versions of Subversion (same problem with fixing
> svnadmin bottlenecks).
If svnrdump is fast enough, wouldn't something like
if svnrdump --help >/dev/null 2>&1
then
load_dump () {
svnrdump load "file://$1"
}
test_set_prereq SVN
elif svnadmin --help >/dev/null 2>&1
then
load_dump () {
svnadmin load "$1"
}
test_set_prereq SVN
else
: no usable svn installation
fi
do it?
>>> +svn_look () {
>>> + subcommand=$1 &&
>>> + shift &&
>>> + svnlook "$subcommand" "$svnrepo" "$@"
>>> +}
[...]
> Just a convinience: I am using svn_look to look at the properties of
> nodes in several tests.
Ah, I missed the implicit $svnrepo argument. Makes sense then (might
be good to have a comment to explain the purpose, though).
>>> +test_expect_success 'normal empty files' '
>>> + reinit_svn &&
>>> + cat >expect.tree <<-\EOF &&
>>> + /
>>> + foo
>>> + bar
>>> + EOF
>>> + cat >input <<-\EOF &&
>>> + reset refs/heads/master
>>> + commit refs/heads/master
>>> + mark :1
>>> + author nobody <nobody@localhost> 1170199019 +0100
>>> + committer nobody <nobody@localhost> 1170199019 +0100
>>
>> Where do the dates come from? Why should I (the reader) expect
>> them?
>
> What do you suggest? I need some valid "generic" timestamp + offset.
test_tick
...
author nobody <nobody@localhost> $GIT_AUTHOR_DATE
[...]
> Okay, I'll try this. Is there no other way? Can we whip up a shell
> script to convert the timestamp?
Maybe the standard "date" utility can help with conversions?
I'm not sure what kinds of validation you're doing on the dates, hence
the vague answers. For examples of fuzzing out the unimportant bits,
git grep fuzz t/*.sh
can help.
>>> +test_expect_success 'malformed fast-import stream: author 2' '
[...]
>>> + try_load input must_fail
>>
>> What's wrong with this stream?
>
> author nobody <localhost>
> ^
> Parse error there, since build_svn_author tries to use the part of the
> email address appearing before the '@'. This is just a temporary test
> -- we should make the svn_author generation logic configurable.
So the stream is not malformed? In that case, I guess the
intent is
test_expect_failure 'does something reasonable with email address without @' '
...
try_load input
'
Thanks again.
Jonathan
next prev parent reply other threads:[~2011-02-02 3:19 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-01 14:26 [PATCH v3 0/3] Towards a Git-to-SVN bridge Ramkumar Ramachandra
2011-02-01 14:26 ` [PATCH 1/3] vcs-svn: Introduce svnload, a dumpfile producer Ramkumar Ramachandra
2011-02-01 14:46 ` Erik Faye-Lund
2011-02-02 2:53 ` Ramkumar Ramachandra
2011-02-02 12:43 ` Erik Faye-Lund
2011-02-01 14:26 ` [PATCH 2/3] t9010-svn-fi: Add tests for svn-fi Ramkumar Ramachandra
2011-02-01 18:58 ` Jonathan Nieder
2011-02-02 2:49 ` Ramkumar Ramachandra
2011-02-02 3:18 ` Jonathan Nieder [this message]
2011-02-01 14:26 ` [PATCH 3/3] vcs-svn: Refactor dump_export code into dispatch table Ramkumar Ramachandra
2011-02-01 17:42 ` Jonathan Nieder
2011-02-01 21:29 ` Junio C Hamano
2011-02-02 2:56 ` Ramkumar Ramachandra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110202031812.GB15285@elie \
--to=jrnieder@gmail.com \
--cc=artagnon@gmail.com \
--cc=david.barr@cordelta.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=srabbelier@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).