emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

23.0.60; vc-hg-annotate-command version number bug + patch


From: David Hull
Subject: 23.0.60; vc-hg-annotate-command version number bug + patch
Date: Fri, 16 May 2008 13:22:48 -0700

There is a small problem in the function vc-hg-annotate-command that
causes the code that deletes up to the first line of the sources to
delete too far if the first line of sources starts with a space, such
as the following:

 0 Fri Apr 25 18:04:19 2008 -0700: #! /usr/bin/perl
 0 Fri Apr 25 18:04:19 2008 -0700: 
36 Tue May 13 17:55:19 2008 -0700: my @fields = @{$e->{field}};

This patch fixes the problem:

Index: vc-hg.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/vc-hg.el,v
retrieving revision 1.77
diff -u -r1.77 vc-hg.el
--- vc-hg.el    15 May 2008 17:38:47 -0000      1.77
+++ vc-hg.el    16 May 2008 19:49:59 -0000
@@ -288,8 +288,8 @@
                 (when revision (concat "-r" revision)))
   (with-current-buffer buffer
     (goto-char (point-min))
-    (re-search-forward "^[0-9]")
-    (delete-region (point-min) (1- (point)))))
+    (re-search-forward "^[ \t]*[0-9]")
+    (delete-region (point-min) (match-beginning 0))))
 
 
 ;; The format for one line output by "hg annotate -d -n" looks like this:

-- 
David Hull




reply via email to

[Prev in Thread] Current Thread [Next in Thread]