Tags 462686 + patch
thanks
Hi,
On Mon, Jan 28, 2008 at 09:09:59AM +0100, Patrick Schoenfeld wrote:
> No, I have not checked that. But the problem is not limited to
> subversion, because it is not related to the VCS at all. The problem is
I need to say that this assumption was wrong. In fact it seems that the
only affected VCS seems to be subversion, svk and git. At least I did
not find a way to define colordiff as diff command for them in a way it
is possible in the three mentioned (only by defining additional commands
(mercurial) or adding shell aliases like cvsdiff etc.)
I may be wrong, therefore I added a notice in the manpage, in my patch.
Besides that I implemented a patch for the svn/svk/git. However the git
implementation is currently broken, as the only way to define an
external diff command seems to call diff with to much parameters,
resulting in a message like this:
[EMAIL PROTECTED] ~/debian-devel/test % ../devscripts/scripts/debcommit.pl -a
/usr/bin/diff: extra operand `1c3c3cbe15ebd4719f820d489e1cd96bd1d97f91'
/usr/bin/diff: Try `/usr/bin/diff --help' for more information.
external diff died, stopping at debian/changelog.
debcommit: unable to determine commit message using git (do you mean "debcommit
-a" or did you forget to run "git add"?)
Try using the -m flag.
zsh: exit 255 ../devscripts/scripts/debcommit.pl -a
The current patch is attached, but its not working this way, so it needs
further investigation.
I'll try to fix it anyways, but if someone has a idea I would be lucky.
Best Regards,
Patrick
Index: debian/changelog
===================================================================
--- debian/changelog (Revision 915)
+++ debian/changelog (Arbeitskopie)
@@ -24,7 +24,12 @@
[ Christoph Berg ]
* debcommit: also look for \t in the diff for GNU-style changelogs.
- -- Adam D. Barratt <[EMAIL PROTECTED]> Sun, 27 Jan 2008 22:54:27 +0000
+ [ Patrick Schoenfeld ]
+ * debcommit: Make it work with svn/svk/git when colordiff is used
+ (Closes: #462686)
+ * debcommit: Added a note about potential problems with colordiff to the manpage
+
+ -- Patrick Schoenfeld <[EMAIL PROTECTED]> Mon, 28 Jan 2008 16:07:57 +0100
devscripts (2.10.13) unstable; urgency=low
Index: scripts/debcommit.pl
===================================================================
--- scripts/debcommit.pl (Revision 915)
+++ scripts/debcommit.pl (Arbeitskopie)
@@ -107,6 +107,13 @@
This is the key id used for signing tags. If not set, a default will be
chosen by the revision control system.
+=head1 DEBCOMMIT AND COLORDIFF
+
+If you use colordiff to colorize your output, this may result in debcommit not
+able to find the commit message. It has been tried to handle this, where it
+seemed to be a problem. So if you have trouble like this please file a bug
+report.
+
=cut
use warnings;
@@ -484,11 +491,14 @@
if ($prog eq 'tla' || $prog eq 'baz') {
@diffcmd = ($prog, 'file-diff');
} elsif ($prog eq 'git') {
+ $ENV{GIT_EXTERNAL_DIFF} = '/usr/bin/diff';
if ($all) {
- @diffcmd = ('git-diff');
+ @diffcmd = ('git-diff', '--ext-diff');
} else {
- @diffcmd = ('git-diff', '--cached');
+ @diffcmd = ('git-diff', '--cached', '--ext-diff');
}
+ } elsif ($prog eq 'svn' || $prog eq 'svk') {
+ @diffcmd = ($prog, 'diff', '--diff-cmd', '/usr/bin/diff');
} else {
@diffcmd = ($prog, 'diff');
}
@@ -497,11 +507,12 @@
or die "debcommit: cannot run $diffcmd[0]: $!\n";
foreach (<CHLOG>) {
+ print;
next unless s/^\+( |\t)//;
next if /^\s*\[.*\]\s*$/; # maintainer name
$ret .= $_;
}
-
+
if (! length $ret) {
my $info='';
if ($prog eq 'git') {