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.

wyoung 2020-05-03 18:33 trunk
Commit e4ba38f211ea4786fda7e5584a8a4a4e98a3de122f615fc944e8e64ff78c672d
1 file changed +16 -1
--- tools/fossil-diff-log
+++ tools/fossil-diff-log
@@ -1,6 +1,21 @@
11
#!/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
+
217
use strict;
318
use warnings;
419
520
use Carp;
621
use File::Which;
@@ -34,11 +49,11 @@
3449
my ($currckid, $date, $user, $branch, @cwords) = split ' ', $line;
3550
next unless $branch eq $cbranch;
3651
if (defined $lastckid and defined $branch) {
3752
my $comment = join ' ', @cwords;
3853
open my $diff, '-|', 'fossil', 'diff', $file,
39
- '--from', $currckid
54
+ '--from', $currckid,
4055
'--to', $lastckid,
4156
or die "Failed to diff $currckid -> $lastckid: $!\n";
4257
my @dl = <$diff>;
4358
close $diff;
4459
my $patch = join '', @dl;
4560
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button