SVN devscripts commit: r537 - in trunk: debian scripts
Stefano Zacchiroli
zack at alioth.debian.org
Sun Feb 25 16:20:14 CET 2007
Author: zack
Date: 2007-02-25 16:20:13 +0100 (Sun, 25 Feb 2007)
New Revision: 537
Modified:
trunk/debian/changelog
trunk/scripts/debcommit.pl
Log:
debcommit: support for specifying the list of files to commit
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2007-02-25 15:10:49 UTC (rev 536)
+++ trunk/debian/changelog 2007-02-25 15:20:13 UTC (rev 537)
@@ -44,8 +44,10 @@
* bts: list the available severities in the manpage (Closes: #412186)
* uscan: added --force-download to force download when changelog is in sync
with upstream version, based on a patch from Ian Wienand (Closes: #364116)
+ * debcommit: added support for specifying the list of files to commit on
+ cmdline, patch from Damyan Ivanov (Closes: #381152)
- -- Stefano Zacchiroli <zack at debian.org> Sun, 25 Feb 2007 16:09:31 +0100
+ -- Stefano Zacchiroli <zack at debian.org> Sun, 25 Feb 2007 16:17:41 +0100
devscripts (2.9.27) unstable; urgency=low
Modified: trunk/scripts/debcommit.pl
===================================================================
--- trunk/scripts/debcommit.pl 2007-02-25 15:10:49 UTC (rev 536)
+++ trunk/scripts/debcommit.pl 2007-02-25 15:20:13 UTC (rev 537)
@@ -6,7 +6,7 @@
=head1 SYNOPSIS
-debcommit [--release] [--message=text] [--noact]
+debcommit [--release] [--message=text] [--noact] [files to commit]
=head1 DESCRIPTION
@@ -40,6 +40,10 @@
Do not actually do anything, but do print the commands that would be run.
+=item files to commit
+
+Specify which files to commit. Commits all files if not used.
+
=over 4
=back
@@ -54,11 +58,14 @@
sub usage {
print <<"EOT";
-Usage: $progname [--release] [--message=text] [--noact] [--help ] [--version]
+Usage: $progname [options] [files to commit]
+ $progname --version
+ $progname --help
Generates a commit message based on new text in debian/changelog,
and commit the change to a package\'s repository.
+Options:
--release Commit a release of the package.
--message=text Specify a commit message
--noact Dry run, no actual commits
@@ -88,9 +95,11 @@
"help" => sub { usage(); exit 0; },
"version" => sub { version(); exit 0; },
)) {
- die "Usage: debcommit [--release] [--message=text] [--noact]\n";
+ die "Usage: debcommit [--release] [--message=text] [--noact] [files to commit]\n";
}
+my @files_to_commit = @ARGV;
+
my $prog=getprog();
if (! -e "debian/changelog") {
die "debcommit: cannot find debian/changelog\n";
@@ -162,12 +171,12 @@
my $message=shift;
if ($prog eq 'cvs' || $prog eq 'svn' || $prog eq 'svk' || $prog eq 'bzr') {
- if (! action($prog, "commit", "-m", $message)) {
+ if (! action($prog, "commit", "-m", $message, @files_to_commit)) {
die "debcommit: commit failed\n";
}
}
elsif ($prog eq 'git') {
- if (! action($prog, "commit", "-a", "-m", $message)) {
+ if (! action($prog, "commit", "-a", "-m", $message, @files_to_commit)) {
die "debcommit: commit failed\n";
}
}
@@ -182,6 +191,12 @@
$summary=~s/^\* //s;
@args=("-s", "$summary ...", "-L", $message);
}
+ push(
+ @args,
+ (($prog eq 'tla') ? '--' : ()),
+ @files_to_commit,
+ ) if @files_to_commit;
+
if (! action($prog, "commit", @args)) {
die "debcommit: commit failed\n";
}
More information about the Devscripts-devel
mailing list