git-svn: correctly track diff-less copies with do_switch
Also, this should allow for the tracking of new, but empty directories where we would want to see the log message. Signed-off-by: Eric Wong <normalperson@yhbt.net>
Eric Wong committed
Jan 28, 2007 at 04:02 UTC
2fa6a23efb200cea814add88ce1d1d193ba83860
1 file changed
+3
-1
git-svn.perl
+3
-1
@@ -1167,6 +1167,7 @@ sub find_parent_branch {
1167
1, $ed)
1168
or die "SVN connection failed somewhere...\n";
1169
}
1170
+ $ed->{new_fetch} = 1;
1171
return $self->make_log_entry($rev, [$parent], $ed);
1172
}
1173
not_found:
@@ -1202,6 +1203,7 @@ sub do_fetch {
1203
return $log_entry;
1204
}
1205
$ed = SVN::Git::Fetcher->new($self);
1206
+ $ed->{new_fetch} = 1;
1207
}
1208
unless ($self->ra->gs_do_update($last_rev, $rev,
1209
$self->{path}, 1, $ed)) {
@@ -1275,7 +1277,7 @@ sub make_log_entry {
1277
my ($self, $rev, $parents, $ed) = @_;
1278
my $untracked = $self->get_untracked($ed);
1279
1278
- return undef if ($ed->{nr} == 0 && scalar @$untracked == 0);
1280
+ return undef if (! $ed->{new_fetch} && ! $ed->{nr} && ! @$untracked);
1281
1282
open my $un, '>>', "$self->{dir}/unhandled.log" or croak $!;
1283
print $un "r$rev\n" or croak $!;