[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: No commit in vc?
From: |
Dan Nicolaescu |
Subject: |
Re: No commit in vc? |
Date: |
Fri, 29 Jan 2010 09:29:15 -0800 (PST) |
Eli Zaretskii <address@hidden> writes:
> > From: Óscar Fuentes <address@hidden>
> > Date: Fri, 29 Jan 2010 11:48:00 +0100
> > Cc: Dan Nicolaescu <address@hidden>
> >
> > 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."
- Re: No commit in vc?, (continued)
- Re: No commit in vc?, Óscar Fuentes, 2010/01/28
- Re: No commit in vc?, Eli Zaretskii, 2010/01/28
- Re: No commit in vc?, Óscar Fuentes, 2010/01/28
- Re: No commit in vc?, Eli Zaretskii, 2010/01/28
- Re: No commit in vc?, Dan Nicolaescu, 2010/01/28
- Re: No commit in vc?, Eli Zaretskii, 2010/01/29
- Re: No commit in vc?, Dan Nicolaescu, 2010/01/29
- Re: No commit in vc?, Óscar Fuentes, 2010/01/29
- Re: No commit in vc?, Eli Zaretskii, 2010/01/29
- Re: No commit in vc?, Óscar Fuentes, 2010/01/29
- Re: No commit in vc?,
Dan Nicolaescu <=
- Re: No commit in vc?, Óscar Fuentes, 2010/01/29
- Re: No commit in vc?, Eli Zaretskii, 2010/01/29
- Re: No commit in vc?, Thien-Thi Nguyen, 2010/01/30
- Re: No commit in vc?, Eli Zaretskii, 2010/01/30
- Re: No commit in vc?, Thien-Thi Nguyen, 2010/01/30
- Re: No commit in vc?, Eli Zaretskii, 2010/01/30
- Re: No commit in vc?, Thien-Thi Nguyen, 2010/01/31
- Re: No commit in vc?, Stefan Monnier, 2010/01/31
- Re: No commit in vc?, Thien-Thi Nguyen, 2010/01/31
- Re: No commit in vc?, David De La Harpe Golden, 2010/01/31