On Wed, Jul 20, 2005 at 03:08:18PM +0200, Filippo Giunchedi wrote: > On Wed, Jul 20, 2005 at 01:33:03PM +0100, Colin Watson wrote: > > On Tue, Jul 19, 2005 at 06:23:55PM +0100, Colin Watson wrote: > > > To go along with svnpath in current trunk, here's an archpath. It works > > > with either tla or baz, and has a fairly similar interface to svnpath > > > except that the branch handling is a bit different to support the way > > > one normally works in arch (or at least how I normally work). > > > > ... and here's the corresponding debcommit patch. I also fixed the > > broken NAME header in its man page. > > bad timing, I've just uploaded 2.9 to unstable > applied in svn nevertheless :)
Thanks! Sorry to flood you with patches, but after some testing here's a further patch that produces slightly neater output: it's generally good not to make summary lines of changesets too long, so, if the summary would exceed 72 characters or be on multiple lines, this patch produces a shorter summary by cutting it off at the last bit of whitespace before that and replacing the rest with "...", and uses the full text of the message as the log message. Cheers, -- Colin Watson [EMAIL PROTECTED]
Index: debcommit.pl =================================================================== --- debcommit.pl (revision 175) +++ debcommit.pl (working copy) @@ -126,7 +126,17 @@ } } elsif ($prog eq 'tla' || $prog eq 'baz') { - if (! action($prog, "commit", "-s", $message)) { + my $summary=$message; + $summary=~s/^((?:\* )?[^\n]{1,72})(?:(?:\s|\n).*|$)/$1/ms; + my @args; + if ($summary eq $message) { + $summary=~s/^\* //s; + @args=("-s", $summary); + } else { + $summary=~s/^\* //s; + @args=("-s", "$summary ...", "-L", $message); + } + if (! action($prog, "commit", @args)) { die "commit failed\n"; } }