unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Dan Nicolaescu <dann@ics.uci.edu>
To: Eli Zaretskii <eliz@gnu.org>
Cc: "Óscar Fuentes" <ofv@wanadoo.es>, emacs-devel@gnu.org
Subject: Re: No commit in vc?
Date: Fri, 29 Jan 2010 09:29:15 -0800 (PST)	[thread overview]
Message-ID: <201001291729.o0THTFam010863@godzilla.ics.uci.edu> (raw)
In-Reply-To: <83vdelrx60.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 29 Jan 2010 13:02:47 +0200")

Eli Zaretskii <eliz@gnu.org> writes:

  > > From: Óscar Fuentes <ofv@wanadoo.es>
  > > Date: Fri, 29 Jan 2010 11:48:00 +0100
  > > Cc: Dan Nicolaescu <dann@ics.uci.edu>
  > > 
  > > Maybe it is a good idea to display the condition that there are pending
  > > merges
  > 
  > Display how?  If in the modeline, then that indicator might not be
  > prominent enough to draw the attention.

I've already said that in a previous message:
"If yes, then vc-dir can insert a header to tell the user to do a commit
with no arguments."

Here's an untested p

Index: vc-bzr.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/vc-bzr.el,v
retrieving revision 1.94
diff -u -3 -p -u -p -r1.94 vc-bzr.el
--- vc-bzr.el	9 Dec 2009 06:04:12 -0000	1.94
+++ vc-bzr.el	29 Jan 2010 17:20:25 -0000
@@ -663,6 +657,8 @@ stream.  Standard error output is discar
 		       ;; FIXME: maybe this warning can be put in the vc-dir header...
 		       ("wor" . not-found)
                        ;; Ignore "P " and "P." for pending patches.
-		       ("P  " . not-found)
-		       ("P. " . not-found)
+		       ("P  " . pending-merge)
+		       ("P. " . pending-merge)
                        ))
 	(translated nil)
 	(result nil))
@@ -685,5 +681,7 @@ stream.  Standard error output is discar
 		 (entry (assoc file result)))
 	    (when entry
 	      (setf (nth 1 entry) 'conflict))))
+	 ((eq translated 'pending-merge)
+	  (setq vc-bzr-dir-pending-merge t))
 	 ((eq translated 'renamed)
 	  (re-search-forward "R   \\(.*\\) => \\(.*\\)$" (line-end-position) t)
@@ -702,6 +701,7 @@
       (funcall update-function result)))
 
 (defun vc-bzr-dir-status (dir update-function)
   "Return a list of conses (file . state) for DIR."
+  (set (make-local-variable 'vc-bzr-dir-pending-merge) nil)
   (vc-bzr-command "status" (current-buffer) 'async dir "-v" "-S")
   (vc-exec-after
@@ -749,6 +766,8 @@ stream.  Standard error output is discar
 
 (defun vc-bzr-extra-status-menu () vc-bzr-extra-menu-map)
 
+(defvar vc-bzr-dir-pending-merge nil)
+
 (defun vc-bzr-dir-extra-headers (dir)
   (let*
       ((str (with-temp-buffer
@@ -798,7 +817,14 @@ stream.  Standard error output is discar
 		    'help-echo shelve-help-echo)
 	(propertize "No shelved changes"
 		    'help-echo shelve-help-echo
-		    'face 'font-lock-variable-name-face))))))
+		    'face 'font-lock-variable-name-face)))
+     (when vc-bzr-dir-pending-merge
+       (concat
+	(propertize "Warning            : " 'face 'font-lock-warning-face
+		    'help-echo shelve-help-echo)
+	(propertize "Pending merges, commit recommended before any other action"
+		    'help-echo "Explain here what is going on"
+		    'face 'font-lock-warning-face))))))
 
 (defun vc-bzr-shelve (name)
   "Create a shelve."




  parent reply	other threads:[~2010-01-29 17:29 UTC|newest]

Thread overview: 60+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  7:25 No commit in vc? Jan Djärv
2010-01-28  7:50 ` Eli Zaretskii
2010-01-28  8:09   ` Jan Djärv
2010-01-28 11:35     ` Eli Zaretskii
2010-01-28 12:59       ` Jan Djärv
2010-01-28 13:02         ` Jan Djärv
2010-01-28 11:26 ` Óscar Fuentes
2010-01-28 13:01   ` Jan Djärv
2010-01-28 13:22     ` Jason Rumney
2010-01-28 13:43       ` Óscar Fuentes
2010-01-28 13:49     ` Óscar Fuentes
2010-01-28 14:57       ` Jan Djärv
2010-01-28 15:05         ` Óscar Fuentes
2010-01-28 16:26           ` Jan Djärv
2010-01-28 16:44             ` Óscar Fuentes
2010-01-28 19:07               ` Jan Djärv
2010-01-28 18:21         ` Eli Zaretskii
2010-01-28 19:14           ` Jan Djärv
2010-01-28 19:44             ` Dan Nicolaescu
2010-01-28 20:24             ` Eli Zaretskii
2010-01-28 18:32       ` Eli Zaretskii
2010-01-28 18:52         ` Óscar Fuentes
2010-01-28 19:27           ` Eli Zaretskii
2010-01-28 19:57             ` Óscar Fuentes
2010-01-28 20:56               ` Eli Zaretskii
2010-01-29  2:00                 ` Dan Nicolaescu
2010-01-29  9:11                   ` Eli Zaretskii
2010-01-29  9:40                     ` Dan Nicolaescu
2010-01-29 10:48                       ` Óscar Fuentes
2010-01-29 11:02                         ` Eli Zaretskii
2010-01-29 12:05                           ` Óscar Fuentes
2010-01-29 17:29                           ` Dan Nicolaescu [this message]
2010-01-29 18:29                             ` Óscar Fuentes
2010-01-29 19:56                               ` Eli Zaretskii
2010-01-30 15:52                                 ` Thien-Thi Nguyen
2010-01-30 16:44                                   ` Eli Zaretskii
2010-01-30 19:02                                     ` Thien-Thi Nguyen
2010-01-30 21:28                                       ` Eli Zaretskii
2010-01-30 22:07                                         ` Thien-Thi Nguyen
2010-01-31 15:00                                       ` Stefan Monnier
2010-01-31 16:02                                         ` Thien-Thi Nguyen
2010-01-31 16:40                                           ` David De La Harpe Golden
2010-01-31 22:44                                           ` Stefan Monnier
2010-02-01  4:34                                           ` Dan Nicolaescu
2010-02-01 13:07                                             ` Thien-Thi Nguyen
2010-02-01 15:44                                               ` Stefan Monnier
2010-01-30 19:49                                 ` Dan Nicolaescu
2010-01-30 21:35                                   ` Eli Zaretskii
2010-01-30 22:54                                   ` Juri Linkov
2010-02-01  4:31                                     ` Dan Nicolaescu
2010-02-01 10:42                                       ` Juri Linkov
2010-02-01 19:17                                         ` Dan Nicolaescu
2010-02-02 22:47                                     ` Juri Linkov
2010-02-05  4:12                                       ` Chong Yidong
2010-02-05  5:07                                         ` Dan Nicolaescu
2010-02-05  8:44                                           ` Eli Zaretskii
2010-02-05 21:28                                             ` Juri Linkov
2010-01-29 10:50                       ` Eli Zaretskii
2010-01-30 22:52                         ` Juri Linkov
2010-01-31  4:18                           ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=201001291729.o0THTFam010863@godzilla.ics.uci.edu \
    --to=dann@ics.uci.edu \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=ofv@wanadoo.es \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).