Author: adsb
Date: 2009-07-16 20:42:43 +0000 (Thu, 16 Jul 2009)
New Revision: 1923
Modified:
trunk/debian/changelog
trunk/scripts/debcommit.pl
Log:
debcommit: Add darcs support. Thanks to Joachim Breitner for the patch.
(Closes: #536037)
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2009-07-09 05:40:23 UTC (rev 1922)
+++ trunk/debian/changelog 2009-07-16 20:42:43 UTC (rev 1923)
@@ -3,6 +3,8 @@
* checkbashisms: Detect the use of "source" when the sourced filename
contains a tilde (Closes: #528592) or consists of a single character
(Closes: #535252). Thanks, Raphael Geissert and Ryan Niebur.
+ * debcommit: Add darcs support. Thanks to Joachim Breitner for the patch.
+ (Closes: #536037)
* nmudiff:
+ Fix specification of BCc to cont...@bugs so that it's interpreted
as an option to mutt and not as a recipient address. Thanks, Filippo
Modified: trunk/scripts/debcommit.pl
===================================================================
--- trunk/scripts/debcommit.pl 2009-07-09 05:40:23 UTC (rev 1922)
+++ trunk/scripts/debcommit.pl 2009-07-16 20:42:43 UTC (rev 1923)
@@ -14,7 +14,7 @@
and commits the change to a package's repository. It must be run in a working
copy for the package. Supported version control systems are:
B<cvs>, B<git>, B<hg> (mercurial), B<svk>, B<svn> (subversion),
-B<baz>, B<bzr>, B<tla> (arch).
+B<baz>, B<bzr>, B<tla> (arch), B<darcs>.
=head1 OPTIONS
@@ -372,6 +372,8 @@
} else {
return "tla";
}
+ } elsif (-d "debian/_darcs") {
+ return "darcs";
}
}
if (-d ".svn") {
@@ -399,6 +401,9 @@
if (-d ".hg") {
return "hg";
}
+ if (-d "_darcs") {
+ return "darcs";
+ }
# Test for this file to avoid interactive prompting from svk.
if (-d "$ENV{HOME}/.svk/local") {
@@ -418,7 +423,7 @@
}
}
- die "debcommit: not in a cvs, subversion, baz, bzr, git, hg, or svk
working copy\n";
+ die "debcommit: not in a cvs, subversion, baz, bzr, git, hg, svk or darcs
working copy\n";
}
sub action {
@@ -511,6 +516,13 @@
@fixes_arg, @files_to_commit);
}
}
+ elsif ($prog eq 'darcs') {
+ if ($diffmode) {
+ $action_rc = action($prog, "diff", @files_to_commit);
+ } else {
+ $action_rc = action($prog, "record", "-m", $message, "-a",
@files_to_commit);
+ }
+ }
else {
die "debcommit: unknown program $prog";
}
@@ -601,6 +613,11 @@
die "debcommit: failed tagging with $tag\n";
}
}
+ elsif ($prog eq 'darcs') {
+ if (! action($prog, "tag", $tag)) {
+ die "debcommit: failed tagging with $tag\n";
+ }
+ }
else {
die "debcommit: unknown program $prog";
}
@@ -609,7 +626,7 @@
sub getmessage {
my $ret;
- if ($prog =~ /^(cvs|svn|svk|tla|baz|bzr|git|hg)$/) {
+ if ($prog =~ /^(cvs|svn|svk|tla|baz|bzr|git|hg|darcs)$/) {
$ret='';
my @diffcmd;
@@ -635,6 +652,8 @@
} elsif ($prog eq 'svk') {
$ENV{'SVKDIFF'} = '/usr/bin/diff -w -u';
@diffcmd = ($prog, 'diff');
+ } elsif ($prog eq 'darcs') {
+ @diffcmd = ($prog, 'diff', '--diff-opts=-wu');
} else {
@diffcmd = ($prog, 'diff', '-w');
}
--
To unsubscribe, send mail to [email protected].