r55948 - /scripts/patchedit

jozef-guest at users.alioth.debian.org jozef-guest at users.alioth.debian.org
Sun Apr 11 13:34:33 UTC 2010


Author: jozef-guest
Date: Sun Apr 11 13:33:48 2010
New Revision: 55948

URL: http://svn.debian.org/wsvn/?sc=1&rev=55948
Log:
make the edit command optional

Modified:
    scripts/patchedit

Modified: scripts/patchedit
URL: http://svn.debian.org/wsvn/scripts/patchedit?rev=55948&op=diff
==============================================================================
--- scripts/patchedit (original)
+++ scripts/patchedit Sun Apr 11 13:33:48 2010
@@ -8,7 +8,7 @@
 
 =head1 SYNOPSIS
 
-B<patchedit> I<command> F<patchfile>
+B<patchedit> [I<command>] F<patchfile>
 
 =head1 DESCRIPTION
 
@@ -129,6 +129,13 @@
 	pod2usage if $help;
 	
 	my $cmd         = shift @ARGV;
+	
+	# make the edit default
+	if (not $cmd ~~ ['edit', 'check']) {
+		unshift @ARGV, $cmd;
+		$cmd = 'edit';
+	}
+	
 	my @patch_files = @ARGV;
 	
 	pod2usage if ((not $cmd) or (not @patch_files));
@@ -148,7 +155,6 @@
 					if $do_fix;
 				check_patch($patch_file, $also_optional);
 			}
-			default { pod2usage() }
 		}
 	}
 	




More information about the Pkg-perl-cvs-commits mailing list