* bug#14169: vc: [bzr] Small nuissance when invoking 'log-view-diff-changeset'
@ 2013-04-09 20:07 Lluís Vilanova
2013-04-25 1:47 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Lluís Vilanova @ 2013-04-09 20:07 UTC (permalink / raw)
To: 14169
When issuing 'vc-print-log', the results of "bzr log" have a line of '-'
characters prepended to every revision.
The net result is that point is set to the first line of the output, which is a
line with '-' characters, and 'log-view-diff-changeset' is unable to show the
diff for that line.
It also feels inconsistent that hitting 'D' on any other line of '-' characters
shows the diff for the previous revision (while that line is, in fact, a prefix
for the revision that comes below).
Thanks,
Lluis
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14169: vc: [bzr] Small nuissance when invoking 'log-view-diff-changeset'
2013-04-09 20:07 bug#14169: vc: [bzr] Small nuissance when invoking 'log-view-diff-changeset' Lluís Vilanova
@ 2013-04-25 1:47 ` Glenn Morris
2013-04-25 5:12 ` Glenn Morris
0 siblings, 1 reply; 5+ messages in thread
From: Glenn Morris @ 2013-04-25 1:47 UTC (permalink / raw)
To: Lluís Vilanova; +Cc: 14169
Lluís Vilanova wrote:
> When issuing 'vc-print-log', the results of "bzr log" have a line of '-'
> characters prepended to every revision.
>
> The net result is that point is set to the first line of the output,
> which is a line with '-' characters, and 'log-view-diff-changeset' is
> unable to show the diff for that line.
There's two issues here.
svn also has ----- lines, yet vc-print-log manages to move point to the
line with the first revision number on.
When visiting a file under SVN, we manage to set the working revision to
the last revision in which that file was modified. See comment in
vc-svn-parse-status:
;; Use the last-modified revision, so that searching in vc-print-log
;; output works.
vc-print-log is able to move point to this revision.
With bzr, the only revision number we can get is the one in which the
repository was last modified. If the file in question was not modified
in this revision, vc-print-log doesn't find that revision and so leaves
point at point-min.
I don't think there is any bzr fix for this.
> It also feels inconsistent that hitting 'D' on any other line of '-'
> characters shows the diff for the previous revision (while that line
> is, in fact, a prefix for the revision that comes below).
(Same issue for svn. svn also fails if you move to the first line of the
buffer.)
The second issue is that log-view-current-entry assumes that the
revision number is always on the first line of a log entry.
It finds revisions by doing (forward-line 1), then searching backwards
for log-view-message-re. This can miss revisions.
Maybe it could instead first search forwards, then backwards.
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#14169: vc: [bzr] Small nuissance when invoking 'log-view-diff-changeset'
2013-04-25 1:47 ` Glenn Morris
@ 2013-04-25 5:12 ` Glenn Morris
2013-04-26 11:14 ` Lluís Vilanova
2013-04-27 21:29 ` Glenn Morris
0 siblings, 2 replies; 5+ messages in thread
From: Glenn Morris @ 2013-04-25 5:12 UTC (permalink / raw)
To: Lluís Vilanova; +Cc: 14169
Maybe this is good enough in practice:
*** lisp/vc/log-view.el 2013-01-01 09:11:05 +0000
--- lisp/vc/log-view.el 2013-04-25 05:07:46 +0000
***************
*** 317,323 ****
result)
(save-excursion
(when pos (goto-char pos))
! (forward-line 1)
(while looping
(setq pos (re-search-backward log-view-message-re nil 'move)
looping (and pos (log-view-inside-comment-p (point)))))
--- 317,324 ----
result)
(save-excursion
(when pos (goto-char pos))
! (forward-line 0)
! (forward-line (if (looking-at "-\\{20,\\}$") 2 1))
(while looping
(setq pos (re-search-backward log-view-message-re nil 'move)
looping (and pos (log-view-inside-comment-p (point)))))
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-04-27 21:29 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-04-09 20:07 bug#14169: vc: [bzr] Small nuissance when invoking 'log-view-diff-changeset' Lluís Vilanova
2013-04-25 1:47 ` Glenn Morris
2013-04-25 5:12 ` Glenn Morris
2013-04-26 11:14 ` Lluís Vilanova
2013-04-27 21:29 ` Glenn Morris
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).