Subject: Re: [RFC/PATCH] git-svn: use YAML format for mergeinfo cache when possible

From: Eric Wong <[email-masked]>
Date: Sun, 27 May 2012 20:14:50 +0000

Jonathan Nieder <[email-masked]> wrote:
> My personal motivation is the ability to upgrade or downgrade perl or
> change perl's use64bitint compile-time parameter without having to
> invalidate caches or (worse, what users unaware of .git/svn/.caches
> would probably do) reclone repositories.  The Storable format is not
> stable enough for forward-compatibility.
> 
> Seems to work.  I haven't run any benchmarks.  
> 
> Thoughts?  Improvements?
> 
> Signed-off-by: Jonathan Nieder <[email-masked]>

Seems reasonable, a few comments below.

>  git-svn.perl |  126 +++++++++++++++++++++++++++++++++++++++++++++++++++++++---

> +package Git::SVN::Memoize::YAML;

Can we use this as an opportunity to start splitting git-svn.perl into
multiple .pm files?  Thanks.

> +	my $truehash = (-e $filename) ? YAML::Any::LoadFile($filename) : {};

> +	YAML::Any::DumpFile($self->{FILENAME}, $self->{H});

These should die on errors, right?

> +=head1 BUGS

> +Error handling is awkward.

How so?