unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* improve vc-bzr-print-log
@ 2009-07-26 17:28 Dan Nicolaescu
  2009-07-26 19:37 ` Chong Yidong
  2009-07-27  2:50 ` Stefan Monnier
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Nicolaescu @ 2009-07-26 17:28 UTC (permalink / raw)
  To: emacs-devel


When vc-bzr was written "bzr log" did not take multiple file arguments,
it does now, so vc-bzr-print-log can take advantage of this.

Any objection to this patch?


--- vc-bzr.el.~1.78.~	2009-05-25 20:57:29.000000000 -0700
+++ vc-bzr.el		2009-07-26 10:25:30.000000000 -0700
@@ -457,7 +457,7 @@ REV non-nil gets an error."
   (remove-hook 'log-view-mode-hook 'vc-bzr-log-view-mode) ;Deactivate the hack.
   (require 'add-log)
   (set (make-local-variable 'log-view-per-file-logs) nil)
-  (set (make-local-variable 'log-view-file-re) "^Working file:[ \t]+\\(.+\\)")
+  (set (make-local-variable 'log-view-file-re) "\\`a\\`")
   (set (make-local-variable 'log-view-message-re)
        "^ *\\(?:revno: \\([0-9.]+\\)\\|merged: .+\\)")
   (set (make-local-variable 'log-view-font-lock-keywords)
@@ -481,16 +481,11 @@ REV non-nil gets an error."
   ;; FIXME: `vc-bzr-command' runs `bzr log' with `LC_MESSAGES=C', so
   ;; the log display may not what the user wants - but I see no other
   ;; way of getting the above regexps working.
-  (dolist (file files)
-    (vc-exec-after
-     `(let ((inhibit-read-only t))
-        (with-current-buffer buffer
-          ;; Insert the file name so that log-view.el can find it.
-          (insert "Working file: " ',file "\n")) ;; Like RCS/CVS.
-        (apply 'vc-bzr-command "log" ',buffer 'async ',file
-               ',(if (stringp vc-bzr-log-switches)
-                     (list vc-bzr-log-switches)
-                   vc-bzr-log-switches))))))
+  (with-current-buffer buffer
+    (apply 'vc-bzr-command "log" buffer 'async files
+       (if (stringp vc-bzr-log-switches)
+	       (list vc-bzr-log-switches)
+	            vc-bzr-log-switches))))
 
 (defun vc-bzr-show-log-entry (revision)
   "Find entry for patch name REVISION in bzr change log buffer."




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-07-26 17:28 improve vc-bzr-print-log Dan Nicolaescu
@ 2009-07-26 19:37 ` Chong Yidong
  2009-07-26 21:55   ` Dan Nicolaescu
  2009-07-27  2:50 ` Stefan Monnier
  1 sibling, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2009-07-26 19:37 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> When vc-bzr was written "bzr log" did not take multiple file arguments,
> it does now, so vc-bzr-print-log can take advantage of this.
>
> Any objection to this patch?

How old are the versions of bzr that don't accept multiple file
arguments, and what effect does this change have on those versions?




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-07-26 19:37 ` Chong Yidong
@ 2009-07-26 21:55   ` Dan Nicolaescu
  2009-07-27  1:54     ` Stephen J. Turnbull
  2009-08-13 17:28     ` Chong Yidong
  0 siblings, 2 replies; 7+ messages in thread
From: Dan Nicolaescu @ 2009-07-26 21:55 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > When vc-bzr was written "bzr log" did not take multiple file arguments,
  > > it does now, so vc-bzr-print-log can take advantage of this.
  > >
  > > Any objection to this patch?
  > 
  > How old are the versions of bzr that don't accept multiple file
  > arguments, 

No idea, I only have access to  bzr-1.16.1.

  > and what effect does this change have on those versions?

Doing C-x v l when multiple files are selected in vc-dir will not work.
C-x v l from a file context will work just the same.
The thing is that bzr users have all the reasons to use very up to date
versions, the performance and disk usage is dramatically better.
C-x v l for multiple files is new in 23.1, so not supporting it for old
bzr versions in 23.2 does not seem like a problem.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-07-26 21:55   ` Dan Nicolaescu
@ 2009-07-27  1:54     ` Stephen J. Turnbull
  2009-08-13 17:28     ` Chong Yidong
  1 sibling, 0 replies; 7+ messages in thread
From: Stephen J. Turnbull @ 2009-07-27  1:54 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: Chong Yidong, emacs-devel

Dan Nicolaescu writes:

 > The thing is that bzr users have all the reasons to use very up to date
 > versions, the performance and disk usage is dramatically better.

All true, but the bzr developers themselves worry about this,
especially because even Ubuntu releases lag bzr releases by many
months, and other distros are even more conservative.

bzr is also not yet out of the woods with respect to "format churn"
(in terms of released versions); there's another big one on the way in
the next month (that is, the recently released as "optional" in 1.17
"--2a" format will become "default" in 2.0, unless of course they have
to retrench on 2.0 and it becomes 1.18 instead, in which case who
knows what will happen to the status of "--2a" format or when it will
become default and eventually propagate into the distros).

I realize that "Emacs developers" won't have a problem with adopting a
bzr recent enough for Emacs developer problems (many are already
following bzr.dev, I suspect), but it's definitely a barrier to entry
for new contributors (something that comes up frequently on the bazaar
list).




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-07-26 17:28 improve vc-bzr-print-log Dan Nicolaescu
  2009-07-26 19:37 ` Chong Yidong
@ 2009-07-27  2:50 ` Stefan Monnier
  1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2009-07-27  2:50 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

> When vc-bzr was written "bzr log" did not take multiple file arguments,
> it does now, so vc-bzr-print-log can take advantage of this.

> Any objection to this patch?

Looks OK to me,


        Stefan




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-07-26 21:55   ` Dan Nicolaescu
  2009-07-27  1:54     ` Stephen J. Turnbull
@ 2009-08-13 17:28     ` Chong Yidong
  2009-08-13 17:40       ` Dan Nicolaescu
  1 sibling, 1 reply; 7+ messages in thread
From: Chong Yidong @ 2009-08-13 17:28 UTC (permalink / raw)
  To: Dan Nicolaescu; +Cc: emacs-devel

Dan Nicolaescu <dann@ics.uci.edu> writes:

> Chong Yidong <cyd@stupidchicken.com> writes:
>
>   > Dan Nicolaescu <dann@ics.uci.edu> writes:
>   > 
>   > > When vc-bzr was written "bzr log" did not take multiple file arguments,
>   > > it does now, so vc-bzr-print-log can take advantage of this.
>   > >
>   > > Any objection to this patch?
>   > 
>   > How old are the versions of bzr that don't accept multiple file
>   > arguments, 
>
> No idea, I only have access to  bzr-1.16.1.
>
>   > and what effect does this change have on those versions?
>
> Doing C-x v l when multiple files are selected in vc-dir will not work.
> C-x v l from a file context will work just the same.
> The thing is that bzr users have all the reasons to use very up to date
> versions, the performance and disk usage is dramatically better.
> C-x v l for multiple files is new in 23.1, so not supporting it for old
> bzr versions in 23.2 does not seem like a problem.

Sorry for coming back to this so late.

Could you add a defcustom to toggle between this new code (giving
multiple file arguments to "bzr log") and the old code, defaulting to
the new code?  I don't think it's worth trying to autodetect bzr
version, but let's at least give users a way to get the old behavior if
they need it.




^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: improve vc-bzr-print-log
  2009-08-13 17:28     ` Chong Yidong
@ 2009-08-13 17:40       ` Dan Nicolaescu
  0 siblings, 0 replies; 7+ messages in thread
From: Dan Nicolaescu @ 2009-08-13 17:40 UTC (permalink / raw)
  To: Chong Yidong; +Cc: emacs-devel

Chong Yidong <cyd@stupidchicken.com> writes:

  > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > 
  > > Chong Yidong <cyd@stupidchicken.com> writes:
  > >
  > >   > Dan Nicolaescu <dann@ics.uci.edu> writes:
  > >   > 
  > >   > > When vc-bzr was written "bzr log" did not take multiple file arguments,
  > >   > > it does now, so vc-bzr-print-log can take advantage of this.
  > >   > >
  > >   > > Any objection to this patch?
  > >   > 
  > >   > How old are the versions of bzr that don't accept multiple file
  > >   > arguments, 
  > >
  > > No idea, I only have access to  bzr-1.16.1.
  > >
  > >   > and what effect does this change have on those versions?
  > >
  > > Doing C-x v l when multiple files are selected in vc-dir will not work.
  > > C-x v l from a file context will work just the same.
  > > The thing is that bzr users have all the reasons to use very up to date
  > > versions, the performance and disk usage is dramatically better.
  > > C-x v l for multiple files is new in 23.1, so not supporting it for old
  > > bzr versions in 23.2 does not seem like a problem.
  > 
  > Sorry for coming back to this so late.
  > 
  > Could you add a defcustom to toggle between this new code (giving
  > multiple file arguments to "bzr log") and the old code, defaulting to
  > the new code?  I don't think it's worth trying to autodetect bzr
  > version, but let's at least give users a way to get the old behavior if
  > they need it.

Stefan already approved the change as I proposed it.
Personally I am against adding such a toggle, it's just an unnecessary
complication given that we have no supporting evidence that anyone
actually wants it.




^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-08-13 17:40 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-26 17:28 improve vc-bzr-print-log Dan Nicolaescu
2009-07-26 19:37 ` Chong Yidong
2009-07-26 21:55   ` Dan Nicolaescu
2009-07-27  1:54     ` Stephen J. Turnbull
2009-08-13 17:28     ` Chong Yidong
2009-08-13 17:40       ` Dan Nicolaescu
2009-07-27  2:50 ` Stefan Monnier

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).