Subject: | snanalyze chokes on a pathological copy/delete/add combo |
snanalyze will choke on the dump file attached:
$ /home/netbanx/.cpan/build/App-SnerpVortex-1.000-axQdhu/bin/snanalyze
--dump=t.dump1 --db=db1
trunk/dir not a container of trunk/dir at 5 at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Analysis.pm
line 847
SVN::Analysis::_get_container_paths('SVN::Analysis=HASH(0x8ba5770)',
'trunk/dir', 5) called at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Analysis.pm
line 799
SVN::Analysis::_touch_directory('SVN::Analysis=HASH(0x8ba5770)',
'trunk/dir', 5) called at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Analysis.pm
line 792
SVN::Analysis::_touch_parent_directory('SVN::Analysis=HASH(0x8ba5770)',
'trunk/dir/file', 5) called at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Analysis.pm
line 241
SVN::Analysis::consider_delete('SVN::Analysis=HASH(0x8ba5770)',
'trunk/dir/file', 5) called at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Dump/Analyzer.pm
line 76
SVN::Dump::Analyzer::on_node_delete('SVN::Dump::Analyzer=HASH(0x8a69030)',
5, 'trunk/dir/file') called at
/export/home/netbanx/base/usr/lib/perl5/site_perl/5.10.1/SVN/Dump/Walker.pm
line 142
SVN::Dump::Walker::walk('SVN::Dump::Analyzer=HASH(0x8a69030)')
called at
/home/netbanx/.cpan/build/App-SnerpVortex-1.000-axQdhu/bin/snanalyze line 60
The specific commit that it takes objection to was this sequence of actions:
$ svn cp file:///home/netbanx/tmp/testit/trunk/dir@2
.
A dir/file
Checked out revision 2.
A dir
$ svn rm dir/file
D dir/file
$ svn cp file:///home/netbanx/tmp/testit/trunk/dir/file@2 dir/
A dir/file
$ svn diff
$ svn st
A + dir
R + dir/file
$ EDITOR=vi svn commit
which looks like this in the dump:
Revision-number: 5
Prop-content-length: 263
Content-length: 263
K 7
svn:log
V 160
Copy the directory from a historical revision. Delete its contents.
Copy some contents from a historical revision (which happens to be the same,
but nevermind)
K 10
svn:author
V 7
netbanx
K 8
svn:date
V 27
2011-02-09T17:02:02.426314Z
PROPS-END
Node-path: trunk/dir
Node-kind: dir
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/dir
Node-path: trunk/dir/file
Node-kind: file
Node-action: delete
Node-path: trunk/dir/file
Node-kind: file
Node-action: add
Node-copyfrom-rev: 2
Node-copyfrom-path: trunk/dir/file
Text-copy-source-md5: d41d8cd98f00b204e9800998ecf8427e
This case may not be the simplest - I've not tried doing a single commit
that doesn't have the delete in it - ie a copy of an empty directory
from a historical revision, and a copy of a file into it from a
historical revision. But this case is pretty small :-)
I wouldn't know where to start to try to fix this. Right now I've fallen
back to trying git svn, but it's slow and I don't know if it's going to
do a good enough job.
Subject: | t.dump1 |
Message body not shown because it is not plain text.