With my fixes to the multiple MOVE matches (attached), I'm now at:
* 3 files too old (due to delete - ticket 34)
* 8 files too new (due to branched rollback?)
* 12 files missing (to be investigated)
As far as I understand, it is possible to trim off some versions of a
file when using share and rollback. I'm not 100% sure if that is how it
was done, but the trace looks as follows (four last lines are the
important):
$ sqlite ~/hdf1/tmp/_vss2svn/vss_data.db "select * from PhysicalAction
where physname = 'IGBAAAAA' or physname = 'FPEAAAAA' order by timestamp;"
90842|IGBAAAAA|1|HGBAAAAA|ADD|OO.doc|2|1018015283|U1|1||1|AAAAABGI|1||
Create
18055|IGBAAAAA|2||COMMIT||2|1018028866|U1|1||5|AAAAABGI|0||Temp. checkin
18056|IGBAAAAA|3||COMMIT||2|1018880855|U1|1||5|AAAAABGI|0||Temp. checkin
18057|IGBAAAAA|4||COMMIT||2|1018895581|U1|1||5|AAAAABGI|0||temp
18058|IGBAAAAA|5||COMMIT||2|1018905700|U2|1||5|AAAAABGI|0||
18059|IGBAAAAA|6||COMMIT||2|1018955230|U2|1||5|AAAAABGI|0||
90858|IGBAAAAA||HGBAAAAA|RENAME|OO.doc|2|1018957922|U1|0|O.doc|5|AAAAABGI|1||
18060|IGBAAAAA|7||COMMIT||2|1018964688|U1|1||5|AAAAABGI|0||
18061|IGBAAAAA|8||COMMIT||2|1019149266|U1|1||5|AAAAABGI|0||
18062|IGBAAAAA|9||COMMIT||2|1019237770|U1|1||5|AAAAABGI|0||
18063|IGBAAAAA|10||COMMIT||2|1019574955|U1|1||5|AAAAABGI|0||More written
18064|IGBAAAAA|11||COMMIT||2|1019819568|U1|1||5|AAAAABGI|0||Corrections
after review
18065|IGBAAAAA|12||COMMIT||2|1021572525|U1|1||5|AAAAABGI|0||Minor close
unsaved case handling modified.
18066|IGBAAAAA|13||COMMIT||2|1021997092|U3|1||5|AAAAABGI|0||New version
of Create
18067|IGBAAAAA|14||COMMIT||2|1022079389|U1|1||5|AAAAABGI|0||P01093/ Lock
workstation replaced
18068|IGBAAAAA|15||COMMIT||2|1034849056|U3|1||5|AAAAABGI|0||V1.2 updates
18069|IGBAAAAA|16||COMMIT||2|1034851216|U3|1||5|AAAAABGI|0||
10113|IGBAAAAA||DPEAAAAA|SHARE|O.doc|2|1034852032|U3|0||2|AAAAABGI|1||
90889|IGBAAAAA||HGBAAAAA|DELETE|O.doc|2|1034852622|U3|0||5|AAAAABGI|1||
10114|FPEAAAAA|15|DPEAAAAA|BRANCH|O.doc|2|1034856376|Admin|1|IGBAAAAA|3|AAAAAEPF|1||
Last branch is made directly to version 15. The ssphys output:
../ssphys/ssphys info /home/micke/OTP14Src/data/f/fpeaaaaa
<?xml version="1.0" encoding="windows-1252" ?>
<File Name="/home/micke/Orc/data/f/fpeaaaaa">
<ItemInfo offset="52">
<SSName offset="42020" type="file">O.doc</SSName>
<NumberOfActions>15</NumberOfActions>
<LatestExt>.A</LatestExt>
<DataFileName>/home/micke/OSrc/data/f/fpeaaaaa.a</DataFileName>
<Type>2</Type>
<NumberOfBranches>0</NumberOfBranches>
<NumberOfReferences>1</NumberOfReferences>
<ShareSrc>IGBAAAAA</ShareSrc>
<Shared>0</Shared>
<CheckedOut>0</CheckedOut>
<StoreOnlyLatestRev>0</StoreOnlyLatestRev>
<Binary>1</Binary>
<Locked>0</Locked>
<Flags>0x2</Flags>
</ItemInfo>
<CheckOut offset="416">
<Comment></Comment>
<ParentSpec></ParentSpec>
<Computer></Computer>
<Folder></Folder>
<User></User>
</CheckOut>
<ParentFolder offset="1092">
<ParentPhys>DPEAAAAA</ParentPhys>
<PreviousOffset>0</PreviousOffset>
</ParentFolder>
<Version offset="1116">
<Action ActionId="RollBack">
<SSName offset="42020" type="file">O.doc</SSName>
<Physical>FPEAAAAA</Physical>
<Parent>IGBAAAAA</Parent>
</Action>
<Date>1034856372</Date>
<UserName>Admin</UserName>
<VersionNumber>15</VersionNumber>
</Version>
<Comment offset="1528"></Comment>
</File>
How does one go about to dig up an ancient version of a file in the
branch handler ?
Index: vss2svn.pl
===================================================================
--- vss2svn.pl (revision 265)
+++ vss2svn.pl (working copy)
@@ -550,13 +550,13 @@
AND (ABS(? - timestamp) < 21600)
AND author = ?
ORDER BY
- timestamp
+ ABS(? - timestamp)
EOSQL
# timestamp test is within 21600 seconds equals 6 hours (allows for
# really bad Windows clocks, timezones, and WAN delays)
my $sth = $gCfg{dbh}->prepare($sql);
- $sth->execute( $parentdata, @{ $parentrec }{qw(physname actiontype
timestamp author)} );
+ $sth->execute( $parentdata, @{ $parentrec }{qw(physname actiontype
timestamp author timestamp)} );
return $sth->fetchall_arrayref( {} );
} # End GetChildRecs
@@ -612,26 +612,23 @@
# need to pull in all recs at once, since we'll be updating/deleting data
$rows = $sth->fetchall_arrayref( {} );
- my($childrecs, $child, $id);
+ my($childrecs, $id);
my @delchild = ();
foreach $row (@$rows) {
$row->{actiontype} = 'MOVE';
$childrecs = &GetChildRecs($row, 1);
- if (scalar @$childrecs > 1) {
- &ThrowWarning("Multiple chidl recs for parent MOVE rec "
- . "'$row->{action_id}'");
+ if (scalar @$childrecs >= 1) {
+ my $update;
+ my $child = @$childrecs[0];
+ $update = $gCfg{dbh}->prepare('UPDATE PhysicalAction SET info = ?'
+ . 'WHERE action_id = ?');
+ $update->execute( $row->{parentphys}, $child->{action_id} );
+ print "Multiple child recs for parent MOVE rec "
+ . "'$row->{action_id}'\n" if $gCfg{debug};
}
- foreach $child (@$childrecs) {
- my $update;
- $update = $gCfg{dbh}->prepare('UPDATE PhysicalAction SET info = ?'
- . 'WHERE action_id = ?');
-
- $update->execute( $row->{parentphys}, $child->{action_id} );
- }
-
if (scalar @$childrecs == 0) {
my $sql = <<"EOSQL";
UPDATE
_______________________________________________
vss2svn-users mailing list
Project homepage:
http://www.pumacode.org/projects/vss2svn/
Subscribe/Unsubscribe/Admin:
http://lists.pumacode.org/mailman/listinfo/vss2svn-users-lists.pumacode.org
Mailing list web interface (with searchable archives):
http://dir.gmane.org/gmane.comp.version-control.subversion.vss2svn.user