emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r99430: (vc-bzr-dir-extra-headers): A


From: Dan Nicolaescu
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r99430: (vc-bzr-dir-extra-headers): Add a header when a
Date: Sun, 31 Jan 2010 20:58:35 -0800
User-agent: Bazaar (2.0.2)

------------------------------------------------------------
revno: 99430
committer: Dan Nicolaescu <address@hidden>
branch nick: trunk
timestamp: Sun 2010-01-31 20:58:35 -0800
message:
  (vc-bzr-dir-extra-headers): Add a header when a
  pending merge is detected.
modified:
  lisp/ChangeLog
  lisp/vc-bzr.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-01-31 21:47:47 +0000
+++ b/lisp/ChangeLog    2010-02-01 04:58:35 +0000
@@ -1,3 +1,8 @@
+2010-02-01  Dan Nicolaescu  <address@hidden>
+
+       * vc-bzr.el (vc-bzr-dir-extra-headers): Add a header when a
+       pending merge is detected.
+
 2010-01-31  Juri Linkov  <address@hidden>
 
        * progmodes/grep.el (zrgrep): Call `grep-compute-defaults' at the

=== modified file 'lisp/vc-bzr.el'
--- a/lisp/vc-bzr.el    2010-01-29 23:43:31 +0000
+++ b/lisp/vc-bzr.el    2010-02-01 04:58:35 +0000
@@ -794,6 +794,12 @@
              (buffer-string)))
        (shelve (vc-bzr-shelve-list))
        (shelve-help-echo "Use M-x vc-bzr-shelve to create shelves")
+       (root-dir (vc-bzr-root dir))
+       (pending-merge
+       (file-exists-p
+        (expand-file-name ".bzr/checkout/merge-hashes" root-dir)))
+       (pending-merge-help-echo
+       (format "A merge has been performed.\nA commit from the top-level 
directory (%s)\nis required before being able to check in anything else" 
root-dir))
        (light-checkout
        (when (string-match ".+light checkout root: \\(.+\\)$" str)
          (match-string 1 str)))
@@ -819,24 +825,32 @@
         (propertize "Checkout of branch : " 'face 'font-lock-type-face)
         (propertize light-checkout-branch 'face 'font-lock-variable-name-face)
         "\n"))
-     (if shelve
-        (concat
-         (propertize "Shelves            :\n" 'face 'font-lock-type-face
-                     'help-echo shelve-help-echo)
-         (mapconcat
-          (lambda (x)
-            (propertize x
-                        'face 'font-lock-variable-name-face
-                        'mouse-face 'highlight
-                        'help-echo "mouse-3: Show shelve menu\nP: Apply and 
remove shelf (pop)\nC-k: Delete shelf"
-                        'keymap vc-bzr-shelve-map))
-          shelve "\n"))
-       (concat
-       (propertize "Shelves            : " 'face 'font-lock-type-face
-                   'help-echo shelve-help-echo)
-       (propertize "No shelved changes"
-                   'help-echo shelve-help-echo
-                   'face 'font-lock-variable-name-face))))))
+      (when pending-merge
+       (concat
+        (propertize "Warning            : " 'face 'font-lock-warning-face
+                    'help-echo pending-merge-help-echo)
+        (propertize "Pending merges, commit recommended before any other 
action"
+                    'help-echo pending-merge-help-echo
+                    'face 'font-lock-warning-face)
+        "\n"))
+      (if shelve
+         (concat
+          (propertize "Shelves            :\n" 'face 'font-lock-type-face
+                      'help-echo shelve-help-echo)
+          (mapconcat
+           (lambda (x)
+             (propertize x
+                         'face 'font-lock-variable-name-face
+                         'mouse-face 'highlight
+                         'help-echo "mouse-3: Show shelve menu\nA: Apply and 
keep shelf\nP: Apply and remove shelf (pop)\nS: Snapshot to a shelf\nC-k: 
Delete shelf"
+                         'keymap vc-bzr-shelve-map))
+           shelve "\n"))
+       (concat
+        (propertize "Shelves            : " 'face 'font-lock-type-face
+                    'help-echo shelve-help-echo)
+        (propertize "No shelved changes"
+                    'help-echo shelve-help-echo
+                    'face 'font-lock-variable-name-face))))))
 
 (defun vc-bzr-shelve (name)
   "Create a shelve."


reply via email to

[Prev in Thread] Current Thread [Next in Thread]