All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ramkumar Ramachandra <artagnon@gmail.com>
To: Stefan Sperling <stsp@elego.de>
Cc: "dev@subversion.apache.org" <dev@subversion.apache.org>,
	Bert Huijben <rhuijben@collab.net>,
	Daniel Shahaf <d.s@daniel.shahaf.name>,
	Will Palmer <wmpalmer@gmail.com>,
	David Michael Barr <david.barr@cordelta.com>,
	Jonathan Nieder <jrnieder@gmail.com>,
	Sverre Rabbelier <srabbelier@gmail.com>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: [PATCH v2] Add svnrdump
Date: Wed, 14 Jul 2010 18:01:49 +0200	[thread overview]
Message-ID: <20100714160149.GA7561@debian> (raw)
In-Reply-To: <20100714153206.GH25630@jack.stsp.name>

Hi Stefan,

Stefan Sperling writes:
> Playing with svnrdump and comparing its output to the output of
> svnadmin dump --deltas, I noticed that:

Thanks for testing!

>  - svnrdump doesn't dump revision 0.
>    It should dump revision 0, because that revision can contain important
>    revprops such as metadata for svnsync (svn:sync-last-merge-rev etc.)

Yeah, I forgot to ask about this: passing 0 as an argument to the
replay API doesn't seem to work. Why? How do I dump revision 0 then?

>  - You're missing a couple of fields:
>    The UUID of the repository.
>    Text-content-sha1
>    Text-delta-base-md5
>    Text-delta-base-sha1

Yes, I'm aware. Since these fields aren't strictly necessary, I
decided not to take the extra effort to print them out: you'll notice
that I'm printing the md5 sum that the server gives me instead of
calculating anything. SHA1 sum would require /some/ calculation. UUID
and text-delta-base-md5 aren't a big deal though: I'll fix these
later.

>  - I've seen a "Prop-delta: true" line which svnadmin dump does not print.

Correct. `svnadmin dump` has a logic for determining when the prop is
really a delta (as opposed to a delta against /dev/null). Since
there's no harm printing extra Prop-delta headers, I decided not to
implement this logic.

>  - You're missing some newlines that svnadmin dump prints (cosmetic,
>    but it would be nice if both produced matching output).

This isn't in the dump-load-format spec document (atleast afaik), and
it's very hard to get this right (yes, I tried). Moreover, it's very
ungratifying to have a few extra newlines (reverse engineered from
`svnadmin dump`) printed at the end of 10+ hrs of work; yes, that's
what I estimate it'll take to fix this.

> How to reproduce what I'm seeing:
>   Use svnsync to get a copy of the numptyphysics repository at
>     https://vcs.maemo.org/svn/numptyphysics (I had a dump of that lying
>     around... other repositories might do the job just as well, of course)
>   Dump the repository using svnadmin dump --deltas.
>   Dump the repository using svnrdump.
>   Compare output with diff -u.

Right. My validation script (validate.sh in the original repository)
runs the following filter on the diff and validates if nothing seeps
through. In other words, I know that these differences exist, and have
determined that they're safe.

gawk '$0 !~ "Prop-delta: true|Text-delta-base-|sha1|Text-copy-source-|^-$" && $0 ~ "^+|^-" { print; }'

> Please get rid of all global variables in svnrdump.c:
> subversion/svnrdump/svnrdump.c:43: warning: declaration of `pool' shadows a glob
> al declaration
> subversion/svnrdump/svnrdump.c:33: warning: shadowed declaration is here
> subversion/svnrdump/svnrdump.c:91: warning: declaration of `pool' shadows a glob
> al declaration
> subversion/svnrdump/svnrdump.c:33: warning: shadowed declaration is here

Will do. I'm waiting for commit access, because I don't want to make
un-versioned edits to the file that I cannot track or revert in
future.

> When adding unit tests for svnrdump, please make each and every one of
> those tests compare with output of svnadmin dump --deltas, so that we
> will keep them in sync.

Right. Please see the current `validate.sh` for an example of the
functionality I'll write into the unit tests.

-- Ram

  reply	other threads:[~2010-07-14 16:00 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-09 14:29 [PATCH v2] Add svnrdump Ramkumar Ramachandra
2010-07-13 20:11 ` Stefan Sperling
2010-07-14 15:32   ` Stefan Sperling
2010-07-14 16:01     ` Ramkumar Ramachandra [this message]
2010-07-14 16:48       ` C. Michael Pilato
2010-07-15 10:28         ` Ramkumar Ramachandra
2010-07-14 17:24       ` Stefan Sperling
2010-07-14 17:31         ` C. Michael Pilato
2010-07-14 17:34           ` Stefan Sperling
2010-07-14 17:47           ` Jonathan Nieder
2010-07-14 17:56             ` C. Michael Pilato
2010-07-15 12:01         ` Ramkumar Ramachandra
2010-07-14 19:25       ` Bert Huijben
2010-07-15 12:07         ` Ramkumar Ramachandra
2010-07-15 19:02   ` Ramkumar Ramachandra
2010-07-15 19:23     ` Stefan Sperling
2010-07-21 11:46       ` Ramkumar Ramachandra
2010-07-21 13:29         ` Daniel Shahaf
2010-07-21 19:03   ` 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=20100714160149.GA7561@debian \
    --to=artagnon@gmail.com \
    --cc=d.s@daniel.shahaf.name \
    --cc=david.barr@cordelta.com \
    --cc=dev@subversion.apache.org \
    --cc=git@vger.kernel.org \
    --cc=jrnieder@gmail.com \
    --cc=rhuijben@collab.net \
    --cc=srabbelier@gmail.com \
    --cc=stsp@elego.de \
    --cc=wmpalmer@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.