[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-vc-dwim] vc-dwim problem parsing ChangeLog entries
From: |
Jim Meyering |
Subject: |
Re: [Bug-vc-dwim] vc-dwim problem parsing ChangeLog entries |
Date: |
Mon, 13 Jun 2011 22:06:23 +0200 |
Paul Eggert wrote:
> The fix in
> <http://lists.gnu.org/archive/html/bug-vc-dwim/2011-05/msg00008.html>
> worked for me (thanks) but now I have another ChangeLog entry (for
> src/ChangeLog in the Emacs trunk) for which it doesn't work:
>
> 2011-06-12 Paul Eggert <address@hidden>
>
> * lisp.h (UNSIGNED_CMP): New macro.
> This fixes comparison bugs on 64-bit hosts.
> (ASCII_CHAR_P): Use it.
> * casefiddle.c (casify_object):
> * character.h (ASCII_BYTE_P, CHAR_VALID_P)
> (SINGLE_BYTE_CHAR_P, CHAR_STRING):
> * composite.h (COMPOSITION_ENCODE_RULE_VALID):
> * dispextern.h (FACE_FROM_ID):
> * keyboard.c (read_char): Use UNSIGNED_CMP.
>
> This causes vc-dwim, with the fix, to output this:
>
> bzr: ERROR: Path(s) are not versioned: src/CHAR_VALID_P
> vc-dwim: error closing pipe from `bzr diff -- src/lisp.h src/casefiddle.c
> src/character.h src/CHAR_VALID_P src/composite.h src/dispextern.h
> src/keyboard.c': terminated with exit status 3
>
> If I append a colon to the '* character.h ...' line, vc-dwim works,
> but it should be OK to omit the colon there.
Hi Paul,
Thanks for the report.
Here's the fix I've just pushed:
(since it's still the same bug, at least I don't have
to update NEWS ;-)
>From 0d5e53e8b7ca0234cd4f8a6164a3cdab6517817d Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Mon, 13 Jun 2011 22:05:27 +0200
Subject: [PATCH] vc-dwim: fix a bug that made the 2011-05-31 change
incomplete
* vc-dwim.pl (main): Include the trailing ":" or ")" in $1.
Without that matching ")", the changelog entry parser would
fail to remove a parenthesized list of functions, and would
interpret the first of two or more function names as a file name.
Reported by Paul Eggert.
* tests/cl-syntax: Use two functions in the parenthesized list,
to trigger this new bug.
---
tests/cl-syntax | 3 ++-
vc-dwim.pl | 3 ++-
2 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/tests/cl-syntax b/tests/cl-syntax
index 3a29619..dec6850 100755
--- a/tests/cl-syntax
+++ b/tests/cl-syntax
@@ -20,7 +20,8 @@ git commit -m m . > /dev/null || framework_failure_
cat <<EOF > ChangeLog
2011-05-31 R. Andom <address@hidden>
- * foo (bar)
+ * foo (zoo, bar)
+ (a, b)
(qux): Comment.
* not-checked.c: Irrelevant.
diff --git a/vc-dwim.pl b/vc-dwim.pl
index 76b3ae0..63b100f 100755
--- a/vc-dwim.pl
+++ b/vc-dwim.pl
@@ -324,6 +324,7 @@ sub run_command
# Given the part of a ChangeLog line after a leading "\t* ",
# return the list of named files. E.g.,
# * foo.c: descr
+# * foo.c (func_1, func_2): descr
# * lib/bar.c (func): descr
# * glarp.c (struct) [member]: descr
# and multiple files per line, with each comma-separated entry potentially
@@ -989,7 +990,7 @@ sub main
if ($line =~ /^\*/)
{
- $line =~ /^\* (\S.*?)(:|\)$)/
+ $line =~ /^\* (\S.*?(:|\)$))/
or die "$ME:$log: line of unexpected form:\n$line";
my $f_spec = $1;
foreach my $file (change_log_line_extract_file_list ($f_spec))
--
1.7.6.rc0.293.g40857