Rework cvsexportcommit to handle binary files for all cases.
PATCH 1/1 Rework cvsexportcommit to handle binary files for all cases.
Now adding, removing and changing binary files works. I added test cases to make sure it works and can be verified by others. Som other corner cases were resolved too.
---
git-cvsexportcommit.perl +47 -16
@@ -139,6 +139,17 @@ foreach my $f (@files) { push @dfiles, $fields[5]; } } +my (@binfiles, @abfiles, @dbfiles, @bfiles, @mbfiles); +@binfiles = grep m/^Binary files/, safe_pipe_capture('git-diff-tree', '-p', $parent, $commit); +map { chomp } @binfiles; +@abfiles = grep s/^Binary files \/dev\/null and b\/(.*) differ$/$1/, @binfiles; +@dbfiles = grep s/^Binary files a\/(.*) and \/dev\/null differ$/$1/, @binfiles; +@mbfiles = grep s/^Binary files a\/(.*) and b\/(.*) differ$/$1/, @binfiles; +push @bfiles, @abfiles; +push @bfiles, @dbfiles; +push @bfiles, @mbfiles; +push @mfiles, @mbfiles; + $opt_v && print "The commit affects:\n "; $opt_v && print join ("\n ", @afiles,@mfiles,@dfiles) . "\n\n"; undef @files; # don't need it anymore
@@ -153,6 +164,10 @@ foreach my $d (@dirs) { } foreach my $f (@afiles) { # This should return only one value + if ($f =~ m,(.*)/[^/]*$,) { + my $p="m,^".$1."\$,"; + next if grep $p,@dirs; + } my @status = grep(m/^File/, safe_pipe_capture('cvs', '-q', 'status' ,$f)); if (@status > 1) { warn 'Strange! cvs status returned more than one line?'}; if (-d dirname $f and $status[0] !~ m/Status: Unknown$/
@@ -162,6 +177,7 @@ foreach my $f (@afiles) { warn "Status was: $status[0]\n"; } } + foreach my $f (@mfiles, @dfiles) { # TODO:we need to handle removed in cvs my @status = grep(m/^File/, safe_pipe_capture('cvs', '-q', 'status' ,$f));
@@ -200,24 +216,32 @@ foreach my $d (@dirs) { print "'Patching' binary files\n"; -my @bfiles = grep(m/^Binary/, safe_pipe_capture('git-diff-tree', '-p', $parent, $commit)); -@bfiles = map { chomp } @bfiles; foreach my $f (@bfiles) { # check that the file in cvs matches the "old" file # extract the file to $tmpdir and compare with cmp - my $tree = safe_pipe_capture('git-rev-parse', "$parent^{tree}"); - chomp $tree; - my $blob = `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`; - chomp $blob; - `git-cat-file blob $blob > $tmpdir/blob`; - if (system('cmp', '-s', $f, "$tmpdir/blob")) { - warn "Binary file $f in CVS does not match parent.\n"; - $dirty = 1; - next; + my $p="m/^$f$/"; + if (not(grep $p,@afiles)) { + my $tree = safe_pipe_capture('git-rev-parse', "$parent^{tree}"); + chomp $tree; + my $blob = `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`; + chomp $blob; + `git-cat-file blob $blob > $tmpdir/blob`; + if (system('cmp', '-s', $f, "$tmpdir/blob")) { + warn "Binary file $f in CVS does not match parent.\n"; + if (not $opt_f) { + $dirty = 1; + next; + } + } + } + if (not(grep m/^$f$/,@dfiles)) { + my $tree = safe_pipe_capture('git-rev-parse', "$commit^{tree}"); + chomp $tree; + my $blob = `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`; + chomp $blob; + # replace with the new file + `git-cat-file blob $blob > $f`; } - - # replace with the new file - `git-cat-file blob $blob > $f`; # TODO: something smart with file modes
@@ -231,7 +255,10 @@ ## apply non-binary changes my $fuzz = $opt_p ? 0 : 2; print "Patching non-binary files\n"; -print `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2>&1`; + +if (scalar(@afiles)+scalar(@dfiles)+scalar(@mfiles) ne scalar(@bfiles)) { + print `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2>&1`; +} my $dirtypatch = 0; if (($? >> 8) == 2) {
@@ -242,7 +269,11 @@ if (($? >> 8) == 2) { } foreach my $f (@afiles) { - system('cvs', 'add', $f); + if (grep /^$f$/,@bfiles) { + system('cvs', 'add','-kb',$f); + } else { + system('cvs', 'add', $f); + } if ($?) { $dirty = 1; warn "Failed to cvs add $f -- you may need to do it manually";
t/t9200-git-cvsexportcommit.sh new file +145 -0
145 lines not on this page · raw message
t/test9200a.png new file binary +0 -0
t/test9200b.png new file binary +0 -0
Signature · 1 line
1.4.2
Quoted 5 lines · Robin Rosenberg
Now adding, removing and changing binary files works. I added test cases to make sure qit works and can be verified by others. Som other corner cases were resolved too.
Signed-off-by Robin Rosenberg <[email protected]>
Thanks.
It is necessary to clarify what these other corner cases are in the commit log message. Three months down the road you yourself would not remember what they were.
You seem to like:
my $p = "m,^$pathname\$,";
if (grep $p,@array) { do this... }but this is a bad habit. $pathname can contain regexp metacharacters or a comma. You should just say:
if (grep { $_ eq $pathname } @arrray) { do this... }instead. I'd fix them up with the attached patch.
It would also be nice to rework this program so that it can work with whitespaces in pathnames. I do not think it currently works with them at all.
It appears that this program was never used in western hemisphere, by the way ;-).
---
git-cvsexportcommit.perl +9 -10
@@ -1,10 +1,10 @@ #!/usr/bin/perl -w # Known limitations: -# - cannot add or remove binary files # - does not propagate permissions # - tells "ready for commit" even when things could not be completed # (eg addition of a binary file) +# - does not handle whitespace in pathnames at all. use strict; use Getopt::Std;
@@ -68,9 +68,9 @@ foreach my $line (@commit) { if ($stage eq 'headers') { if ($line =~ m/^parent (\w{40})$/) { # found a parent push @parents, $1; - } elsif ($line =~ m/^author (.+) \d+ \+\d+$/) { + } elsif ($line =~ m/^author (.+) \d+ [-+]\d+$/) { $author = $1; - } elsif ($line =~ m/^committer (.+) \d+ \+\d+$/) { + } elsif ($line =~ m/^committer (.+) \d+ [-+]\d+$/) { $committer = $1; } } else {
@@ -165,8 +165,8 @@ foreach my $d (@dirs) { foreach my $f (@afiles) { # This should return only one value if ($f =~ m,(.*)/[^/]*$,) { - my $p="m,^".$1."\$,"; - next if grep $p,@dirs; + my $p = $1; + next if (grep { $_ eq $p } @dirs); } my @status = grep(m/^File/, safe_pipe_capture('cvs', '-q', 'status' ,$f)); if (@status > 1) { warn 'Strange! cvs status returned more than one line?'};
@@ -219,8 +219,7 @@ print "'Patching' binary files\n"; foreach my $f (@bfiles) { # check that the file in cvs matches the "old" file # extract the file to $tmpdir and compare with cmp - my $p="m/^$f$/"; - if (not(grep $p,@afiles)) { + if (not(grep { $_ eq $f } @afiles)) { my $tree = safe_pipe_capture('git-rev-parse', "$parent^{tree}"); chomp $tree; my $blob = `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`;
@@ -234,7 +233,7 @@ foreach my $f (@bfiles) { } } } - if (not(grep m/^$f$/,@dfiles)) { + if (not(grep { $_ eq $f } @dfiles)) { my $tree = safe_pipe_capture('git-rev-parse', "$commit^{tree}"); chomp $tree; my $blob = `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`;
@@ -256,7 +255,7 @@ my $fuzz = $opt_p ? 0 : 2; print "Patching non-binary files\n"; -if (scalar(@afiles)+scalar(@dfiles)+scalar(@mfiles) ne scalar(@bfiles)) { +if (scalar(@afiles)+scalar(@dfiles)+scalar(@mfiles) != scalar(@bfiles)) { print `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2>&1`; }
@@ -269,7 +268,7 @@ if (($? >> 8) == 2) { } foreach my $f (@afiles) { - if (grep /^$f$/,@bfiles) { + if (grep { $_ eq $f } @bfiles) { system('cvs', 'add','-kb',$f); } else { system('cvs', 'add', $f);
And the updated fix for spaces in file names
-- robin
=46rom bf4030e88bfd5b5f1a84b19a1be36f8178f2b24a Mon Sep 17 00:00:00 2001 =46rom: Robin Rosenberg <[email protected]>
Date: Mon, 13 Nov 2006 21:29:06 +0100
Subject: [PATCH] Make cvsexportcommit work with filenames containing spaces.
Binary files are except to this so far.
git-cvsexportcommit.perl +0 -0
8f0bff6ae46de 100755
=2D-- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -4,7 +4,7 @@ # Known limitations:
# - does not propagate permissions
# - tells "ready for commit" even when things could not be completed
# (not sure this is true anymore, maybe more testing is needed)
=2D# - does not handle whitespace in pathnames at all.
+# - Fedora/RHEL uses patch 2.5.4 which doesn't handles spaces in file names =20
use strict;
use Getopt::Std;
@@ -121,7 +121,14 @@ #print @files;
$? && die "Error in git-diff-tree";
foreach my $f (@files) {
chomp $f;
=2D my @fields =3D split(m!\s+!, $f);
+ $f =3D~ m/^(\S+) (\S+) (\S+) (\S+) (\S+) (.*)/;
+ my @fields =3D ();
+ $fields[++$#fields] =3D $1;
+ $fields[++$#fields] =3D $2;
+ $fields[++$#fields] =3D $3;
+ $fields[++$#fields] =3D $4;
+ $fields[++$#fields] =3D $5;
+ $fields[++$#fields] =3D $6;
if ($fields[4] eq 'A') {
my $path =3D $fields[5]; push @afiles, $path;
@@ -256,7 +263,19 @@ my $fuzz =3D $opt_p ? 0 : 2;
print "Patching non-binary files\n";
=20
if (scalar(@afiles)+scalar(@dfiles)+scalar(@mfiles) !=3D scalar(@bfiles)) {
=2D print `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2=
Quoted 1 line
&1`;
+ my $saveslash =3D $/;
+ undef $/;
+
+ open DIFF, "git-diff-tree -p $parent -p $commit|" || die "Cannot diff";
+ open PATCH, "|tee \$\$.diff|patch -p1 -F $fuzz" || die "Cannot patch";
+ my $delta =3D <DIFF>;
+ close DIFF || die "Could not diff";
+ unless (defined $ENV{'GIT_CVSEXPORTCOMMIT_NO_SPACES'}) {
+ $delta =3D~ s/\n(index [^\n]*)\n(--- [^\n]*)\n(\+\+\+ [^\n]*)\n(@@=
[^\n]*@@)\n/$1\n$2\t\n$3\t\n$4\n/sg
+ }
+ print PATCH $delta;
+ close PATCH || die "Could not patch";
+ $/ =3D $saveslash; }
=20
my $dirtypatch =3D 0;
t/t9200-git-cvsexportcommit.sh +0 -0
9df1784a48ae8 100755
=2D-- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -142,4 +142,28 @@ test_expect_success \
diff F/newfile6.png ../F/newfile6.png
)'=20
=20
+test_expect_success \
+ 'New file with spaces in file name' \
+ 'mkdir G &&
+ echo ok then >"G/with spaces.txt" && + git add "G/with spaces.txt" && \ + git commit -a -m "With spaces" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git-cvsexportcommit -c $id && + test $(cat G/CVS/Entries|wc -l) =3D 1 + )'
+
+test_expect_success \
+ 'Update file with spaces in file name' \
+ 'echo Ok then >>"G/with spaces.txt" &&
+ git add "G/with spaces.txt" && + git commit -a -m "Update with spaces" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git-cvsexportcommit -c $id && + test $(cat G/CVS/Entries|wc -l) =3D 1 + )'
+ =20
+
test_done
=2D-=20
1.4.2
måndag 13 november 2006 05:39 skrev Junio C Hamano:
Quoted 5 lines
Quoted 4 lines · Robin Rosenberg
Now adding, removing and changing binary files works. I added test cases to make sure qit works and can be verified by others. Som other corner cases were resolved too.
Quoted 7 lines
Quoted 1 line
Signed-off-by Robin Rosenberg <[email protected]>Thanks.
It is necessary to clarify what these other corner cases are in the commit log message. Three months down the road you yourself would not remember what they were.
I hardly remember now. I wrote test cases and modified the code until it worked. I'll skip that remark.
Quoted 6 lines
You seem to like:
my $p = "m,^$pathname\$,"; if (grep $p,@array) { do this... }
I can't say I'm fond of any perl syntax, really. Perl is a very usable, but ugly tool.
Quoted 6 lines
but this is a bad habit. $pathname can contain regexp metacharacters or a comma. You should just say:
if (grep { $_ eq $pathname } @arrray) { do this... }instead. I'd fix them up with the attached patch.
Thanks.
Quoted 3 lines
It would also be nice to rework this program so that it can work with whitespaces in pathnames. I do not think it currently works with them at all.
I sent a patch earlier, which was not applied, due to imperfections that I cannot solve fully. One issue was that patch 2.5.9 was required and hacking it to handle binary diffs with spaces would require and even worse kludge,
I can, however, send the previous patch adapted onto this one.
Quoted 2 lines
It appears that this program was never used in western hemisphere, by the way ;-).
Now, Sweden is definitely in the northern hemisphere, even during the cold war, though a number of computer games colored it red (or was it only Finland) during the cold war.
The tests work with my locale (swedish ISO-8859-15), even though they like all other tests run in the C "hemishpere" by default. AFAIK, git isn't very user friendly with non-ascii filenames as it is today and cvsexportcommit didn't work on such files before, and it doesn't now. No change there.
Another patch, another day, maybe.
-- robin
=46rom b591652ab3a65d3e319cbf59bcd161e3588a4696 Mon Sep 17 00:00:00 2001 =46rom: Robin Rosenberg <[email protected]>
Date: Mon, 13 Nov 2006 21:29:01 +0100
Subject: [PATCH] Rework cvsexportcommit to handle binary files for all case= s.
Also adds test cases for adding removing and deleting binary and text files plus two tests for the checks on binary files.
git-cvsexportcommit.perl +0 -0
5e8111a7a973c 100755
=2D-- a/git-cvsexportcommit.perl
+++ b/git-cvsexportcommit.perl
@@ -1,10 +1,10 @@
#!/usr/bin/perl -w
=20
# Known limitations:
=2D# - cannot add or remove binary files
# - does not propagate permissions
# - tells "ready for commit" even when things could not be completed
=2D# (eg addition of a binary file)
+# (not sure this is true anymore, maybe more testing is needed)
+# - does not handle whitespace in pathnames at all.
=20
use strict;
use Getopt::Std;
@@ -139,6 +139,17 @@ foreach my $f (@files) {
push @dfiles, $fields[5];
} }
+my (@binfiles, @abfiles, @dbfiles, @bfiles, @mbfiles); +@binfiles =3D grep m/^Binary files/, safe_pipe_capture('git-diff-tree', '-= p', $parent, $commit);
+map { chomp } @binfiles;
+@abfiles =3D grep s/^Binary files \/dev\/null and b\/(.*) differ$/$1/, @bi= nfiles;
+@dbfiles =3D grep s/^Binary files a\/(.*) and \/dev\/null differ$/$1/, @bi= nfiles;
+@mbfiles =3D grep s/^Binary files a\/(.*) and b\/(.*) differ$/$1/, @binfil= es;
+push @bfiles, @abfiles;
+push @bfiles, @dbfiles;
+push @bfiles, @mbfiles;
+push @mfiles, @mbfiles;
+
$opt_v && print "The commit affects:\n ";
$opt_v && print join ("\n ", @afiles,@mfiles,@dfiles) . "\n\n"; undef @files; # don't need it anymore
@@ -153,6 +164,10 @@ foreach my $d (@dirs) {
}
foreach my $f (@afiles) {
# This should return only one value
+ if ($f =3D~ m,(.*)/[^/]*$,) {
+ my $p =3D $1;
+ next if (grep { $_ eq $p } @dirs);
+ }
my @status =3D grep(m/^File/, safe_pipe_capture('cvs', '-q', 'status'= ,$f));
if (@status > 1) { warn 'Strange! cvs status returned more than one li=
ne?'};
if (-d dirname $f and $status[0] !~ m/Status: Unknown$/
@@ -162,6 +177,7 @@ foreach my $f (@afiles) {
warn "Status was: $status[0]\n";
} }
+
foreach my $f (@mfiles, @dfiles) {
# TODO:we need to handle removed in cvs
my @status =3D grep(m/^File/, safe_pipe_capture('cvs', '-q', 'status'=
,$f));
@@ -200,24 +216,31 @@ foreach my $d (@dirs) {
=20
print "'Patching' binary files\n";
=20
=2Dmy @bfiles =3D grep(m/^Binary/, safe_pipe_capture('git-diff-tree', '-p',=
$parent, $commit));
=2D@bfiles =3D map { chomp } @bfiles;
foreach my $f (@bfiles) {
# check that the file in cvs matches the "old" file
# extract the file to $tmpdir and compare with cmp
=2D my $tree =3D safe_pipe_capture('git-rev-parse', "$parent^{tree}");
=2D chomp $tree;
=2D my $blob =3D `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`;
=2D chomp $blob;
=2D `git-cat-file blob $blob > $tmpdir/blob`;
=2D if (system('cmp', '-s', $f, "$tmpdir/blob")) {
=2D warn "Binary file $f in CVS does not match parent.\n";
=2D $dirty =3D 1;
=2D next;
+ if (not(grep { $_ eq $f } @afiles)) {
+ my $tree =3D safe_pipe_capture('git-rev-parse', "$parent^{tree}");
+ chomp $tree;
+ my $blob =3D `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`;
+ chomp $blob;
+ `git-cat-file blob $blob > $tmpdir/blob`;
+ if (system('cmp', '-s', $f, "$tmpdir/blob")) {
+ warn "Binary file $f in CVS does not match parent.\n";
+ if (not $opt_f) {
+ $dirty =3D 1;
+ next;
+ }
+ }
+ }
+ if (not(grep { $_ eq $f } @dfiles)) {
+ my $tree =3D safe_pipe_capture('git-rev-parse', "$commit^{tree}");
+ chomp $tree;
+ my $blob =3D `git-ls-tree $tree "$f" | cut -f 1 | cut -d ' ' -f 3`;
+ chomp $blob;
+ # replace with the new file
+ `git-cat-file blob $blob > $f`;
}
=2D
=2D # replace with the new file
=2D `git-cat-file blob $blob > $f`;
=20
# TODO: something smart with file modes
=20
@@ -231,7 +254,10 @@ ## apply non-binary changes
my $fuzz =3D $opt_p ? 0 : 2;
=20
print "Patching non-binary files\n";
=2Dprint `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2>&1`;
+
+if (scalar(@afiles)+scalar(@dfiles)+scalar(@mfiles) !=3D scalar(@bfiles)) {
+ print `(git-diff-tree -p $parent -p $commit | patch -p1 -F $fuzz ) 2>&=
1`;
+}
=20
my $dirtypatch =3D 0;
if (($? >> 8) =3D=3D 2) {
@@ -242,7 +268,11 @@ if (($? >> 8) =3D=3D 2) {
}
=20
foreach my $f (@afiles) {
=2D system('cvs', 'add', $f);
+ if (grep { $_ eq $f } @bfiles) {
+ system('cvs', 'add','-kb',$f);
+ } else {
+ system('cvs', 'add', $f);
+ }
if ($?) {
$dirty =3D 1;
warn "Failed to cvs add $f -- you may need to do it manually";t/t9200-git-cvsexportcommit.sh new file +0 -0
87a89fe8a496e
=2D-- /dev/null
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -0,0 +1,145 @@
+#!/bin/bash
+#
+# Copyright (c) Robin Rosenberg
+#
+test_description=3D'CVS export comit. '
+
+. ./test-lib.sh
+
+cvs >/dev/null 2>&1
+if test $? -ne 1
+then
+ test_expect_success 'skipping git-cvsexportcommit tests, cvs not found=
' :
+ test_done
+ exit
+fi
+
+export CVSROOT=3D$(pwd)/cvsroot
+export CVSWORK=3D$(pwd)/cvswork
+rm -rf "$CVSROOT" "$CVSWORK"
+mkdir "$CVSROOT" &&
+cvs init &&
+cvs -Q co -d "$CVSWORK" . &&
+export GIT_DIR=3D$(pwd)/.git &&
+echo >empty &&
+git add empty &&
+git commit -a -m "Initial" 2>/dev/null ||
+exit 1
+
+test_expect_success \
+ 'New file' \
+ 'mkdir A B C D E F &&
+ echo hello1 >A/newfile1.txt && + echo hello2 >B/newfile2.txt && + cp ../test9200a.png C/newfile3.png && + cp ../test9200a.png D/newfile4.png && + git add A/newfile1.txt && + git add B/newfile2.txt && + git add C/newfile3.png && + git add D/newfile4.png && + git commit -a -m "Test: New file" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git cvsexportcommit -c $id && + test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile1.tx=
t/1.1/" &&
+ test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile2.tx=
t/1.1/" &&
+ test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile3.pn=
g/1.1/-kb" &&
+ test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile4.pn=
g/1.1/-kb" &&
+ diff A/newfile1.txt ../A/newfile1.txt && + diff B/newfile2.txt ../B/newfile2.txt && + diff C/newfile3.png ../C/newfile3.png && + diff D/newfile4.png ../D/newfile4.png + )'
+
+test_expect_success \
+ 'Remove two files, add two and update two' \
+ 'echo Hello1 >>A/newfile1.txt &&
+ rm -f B/newfile2.txt && + rm -f C/newfile3.png && + echo Hello5 >E/newfile5.txt && + cp ../test9200b.png D/newfile4.png && + cp ../test9200a.png F/newfile6.png && + git add E/newfile5.txt && + git add F/newfile6.png && + git commit -a -m "Test: Remove, add and update" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git cvsexportcommit -c $id && + test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile1.tx= t/1.2/" && + test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile4.pn=
g/1.2/-kb" &&
+ test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile5.tx=
t/1.1/" &&
+ test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile6.pn=
g/1.1/-kb" &&
+ diff A/newfile1.txt ../A/newfile1.txt && + diff D/newfile4.png ../D/newfile4.png && + diff E/newfile5.txt ../E/newfile5.txt && + diff F/newfile6.png ../F/newfile6.png + )'
+
+# Should fail (but only on the git-cvsexportcommit stage) +test_expect_success \
+ 'Fail to change binary more than one generation old' \
+ 'cat F/newfile6.png >>D/newfile4.png &&
+ git commit -a -m "generatiion 1" && + cat F/newfile6.png >>D/newfile4.png && + git commit -a -m "generation 2" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + ! git cvsexportcommit -c $id + )'
+
+# Should fail, but only on the git-cvsexportcommit stage +test_expect_success \
+ 'Fail to remove binary file more than one generation old' \
+ 'git reset --hard HEAD^ &&
+ cat F/newfile6.png >>D/newfile4.png && + git commit -a -m "generation 2 (again)" && + rm -f D/newfile4.png && + git commit -a -m "generation 3" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + ! git cvsexportcommit -c $id + )'
+
+# We reuse the state from two tests back here
+
+# This test is here because a patch for only binary files will +# fail with gnu patch, so cvsexportcommit must handle that. +test_expect_success \
+ 'Remove only binary files' \
+ 'git reset --hard HEAD^^^ &&
+ rm -f D/newfile4.png && + git commit -a -m "test: remove only a binary file" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git cvsexportcommit -c $id && + test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile1.tx= t/1.2/" && + test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile5.tx= t/1.1/" && + test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile6.pn= g/1.1/-kb" && + diff A/newfile1.txt ../A/newfile1.txt && + diff E/newfile5.txt ../E/newfile5.txt && + diff F/newfile6.png ../F/newfile6.png + )'
+
+test_expect_success \
+ 'Remove only a text file' \
+ 'rm -f A/newfile1.txt &&
+ git commit -a -m "test: remove only a binary file" && + id=3D$(git rev-list --max-count=3D1 HEAD) && + (cd "$CVSWORK" && + git cvsexportcommit -c $id && + test "$(echo $(sort A/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort B/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort C/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort D/CVS/Entries|cut -d/ -f2,3,5))" =3D "" && + test "$(echo $(sort E/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile5.tx= t/1.1/" && + test "$(echo $(sort F/CVS/Entries|cut -d/ -f2,3,5))" =3D "newfile6.pn= g/1.1/-kb" && + diff E/newfile5.txt ../E/newfile5.txt && + diff F/newfile6.png ../F/newfile6.png + )'=20
+
+test_done
t/test9200a.png new file +0 -0
f30ce2223b4c5
GIT binary patch
literal 5660 zc$Id1yoe;^Zo)$N(e0J(p}QEfPi$DQW8>2hjdCvBQ2c^N=3DU=3DfEQ%l<OE*Zj)FMj$ z_VYjAbN=3D_7_s)Cf+&g#PnP=3Dv?6Q@KLPS7I0001p)KnGq(GvdO!oxw|WyWxX&;rL=3D zLq!o#3}6JD5q?UcKx^<lR8719fafg#Ee!uJvc6~~uD6<&67C!}76@A+ze^|xt)lZ* zGWJ$*cXhRM^9Cq*+F5zq*)sY$dOI+_a<F4mQPa{rwPkYy04T!L6y;y}FP#*)x19U z4?K2;EPnZ}m4_D*|7mH8Eb&57u38Jik~sH^?kl_U(~Q48dvnsHNa~{}zdt5Nt}*E5 zikv5GD3NPue*dxh7fvl7%RR~(J)J59p_3~+O<^D1-DxcdEsKe+S1fy4;}Avtqaw! zJo)YY2lCCU;K*zbVvpIWj!VXv>ZvF%gb^3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xTAF7fm=3DY}A_nHk3XTg7IPfqqTq@aCrp)Sh2xvKj Mr>mdKI;Vst05+voj{pDw
=2D-=20
1.4.2
Quoted 7 lines · Robin Rosenberg
Quoted 3 lines
It would also be nice to rework this program so that it can work with whitespaces in pathnames. I do not think it currently works with them at all.
I sent a patch earlier, which was not applied, due to imperfections that I cannot solve fully. One issue was that patch 2.5.9 was required and hacking it to handle binary diffs with spaces would require and even worse kludge,
I suspect that we should not be using patch, but instead be using git-apply perhaps with -C option if people want fuzz.
Quoted 6 lines
Quoted 2 lines
It appears that this program was never used in western hemisphere, by the way ;-).
Now, Sweden is definitely in the northern hemisphere, even during the cold war, though a number of computer games colored it red (or was it only Finland) during the cold war.
I know this script originally came from southern hemisphere, but I was talking about _western_ hemisphere. The comment refers to the part of the code the attached patch fixes, which I will apply along with your updated patch.
Quoted 4 lines
The tests work with my locale (swedish ISO-8859-15), even though they like all other tests run in the C "hemishpere" by default. AFAIK, git isn't very user friendly with non-ascii filenames as it is today and cvsexportcommit didn't work on such files before, and it doesn't now. No change there.
That is a separate issue. I think scripts that work with git plumbing should read from -z output when they need to and are capable of, as we have done for git-cvsserver recently, and things written in Perl certainly are capable of doing so.
git-cvsexportcommit.perl +2 -2
@@ -68,9 +68,9 @@ foreach my $line (@commit) { if ($stage eq 'headers') { if ($line =~ m/^parent (\w{40})$/) { # found a parent push @parents, $1; - } elsif ($line =~ m/^author (.+) \d+ \+\d+$/) { + } elsif ($line =~ m/^author (.+) \d+ [-+]\d+$/) { $author = $1; - } elsif ($line =~ m/^committer (.+) \d+ \+\d+$/) { + } elsif ($line =~ m/^committer (.+) \d+ [-+]\d+$/) { $committer = $1; } } else {
tisdag 14 november 2006 01:47 skrev Junio C Hamano:
Quoted 7 lines
Quoted 3 lines · Robin Rosenberg
I sent a patch earlier, which was not applied, due to imperfections that I cannot solve fully. One issue was that patch 2.5.9 was required and hacking it to handle binary diffs with spaces would require and even worse kludge,
I suspect that we should not be using patch, but instead be using git-apply perhaps with -C option if people want fuzz.
Does git-apply work without a git repo? We're applying patches onto a CVS repo.
Quoted 5 lines
[...]
I know this script originally came from southern hemisphere, but I was talking about _western_ hemisphere. The comment refers to the part of the code the attached patch fixes, which I will apply along with your updated patch.
Western/nothern, both apply to where I live.
Quoted 5 lines
[...]
I think scripts that work with git
plumbing should read from -z output when they need to and are capable of, as we have done for git-cvsserver recently, and things written in Perl certainly are capable of doing so.
I'll investgate that.
Quoted 11 lines · Robin Rosenberg
tisdag 14 november 2006 01:47 skrev Junio C Hamano:
Quoted 7 lines
Quoted 3 lines · Robin Rosenberg
I sent a patch earlier, which was not applied, due to imperfections that I cannot solve fully. One issue was that patch 2.5.9 was required and hacking it to handle binary diffs with spaces would require and even worse kludge,
I suspect that we should not be using patch, but instead be using git-apply perhaps with -C option if people want fuzz.
Does git-apply work without a git repo? We're applying patches onto a CVS repo.
I do it during my day job so I know it works. I have a git repository that is updated via cvsimport from the central CVS, with patches of mine managed by StGIT and git. I export what's applicable with format-patch, go to a CVS working tree next door and run git-apply there, and then manually commit the result into CVS. In other words, I am doing what cvsexportcommit ought to be doing by hand.
Quoted 5 lines
Quoted 4 lines
I know this script originally came from southern hemisphere, but I was talking about _western_ hemisphere. The comment refers to the part of the code the attached patch fixes, which I will apply along with your updated patch.
Western/nothern, both apply to where I live.
Yes, I noticed that you are east of Greenwich, and NZ is too.