summaryrefslogtreecommitdiff
path: root/admin/bzrmerge.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-01-17 16:18:00 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-01-17 16:18:00 -0500
commit41f44310b35b8246475d707b3417e42a03b1ca05 (patch)
tree45eb63415cc44032cc52d572ca2a553c451a8d84 /admin/bzrmerge.el
parent61f74651c4d5d7502069263ce763cb8685b81ad8 (diff)
downloademacs-41f44310b35b8246475d707b3417e42a03b1ca05.tar.gz
* admin/bzrmerge.el (bzrmerge-apply): Warn the user when the tree might be in
an inconsistent state.
Diffstat (limited to 'admin/bzrmerge.el')
-rw-r--r--admin/bzrmerge.el11
1 files changed, 11 insertions, 0 deletions
diff --git a/admin/bzrmerge.el b/admin/bzrmerge.el
index 6764cbf853a..68b107be65e 100644
--- a/admin/bzrmerge.el
+++ b/admin/bzrmerge.el
@@ -218,6 +218,7 @@ Does not make other difference."
(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 @@ Does not make other difference."
"--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 @@ Does not make other difference."
(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)))))