From d11f3143af21e79119f0a38a0bb5b5324d748099 Mon Sep 17 00:00:00 2001 From: Peter Mack Date: Fri, 16 Jan 2009 13:00:10 -0800 Subject: [PATCH] [commit-patch] Add subversion support. Hi David, our developers were interested in using commit-patch to help with their code commits to our subversion repository. I've created a patch that adds support for subversion. We've been using this internally and thought that you might be interested in the code addition. I've attached the patch to this e-mail (gzipped to avoid issues with mail scanners). Cheers, Peter --- ChangeLog | 4 ++++ commit-patch | 16 +++++++++++++--- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2933bf1..a9d7aa6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2009-01-25 Peter Mack & Joel Hillacre + + * commit-patch: Added SVN support + 2008-12-22 David Caldwell * Released 2.1 diff --git a/commit-patch b/commit-patch index 69358ab..105f00d 100755 --- a/commit-patch +++ b/commit-patch @@ -39,6 +39,16 @@ while (!$vc{name}) { $vc{remove} = 'cvs rm'; $vc{patcharg} = '-p0'; $vc{lsdiffarg} = []; + } elsif (-d "$repo/.svn" && $repo eq '.') { + $vc{name} = 'svn'; + $vc{diff} = 'svn diff -x -u'; + $vc{commit} = 'svn commit'; + $vc{message} = sub { ('-m', $_[0]) }; + $vc{message_file} = sub { ('-F', $_[0]) }; + $vc{add} = 'svn add'; + $vc{remove} = 'svn delete'; + $vc{patcharg} = '-p0'; + $vc{lsdiffarg} = []; } elsif (-d "$repo/_darcs") { $vc{name} = 'darcs'; $vc{diff} = 'darcs diff -u'; @@ -184,7 +194,7 @@ foreach my $k (keys %clean) { unlink $k } =head1 NAME -commit-patch - commit patches to I, I, I, or I repositories +commit-patch - commit patches to I, I, I, I, or I repositories =head1 SYNOPSIS @@ -209,7 +219,7 @@ B. Any files you specify will be passed to your version control's diff command. B currently supports the following version control systems: -B>, B>, B>, and B>. +B>, B>, B>, B>, and B>. =head1 OPTIONS @@ -221,7 +231,7 @@ the same as whatever the underlying version control system would do if you didn't specify a message name on the command line. That is, B does not interfere with the patch naming process of the underlying version control system; I will still ask you -interactively and I will still launch your editor. +interactively; I and I will still launch your editor. B<-F>, B<--message-file>=I - You can optionally get the commit message from a file. This is generally only useful for -- 2.51.2