emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r102879: * admin/bzrmerge.el (bzrmerg


From: Stefan Monnier
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r102879: * admin/bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in
Date: Mon, 17 Jan 2011 16:18:00 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 102879
committer: Stefan Monnier <address@hidden>
branch nick: trunk
timestamp: Mon 2011-01-17 16:18:00 -0500
message:
  * admin/bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in
  an inconsistent state.
modified:
  admin/ChangeLog
  admin/bzrmerge.el
=== modified file 'admin/ChangeLog'
--- a/admin/ChangeLog   2011-01-17 19:01:01 +0000
+++ b/admin/ChangeLog   2011-01-17 21:18:00 +0000
@@ -1,3 +1,8 @@
+2011-01-17  Stefan Monnier  <address@hidden>
+
+       * bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in
+       an inconsistent state.
+
 2011-01-17  Paul Eggert  <address@hidden>
 
        Update copyright notes to match recent gnulib-related changes.

=== modified file 'admin/bzrmerge.el'
--- a/admin/bzrmerge.el 2011-01-15 20:42:23 +0000
+++ b/admin/bzrmerge.el 2011-01-17 21:18:00 +0000
@@ -218,6 +218,7 @@
     (setq bzrmerge-already-done nil)
     (let ((merge (car missing))
           (skip (cdr missing))
+          (unsafe nil)
           beg end)
       (when (or merge skip)
         (cond
@@ -249,6 +250,7 @@
                           "--force" "-r" (format "%s..%s" beg end) from)
             ;; The merge did not update the metadata, so force the next time
             ;; around to update it (as a "skip").
+            (setq unsafe t)
             (push end skip))
           (pop-to-buffer (current-buffer))
           (sit-for 1)
@@ -271,6 +273,15 @@
             (when conflicted
               (setq bzrmerge-already-done
                     (list (cons merge skip) from missing))
+              (if unsafe
+                  ;; FIXME: Obviously, we'd rather make it right rather
+                  ;; than output such a warning.  But I don't know how to add
+                  ;; the metadata to bzr's since the technique used in
+                  ;; bzrmerge-add-metadata does not work when there
+                  ;; are conflicts.
+                  (display-warning 'bzrmerge "Resolve conflicts manually.
+¡BEWARE!  Important metadata is kept in this Emacs session!
+Do not commit without re-running `M-x bzrmerge' first!")))
               (error "Resolve conflicts manually")))))
         (cons merge skip)))))
 


reply via email to

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