all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
@ 2008-07-27 20:41 Torsten Bronger
  0 siblings, 0 replies; 7+ messages in thread
From: Torsten Bronger @ 2008-07-27 20:41 UTC (permalink / raw
  To: emacs-pretest-bug

In Bazaar lightweight checkouts, Emacs doesn't show the revision number in the
mode line.  See also
<http://permalink.gmane.org/gmane.comp.version-control.bazaar-ng.general/44629>.



In GNU Emacs 23.0.60.1 (x86_64-unknown-linux-gnu)
 of 2008-07-25 on wilson
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
configured using `configure  '--prefix=/usr/local/' '--mandir=/usr/local/share/man/' '--infodir=/usr/local/share/info/' '--with-x-toolkit=no' '--with-xpm' '--with-jpeg' '--with-tiff' '--with-gif' '--with-png' '--with-x''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: de_DE.UTF-8
  value of $XMODIFIERS: nil
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: HTML

Minor modes in effect:
  auto-fill-function: do-auto-fill
  shell-dirtrack-mode: t
  diff-auto-refine-mode: t
  global-auto-revert-mode: t
  savehist-mode: t
  display-time-mode: t
  desktop-save-mode: t
  mouse-wheel-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
@ 2010-01-01 22:43 Chong Yidong
  2010-01-02  7:00 ` Dan Nicolaescu
  2010-01-05  9:03 ` Torsten Bronger
  0 siblings, 2 replies; 7+ messages in thread
From: Chong Yidong @ 2010-01-01 22:43 UTC (permalink / raw
  To: Torsten Bronger; +Cc: 618

Hi Torsten,

> In Bazaar lightweight checkouts, Emacs doesn't show the revision
> number in the mode line.

I think this depends on the branch format, whose default has changed
since this bug was first reported.  For the latest version of bzr, Emacs
shows the revision number in the mode line for lightweight checkouts (at
least for me).  Do you still experience this problem?






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
  2010-01-01 22:43 bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts Chong Yidong
@ 2010-01-02  7:00 ` Dan Nicolaescu
  2010-01-02 21:21   ` Chong Yidong
  2010-01-05  9:03 ` Torsten Bronger
  1 sibling, 1 reply; 7+ messages in thread
From: Dan Nicolaescu @ 2010-01-02  7:00 UTC (permalink / raw
  To: Chong Yidong; +Cc: 618

Chong Yidong <cyd@stupidchicken.com> writes:

  > Hi Torsten,
  > 
  > > In Bazaar lightweight checkouts, Emacs doesn't show the revision
  > > number in the mode line.
  > 
  > I think this depends on the branch format, whose default has changed
  > since this bug was first reported.  For the latest version of bzr, Emacs
  > shows the revision number in the mode line for lightweight checkouts (at
  > least for me).  Do you still experience this problem?

The version number gets displayed correctly, but all files are shown as
modified.
I looked at this some time ago, and the patch below seems to do the
right thing for edited/up-to-date.

Index: vc-bzr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v
retrieving revision 1.94
diff -u -3 -p -a -r1.94 vc-bzr.el
--- vc-bzr.el	9 Dec 2009 06:04:12 -0000	1.94
+++ vc-bzr.el	2 Jan 2010 06:45:17 -0000
@@ -176,13 +176,13 @@ Invoke the bzr command adding `BZR_PROGR
                                "\0"
                                "[^\0]*\0"     ;id?
                                "\\([^\0]*\\)\0" ;"a/f/d", a=removed?
-                               "[^\0]*\0" ;sha1 (empty if conflicted)?
-                               "\\([^\0]*\\)\0" ;size?
+                               "\\([^\0]*\\)\0" ;sha1 (empty if conflicted)?
+                               "\\([^\0]*\\)\0" ;size?p
                                "[^\0]*\0"       ;"y/n", executable?
                                "[^\0]*\0"       ;?
                                "\\([^\0]*\\)\0" ;"a/f/d" a=added?
                                "\\([^\0]*\\)\0" ;sha1 again?
-                               "[^\0]*\0"       ;size again?
+                               "\\([^\0]*\\)\0" ;size again?
                                "[^\0]*\0" ;"y/n", executable again?
                                "[^\0]*\0" ;last revid?
                                ;; There are more fields when merges are pending.
@@ -194,11 +194,20 @@ Invoke the bzr command adding `BZR_PROGR
                       ;; conflict markers).
                       (cond
                        ((eq (char-after (match-beginning 1)) ?a) 'removed)
-                       ((eq (char-after (match-beginning 3)) ?a) 'added)
-                       ((and (eq (string-to-number (match-string 2))
+                       ((eq (char-after (match-beginning 4)) ?a) 'added)
+                       ((or (and (eq (string-to-number (match-string 3))
                                  (nth 7 (file-attributes file)))
-                             (equal (match-string 4)
+                             (equal (match-string 5)
                                     (vc-bzr-sha1 file)))
+			    (and
+			     ;; It looks like for lightweight
+			     ;; checkouts \2 is empty and we need to
+			     ;; look for size in \6.
+			     (eq (match-beginning 2) (match-end 2))
+			     (eq (string-to-number (match-string 6))
+				 (nth 7 (file-attributes file)))
+			     (equal (match-string 5)
+				    (vc-bzr-sha1 file))))
                         'up-to-date)
                        (t 'edited))
                     'unregistered))))






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
  2010-01-02  7:00 ` Dan Nicolaescu
@ 2010-01-02 21:21   ` Chong Yidong
  0 siblings, 0 replies; 7+ messages in thread
From: Chong Yidong @ 2010-01-02 21:21 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: 618

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

> The version number gets displayed correctly, but all files are shown
> as modified.  I looked at this some time ago, and the patch below
> seems to do the right thing for edited/up-to-date.

The patch looks good; if your testing shows that it works, please go
ahead and check it in (and close this bug).  Thanks.






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
  2010-01-01 22:43 bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts Chong Yidong
  2010-01-02  7:00 ` Dan Nicolaescu
@ 2010-01-05  9:03 ` Torsten Bronger
  2010-01-05 21:22   ` Dan Nicolaescu
  1 sibling, 1 reply; 7+ messages in thread
From: Torsten Bronger @ 2010-01-05  9:03 UTC (permalink / raw
  To: Chong Yidong; +Cc: 618

Hallöchen!

Chong Yidong writes:

> Hi Torsten,
>
>> In Bazaar lightweight checkouts, Emacs doesn't show the revision
>> number in the mode line.
>
> I think this depends on the branch format, whose default has
> changed since this bug was first reported.  For the latest version
> of bzr, Emacs shows the revision number in the mode line for
> lightweight checkouts (at least for me).

If I remember correctly, someone fixed this shortly after my report.
However, we "agreed" on a rather poor solution: Falling back to
calling "bzr revno" for every open file.  I've used this solution
for many months now.  It slows down Emacs' startup time
significantly.  After all, bzr being a Python program, causes a lot
of overhead.

Therefore, on the long run, Emacs should use the file system even
for lightweight checkouts.  (As long as the branch is local of
course.  But this is typical usage lightweight checkouts.)

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
  2010-01-05  9:03 ` Torsten Bronger
@ 2010-01-05 21:22   ` Dan Nicolaescu
  2010-01-05 22:38     ` Torsten Bronger
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Nicolaescu @ 2010-01-05 21:22 UTC (permalink / raw
  To: Torsten Bronger; +Cc: 618

Torsten Bronger <bronger@physik.rwth-aachen.de> writes:

  > Hallöchen!
  > 
  > Chong Yidong writes:
  > 
  > > Hi Torsten,
  > >
  > >> In Bazaar lightweight checkouts, Emacs doesn't show the revision
  > >> number in the mode line.
  > >
  > > I think this depends on the branch format, whose default has
  > > changed since this bug was first reported.  For the latest version
  > > of bzr, Emacs shows the revision number in the mode line for
  > > lightweight checkouts (at least for me).
  > 
  > If I remember correctly, someone fixed this shortly after my report.
  > However, we "agreed" on a rather poor solution: Falling back to
  > calling "bzr revno" for every open file.  I've used this solution
  > for many months now.  It slows down Emacs' startup time
  > significantly.  After all, bzr being a Python program, causes a lot
  > of overhead.
  > 
  > Therefore, on the long run, Emacs should use the file system even
  > for lightweight checkouts.  (As long as the branch is local of
  > course.  But this is typical usage lightweight checkouts.)

I checked in a fix, bzr should not be run anymore for lightweight checkouts.






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

* bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts
  2010-01-05 21:22   ` Dan Nicolaescu
@ 2010-01-05 22:38     ` Torsten Bronger
  0 siblings, 0 replies; 7+ messages in thread
From: Torsten Bronger @ 2010-01-05 22:38 UTC (permalink / raw
  To: Dan Nicolaescu; +Cc: 618

Hallöchen!

Dan Nicolaescu writes:

> [...]
>
> I checked in a fix, bzr should not be run anymore for lightweight
> checkouts.

Indeed, I can confirm this.  Thank you!

Tschö,
Torsten.

-- 
Torsten Bronger, aquisgrana, europa vetus
                   Jabber ID: torsten.bronger@jabber.rwth-aachen.de
                                  or http://bronger-jmp.appspot.com






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

end of thread, other threads:[~2010-01-05 22:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-01 22:43 bug#618: 23.0.60; Bazaar support: no revision number with lightweight checkouts Chong Yidong
2010-01-02  7:00 ` Dan Nicolaescu
2010-01-02 21:21   ` Chong Yidong
2010-01-05  9:03 ` Torsten Bronger
2010-01-05 21:22   ` Dan Nicolaescu
2010-01-05 22:38     ` Torsten Bronger
  -- strict thread matches above, loose matches on Subject: below --
2008-07-27 20:41 Torsten Bronger

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.