Matt McCutchen's Web Site
/
rsync
/
rsync-patches.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2a6374d
)
Enhanced --auto-cmd to take a REGEX instead of a STRING.
author
Wayne Davison
<wayned@samba.org>
Wed, 8 Feb 2006 01:48:38 +0000
(
01:48
+0000)
committer
Wayne Davison
<wayned@samba.org>
Wed, 8 Feb 2006 01:48:38 +0000
(
01:48
+0000)
verify-patches
patch
|
blob
|
blame
|
history
diff --git
a/verify-patches
b/verify-patches
index
2fafc9d
..
4ab2242
100755
(executable)
--- a/
verify-patches
+++ b/
verify-patches
@@
-18,6
+18,8
@@
GetOptions(
'auto-cmd=s' => \$auto_cmd,
) or &usage;
'auto-cmd=s' => \$auto_cmd,
) or &usage;
+$auto_cmd = qr/^($auto_cmd)$/;
+
my $interesting_fuzz = $minor_updates ? '\d' : '[2-9]';
chdir('patches') if -d 'patches';
my $interesting_fuzz = $minor_updates ? '\d' : '[2-9]';
chdir('patches') if -d 'patches';
@@
-110,7
+112,7
@@
foreach my $diff (@ARGV) {
"\nFix rejects, Diff create, Edit both diffs, Update patch,\n",
"Apply patch again, !(CMD), Build rsync, Next, Quit: [$default] ";
my $ans = $default;
"\nFix rejects, Diff create, Edit both diffs, Update patch,\n",
"Apply patch again, !(CMD), Build rsync, Next, Quit: [$default] ";
my $ans = $default;
- if ($default
eq $auto_cmd
) {
+ if ($default
=~ /$auto_cmd/
) {
print $default, "\n";
} else {
my $input = <STDIN>;
print $default, "\n";
} else {
my $input = <STDIN>;
@@
-287,7
+289,7
@@
sub usage
{
die <<EOT;
Usage: $0 [OPTS] [DIFF-FILE...]
{
die <<EOT;
Usage: $0 [OPTS] [DIFF-FILE...]
- --auto-cmd=
STR If the suggested command is STR
, enter it automatically
+ --auto-cmd=
REGEX If default_cmd =~ /^(REGEX)\$/
, enter it automatically
-f, --failures-only Suggest skipping patches that don't have failing hunks
-n, --no-cvs Don't update tmp/cvsdir at the start of the run
-p, --prepare-source Run ./prepare-source and include generated files in diff
-f, --failures-only Suggest skipping patches that don't have failing hunks
-n, --no-cvs Don't update tmp/cvsdir at the start of the run
-p, --prepare-source Run ./prepare-source and include generated files in diff