summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2c475d)
raw | patch | inline | side by side (parent: e2c475d)
author | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 10:21:59 +0000 (02:21 -0800) | ||
committer | Eric Wong <normalperson@yhbt.net> | |
Fri, 23 Feb 2007 10:21:59 +0000 (02:21 -0800) |
When using do_switch:
We only need to ensure the index is clean and set to that of the
parent tree) we rely on being able to reconstruct full files
with deltas transferred over the network.
When using do_update:
We may safely unlink the index if we are fetching an entire
new tree with do_update. Having an old index (from a
previously deleted/abandoned directory) around can cause
irrelevant files to be mistakenly kept.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
We only need to ensure the index is clean and set to that of the
parent tree) we rely on being able to reconstruct full files
with deltas transferred over the network.
When using do_update:
We may safely unlink the index if we are fetching an entire
new tree with do_update. Having an old index (from a
previously deleted/abandoned directory) around can cause
irrelevant files to be mistakenly kept.
Signed-off-by: Eric Wong <normalperson@yhbt.net>
git-svn.perl | patch | blob | history |
diff --git a/git-svn.perl b/git-svn.perl
index 2bd70a15779c3288d52bcb401bb0c91f46fbbfde..41961b59f6d7848efbb4e7b91dcb629bbd7d4abb 100755 (executable)
--- a/git-svn.perl
+++ b/git-svn.perl
}
if (defined $r0 && defined $parent) {
print STDERR "Found branch parent: ($self->{ref_id}) $parent\n";
- $self->assert_index_clean($parent);
my $ed;
if ($self->ra->can_do_switch) {
+ $self->assert_index_clean($parent);
print STDERR "Following parent with do_switch\n";
# do_switch works with svn/trunk >= r22312, but that
# is not included with SVN 1.4.3 (the latest version
my $new = ($rev_a == $rev_b);
my $path = $gs->{path};
+ if ($new && -e $gs->{index}) {
+ unlink $gs->{index} or die
+ "Couldn't unlink index: $gs->{index}: $!\n";
+ }
my $pool = SVN::Pool->new;
$editor->set_path_strip($path);
my (@pc) = split m#/#, $path;