Fossil SCM
Added header comment to new tools/fossil-diff-log explaining what it does and how to install it. Also fixed a syntax error.
Commit
e4ba38f211ea4786fda7e5584a8a4a4e98a3de122f615fc944e8e64ff78c672d
Parent
836d6b4f2110a41…
1 file changed
+16
-1
+16
-1
| --- tools/fossil-diff-log | ||
| +++ tools/fossil-diff-log | ||
| @@ -1,6 +1,21 @@ | ||
| 1 | 1 | #!/usr/bin/env perl |
| 2 | +# Fossil emulation of the "git log --patch / -p" feature: emit a stream | |
| 3 | +# of diffs from one version to the next for each file named on the | |
| 4 | +# command line. | |
| 5 | +# | |
| 6 | +# LIMITATIONS: It does not assume "all files" if you give no args, and | |
| 7 | +# it cannot take a directory to mean "all files under this parent". | |
| 8 | +# | |
| 9 | +# PREREQUISITES: This script needs several CPAN modules to run properly. | |
| 10 | +# There are multiple methods to install them: | |
| 11 | +# | |
| 12 | +# sudo dnf install perl-File-Which perl-IO-Interactive | |
| 13 | +# sudo apt install libfile-which-perl libio-interactive-perl | |
| 14 | +# sudo cpanm File::Which IO::Interactive | |
| 15 | +# ...etc... | |
| 16 | + | |
| 2 | 17 | use strict; |
| 3 | 18 | use warnings; |
| 4 | 19 | |
| 5 | 20 | use Carp; |
| 6 | 21 | use File::Which; |
| @@ -34,11 +49,11 @@ | ||
| 34 | 49 | my ($currckid, $date, $user, $branch, @cwords) = split ' ', $line; |
| 35 | 50 | next unless $branch eq $cbranch; |
| 36 | 51 | if (defined $lastckid and defined $branch) { |
| 37 | 52 | my $comment = join ' ', @cwords; |
| 38 | 53 | open my $diff, '-|', 'fossil', 'diff', $file, |
| 39 | - '--from', $currckid | |
| 54 | + '--from', $currckid, | |
| 40 | 55 | '--to', $lastckid, |
| 41 | 56 | or die "Failed to diff $currckid -> $lastckid: $!\n"; |
| 42 | 57 | my @dl = <$diff>; |
| 43 | 58 | close $diff; |
| 44 | 59 | my $patch = join '', @dl; |
| 45 | 60 |
| --- tools/fossil-diff-log | |
| +++ tools/fossil-diff-log | |
| @@ -1,6 +1,21 @@ | |
| 1 | #!/usr/bin/env perl |
| 2 | use strict; |
| 3 | use warnings; |
| 4 | |
| 5 | use Carp; |
| 6 | use File::Which; |
| @@ -34,11 +49,11 @@ | |
| 34 | my ($currckid, $date, $user, $branch, @cwords) = split ' ', $line; |
| 35 | next unless $branch eq $cbranch; |
| 36 | if (defined $lastckid and defined $branch) { |
| 37 | my $comment = join ' ', @cwords; |
| 38 | open my $diff, '-|', 'fossil', 'diff', $file, |
| 39 | '--from', $currckid |
| 40 | '--to', $lastckid, |
| 41 | or die "Failed to diff $currckid -> $lastckid: $!\n"; |
| 42 | my @dl = <$diff>; |
| 43 | close $diff; |
| 44 | my $patch = join '', @dl; |
| 45 |
| --- tools/fossil-diff-log | |
| +++ tools/fossil-diff-log | |
| @@ -1,6 +1,21 @@ | |
| 1 | #!/usr/bin/env perl |
| 2 | # Fossil emulation of the "git log --patch / -p" feature: emit a stream |
| 3 | # of diffs from one version to the next for each file named on the |
| 4 | # command line. |
| 5 | # |
| 6 | # LIMITATIONS: It does not assume "all files" if you give no args, and |
| 7 | # it cannot take a directory to mean "all files under this parent". |
| 8 | # |
| 9 | # PREREQUISITES: This script needs several CPAN modules to run properly. |
| 10 | # There are multiple methods to install them: |
| 11 | # |
| 12 | # sudo dnf install perl-File-Which perl-IO-Interactive |
| 13 | # sudo apt install libfile-which-perl libio-interactive-perl |
| 14 | # sudo cpanm File::Which IO::Interactive |
| 15 | # ...etc... |
| 16 | |
| 17 | use strict; |
| 18 | use warnings; |
| 19 | |
| 20 | use Carp; |
| 21 | use File::Which; |
| @@ -34,11 +49,11 @@ | |
| 49 | my ($currckid, $date, $user, $branch, @cwords) = split ' ', $line; |
| 50 | next unless $branch eq $cbranch; |
| 51 | if (defined $lastckid and defined $branch) { |
| 52 | my $comment = join ' ', @cwords; |
| 53 | open my $diff, '-|', 'fossil', 'diff', $file, |
| 54 | '--from', $currckid, |
| 55 | '--to', $lastckid, |
| 56 | or die "Failed to diff $currckid -> $lastckid: $!\n"; |
| 57 | my @dl = <$diff>; |
| 58 | close $diff; |
| 59 | my $patch = join '', @dl; |
| 60 |